/* Estilos para a página de FAQ */

.faq-section {
  padding: 3rem 0;

  @media (max-width: 768px) {
    padding: 2rem 0;
  }
}

.faq-search {
  margin-bottom: 2rem;

  @media (max-width: 768px) {
    margin-bottom: 1.5rem;
  }

  .search-input-wrapper {
    position: relative;

    .form-control {
      padding: 1rem 3rem 1rem 1.5rem;
      border: 2px solid #e9ecef;
      border-radius: 0.5rem;
      font-size: 1rem;
      transition: all 0.3s ease;

      &:focus {
        border-color: #020817;
        box-shadow: none;
        outline: none;
      }

      &::placeholder {
        color: #6c757d;
      }

      @media (max-width: 768px) {
        padding: 0.875rem 2.5rem 0.875rem 1rem;
        font-size: 0.9rem;
      }
    }

    .search-icon {
      position: absolute;
      right: 1rem;
      top: 50%;
      transform: translateY(-50%);
      color: #6c757d;
      pointer-events: none;
      font-size: 1.2rem;
      width: 1.2rem;
      height: 1.2rem;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    @media (max-width: 768px) {
      .search-icon {
        right: 0.75rem;
        font-size: 1rem;
        width: 1rem;
        height: 1rem;
      }
    }
  }
}

.faq-filters {
  margin-bottom: 2rem;

  .filter-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;

    @media (max-width: 768px) {
      gap: 0.25rem;
    }

    .filter-btn {
      padding: 0.75rem 1.5rem;
      border: 2px solid #e9ecef;
      background-color: #fff;
      color: #6c757d;
      border-radius: 0.5rem;
      font-weight: 500;
      font-size: 0.9rem;
      cursor: pointer;
      transition: all 0.3s ease;
      text-decoration: none;
      display: inline-block;

      &:hover {
        border-color: #020817;
        color: #020817;
        background-color: #f8f9fa;
      }

      &.active {
        background-color: #1574bf;
        border-color: #1574bf;
        color: #fff;
      }

      &:focus,
      &:active,
      &:focus:active {
        outline: none;
        box-shadow: none;
      }

      @media (max-width: 768px) {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
        flex: 1;
        min-width: 0;
        text-align: center;
      }
    }
  }
}

.faq-category-section {
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
  padding: 20px;
  border-radius: 10px;

  &:last-child {
    margin-bottom: 0;
  }

  .faq-category-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #020817;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e9ecef;
    transition: opacity 0.3s ease;

    @media (max-width: 768px) {
      font-size: 1.25rem;
    }
  }
}

.accordion {
  background-color: transparent;
  overflow: visible;

  .accordion-item {
    margin: 0;
    border: none;
    border-radius: 0;
    background-color: #fff;

    + .accordion-item {
      border-top: 1px solid var(--border-color);
    }

    &:first-child {
      border-top-left-radius: 0.5rem;
      border-top-right-radius: 0.5rem;
    }

    &:last-child {
      border-bottom-left-radius: 0.5rem;
      border-bottom-right-radius: 0.5rem;
    }
  }

  .accordion-button {
    background-color: #fff;
    border: none;
    font-weight: 600;
    color: #020817;
    padding: 1.5rem;
    padding-inline: 0;
    font-size: 1rem;
    gap: 1rem;

    &:not(.collapsed) {
      background-color: #fff;
      color: #1e215a;
      box-shadow: none;
    }

    &:focus {
      box-shadow: none;
      border-color: transparent;
    }

    &::after {
      background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23212529'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
    }

    @media (max-width: 768px) {
      padding: 1rem;
      font-size: 1em;
    }
  }

  .accordion-body {
    padding-top: 0;
    padding-inline: 0;
  }

  .accordion-collapse {
    transition: height 0.35s ease;
  }
}

.faq-excerpt {
  margin-top: 1rem;
  padding-top: 1rem;
  box-shadow: var(--shadow-sm);
  font-style: italic;
  color: #666;
}

.alert {
  border-radius: 0.375rem;
  padding: 1.5rem;
  margin: 2rem 0;

  &.alert-info {
    background-color: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
  }

  .alert-heading {
    color: inherit;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
  }
}

/* Estilos unificados para FAQ em qualquer local */
.faq-container {
  background: #fefefe;
  padding: 20px;
  border-radius: 1rem;
  color: #020817;
  font-size: 1rem;
  line-height: 1.6;
  box-shadow: var(--shadow-sm);

  @media (max-width: 768px) {
    padding: 1rem;
  }
}

/* Classe para remover box-shadow */
.faq-container.no-shadow {
  box-shadow: none;
}

.no-faqs-message,
.no-search-results {
  padding: 2rem;
  background-color: #fefefe;
  font-size: 1rem;
  line-height: 1.6;
  border-radius: 1rem;
  color: #020817;
  box-shadow: var(--shadow-sm);
  text-align: center;

  @media (max-width: 768px) {
    padding: 1rem;
  }

  h3 {
    margin-bottom: 1rem;
    font-weight: bolder;
    color: #020817;
  }

  p {
    font-size: 1.1rem;
    margin-bottom: 0;
  }
}
