/* ============================================================
   FAQ PAGE
   Frequently Asked Questions page styles
   ============================================================ */

/* FAQ page container (converted from popup overlay) */
.faq-page-overlay {
  display: flex;
  position: relative;
  align-items: flex-start;
  justify-content: center;
  width: 100%;
  padding-top: 80px;
  padding-bottom: 40px;
}

/* FAQ page content container */
.faq-page-content {
  padding: 20px;
  max-width: 800px;
  width: 90%;
}

/* FAQ page header */
.faq-page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(65, 65, 65, 0.5);
}

/* FAQ page title */
.faq-page-title {
  font-size: 20px;
  font-weight: 600;
  color: #E0E0E0;
}

/* Search container */
.faq-search-container {
  margin-bottom: 20px;
}

.faq-search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.faq-search-icon {
  position: absolute;
  left: 12px;
  fill: #717171;
  pointer-events: none;
}

.faq-search-input {
  width: 100%;
  padding: 12px 40px 12px 40px;
  background: rgba(41, 41, 41, 0.8);
  border: 1px solid rgba(65, 65, 65, 0.5);
  border-radius: 12px;
  color: #E0E0E0;
  font-size: 14px;
  font-family: 'Montserrat', sans-serif;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.faq-search-input:focus {
  outline: none;
  border-color: #ff8a3d;
  background: rgba(41, 41, 41, 1);
}

.faq-search-input::placeholder {
  color: #717171;
}

.faq-search-clear {
  position: absolute;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: transparent;
  border: none;
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.2s ease;
}

.faq-search-clear:hover {
  background: rgba(255, 255, 255, 0.1);
}

.faq-search-clear svg {
  fill: #717171;
}

/* FAQ page body */
.faq-page-body {
  color: #a3a3a3;
  font-size: 14px;
  line-height: 1.6;
}

/* Loading state */
.faq-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: #717171;
}

.faq-loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 138, 61, 0.2);
  border-top-color: #ff8a3d;
  border-radius: 50%;
  animation: faq-spin 0.8s linear infinite;
  margin-bottom: 12px;
}

@keyframes faq-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Error state */
.faq-error {
  text-align: center;
  padding: 40px 20px;
  color: #ff6b6b;
}

/* Empty search results */
.faq-empty {
  text-align: center;
  padding: 40px 20px;
  color: #717171;
}

/* Categories container */
.faq-categories {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Category item */
.faq-category {
  background: rgba(41, 41, 41, 0.5);
  border: 1px solid rgba(65, 65, 65, 0.5);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.faq-category.active {
  border-color: rgba(255, 138, 61, 0.3);
}

/* Category header (clickable) */
.faq-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s ease;
}

.faq-category-header:hover {
  background: rgba(255, 255, 255, 0.05);
}

.faq-category-title {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #E0E0E0;
  font-size: 16px;
  font-weight: 600;
}

.faq-category-icon {
  font-size: 18px;
}

.faq-category-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  transition: transform 0.3s ease;
}

.faq-category.active .faq-category-toggle {
  transform: rotate(180deg);
}

.faq-category-toggle svg {
  fill: #717171;
  width: 20px;
  height: 20px;
}

/* Category items container */
.faq-category-items {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-category.active .faq-category-items {
  max-height: 5000px;
}

/* FAQ item */
.faq-item {
  border-top: 1px solid rgba(65, 65, 65, 0.3);
}

.faq-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s ease;
}

.faq-item-header:hover {
  background: rgba(255, 255, 255, 0.03);
}

.faq-item-question {
  color: #E0E0E0;
  font-size: 14px;
  font-weight: 500;
  flex: 1;
  padding-right: 12px;
}

.faq-item-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.faq-item.active .faq-item-toggle {
  transform: rotate(180deg);
}

.faq-item-toggle svg {
  fill: #717171;
  width: 16px;
  height: 16px;
}

/* FAQ item content (answer + image) */
.faq-item-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-item.active .faq-item-content {
  max-height: 2000px;
}

.faq-item-content-inner {
  padding: 0 16px 14px 16px;
}

.faq-item-answer {
  color: #a3a3a3;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 0;
}

.faq-item-image {
  margin-top: 12px;
  border-radius: 8px;
  overflow: hidden;
}

.faq-item-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

/* Search highlighting */
.faq-highlight {
  background-color: rgba(255, 138, 61, 0.3);
  color: #ff8a3d;
  font-weight: 600;
  padding: 0 2px;
  border-radius: 2px;
}

/* Mobile styles */
@media (max-width: 768px) {
  .faq-page-overlay {
    padding-top: 70px;
    padding-bottom: 60px;
  }

  .faq-page-content {
    width: 100%;
    max-width: 100%;
    padding-bottom: 60px;
  }

  .faq-category-title {
    font-size: 15px;
  }

  .faq-item-question {
    font-size: 13px;
  }

  .faq-item-answer {
    font-size: 13px;
  }
}
