@use "../../../../styles/abstracts/variables";
@use "../../../../styles/abstracts/mixins";

.faqsPage {
  @include mixins.adminPageIntro;
  margin-top: 1.2rem;
  width: 100%;
  background:
    radial-gradient(
      circle at top right,
      rgba(255, 140, 66, 0.05),
      transparent 35%
    ),
    #101012;

  &__search {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 0.5rem 1rem;
    @media only screen and (max-width: 1024px) {
      margin-top: 1rem;
    }

    input {
      border: none;
      outline: none;
      background: transparent;
      color: #fff;
      font-size: 0.9rem;
      width: 100%;
      padding: 0.25rem 0;

      &::placeholder {
        color: rgba(255, 255, 255, 0.6);
      }
    }

    svg {
      color: rgba(255, 255, 255, 0.6);
      flex-shrink: 0;
    }
  }

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

  &__item {
    background: rgba(15, 15, 18, 0.9);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
    transition: all 0.35s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);

    &.open {
      box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
    }
  }

  &__question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    color: #fff;
    font-weight: 500 !important;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    outline: none;
    transition: all 0.25s ease;

    &:hover {
      background: rgba(255, 255, 255, 0.05);
    }

    svg {
      transition: transform 0.3s ease;
    }
  }

  &__answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.3s ease;
    padding: 0 1.5rem;

    p {
      margin: 0;
      font-size: 0.9rem;
      color: #cbd5e1;
      line-height: 1.6;
    }

    .open & {
      max-height: 500px;
      padding: 0.8rem 1.5rem 1rem 1.5rem;
    }
  }

  &__noData {
    text-align: center;
    color: #FFF !important;
    padding: 2rem 0;
    font-size: 0.95rem;
  }

  /* Responsive */
  @media only screen and (max-width: 1024px) {
    &__question {
      font-size: 0.9rem;
      padding: 0.8rem 1.2rem;
    }

    &__answer p {
      font-size: 0.85rem;
    }
  }

  @media only screen and (max-width: 640px) {
    &__question {
      font-size: 0.85rem;
      padding: 0.6rem 1rem;
    }

    &__answer p {
      font-size: 0.8rem;
    }

    &__search {
      padding: 0.4rem 0.8rem;
      gap: 0.5rem;

      input {
        font-size: 0.85rem;
      }
    }
  }
}
