@use 'variables' as vars;

/* Meta box on the editor screen for LLMs Friendly */
#ambiscale_llms_friendly__metabox {

  .postbox-header {
    background: .1s ease-in-out;
    padding-right: 0.3125rem;

    h2.hndle {
      font-size: 0.8125rem;
      padding: 0 1rem;
    }

    &:hover {
      background: vars.$background-color-2;

      h2.hndle {
        color: var(--wp-components-color-accent, var(--wp-admin-theme-color,#3858e9));
      }
    }
  }

  .handle-order-higher,
  .handle-order-lower {
    display: none;
  }

  .inside {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .handlediv {
    height: 48px;
    width: 48px;

    &:focus {
      box-shadow: none;
      border-radius: 0;
      outline: none;
    }
  }

  .toggle-indicator {

    &::before {
      content: '\f343';
      font-size: 1rem;
      color: vars.$text-dark-color;
    }
  }

  &.closed {
    .toggle-indicator {

      &::before {
        content: '\f347';
      }
    }
  }
}

.ambiscale-llms-friendly {

  &-metabox {
    display: flex;
    flex-direction: column;
    gap: 1rem;

    &__group {
      display: flex;
      flex-direction: column;
      gap: 0.3rem;
      line-height: 1.25em;

      &:not(:last-of-type) {
        margin-bottom: 1em;
      }
    }

    label {
      font-weight: 500;
    }

    p {
      margin: 0;
    }

    &__description {
        margin-bottom: 1em;
    }

    label + p {
      margin-top: 0.5em;
    }

    textarea {
      margin-top: 0.5em;
    }
  }
}
