/* Quantum FAQ System - Styles */

/* Hero Section */
.section--hero-faq {
  background: var(--gradient-hero);
  padding: var(--space-24) 0 var(--space-12);
  text-align: center;
}

.faq-hero {
  max-width: 700px;
  margin: 0 auto;
}

.faq-hero__title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: var(--font-bold);
  color: white;
  margin-bottom: var(--space-4);
}

.faq-hero__subtitle {
  font-size: var(--text-xl);
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: var(--space-8);
}

/* Search Bar */
.faq-search {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
}

.faq-search__wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.faq-search__icon {
  position: absolute;
  left: var(--space-4);
  width: 24px;
  height: 24px;
  color: var(--text-muted);
  pointer-events: none;
}

.faq-search__input {
  width: 100%;
  padding: var(--space-4) var(--space-12);
  font-size: var(--text-lg);
  border: 2px solid transparent;
  border-radius: var(--radius-full);
  background: white;
  box-shadow: var(--shadow-xl);
  transition: all var(--transition-base);
}

.faq-search__input:focus {
  outline: none;
  border-color: var(--quantum-coral);
  box-shadow: var(--shadow-xl), 0 0 0 4px rgba(224, 123, 84, 0.2);
}

.faq-search__input::placeholder {
  color: var(--text-muted);
}

.faq-search__clear {
  position: absolute;
  right: var(--space-4);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--light-gray);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.faq-search__clear:hover {
  background: var(--quantum-coral);
  color: white;
}

.faq-search__clear svg {
  width: 16px;
  height: 16px;
}

/* Autocomplete Dropdown */
.faq-autocomplete {
  position: absolute;
  top: calc(100% + var(--space-2));
  left: 0;
  right: 0;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  max-height: 400px;
  overflow-y: auto;
  z-index: var(--z-dropdown);
}

.faq-autocomplete__item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  border-bottom: 1px solid var(--light-gray);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.faq-autocomplete__item:last-child {
  border-bottom: none;
}

.faq-autocomplete__item:hover,
.faq-autocomplete__item--active {
  background: var(--warm-cream);
}

.faq-autocomplete__icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--quantum-coral);
}

.faq-autocomplete__content {
  flex: 1;
  min-width: 0;
}

.faq-autocomplete__question {
  font-weight: var(--font-medium);
  color: var(--text-primary);
  margin-bottom: var(--space-1);
}

.faq-autocomplete__question mark {
  background: rgba(224, 123, 84, 0.3);
  color: inherit;
  padding: 0 2px;
  border-radius: 2px;
}

.faq-autocomplete__category {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.faq-autocomplete__empty {
  padding: var(--space-6);
  text-align: center;
  color: var(--text-muted);
}

/* Search Results */
.faq-search-results {
  margin-top: var(--space-4);
  color: rgba(255, 255, 255, 0.9);
  font-size: var(--text-sm);
}

/* Helper Section */
.section--helper {
  padding: var(--space-12) 0;
  background: var(--warm-cream);
}

.faq-helper {
  background: white;
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  box-shadow: var(--shadow-lg);
  max-width: 800px;
  margin: 0 auto;
}

.faq-helper__header {
  text-align: center;
  margin-bottom: var(--space-8);
}

.faq-helper__title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  font-size: var(--text-2xl);
  color: var(--quantum-navy);
  margin-bottom: var(--space-2);
}

.faq-helper__title svg {
  color: var(--quantum-coral);
}

.faq-helper__description {
  color: var(--text-secondary);
}

/* Step Indicator */
.faq-helper__steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  margin-bottom: var(--space-8);
  flex-wrap: wrap;
}

.faq-helper__step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  opacity: 0.5;
  transition: opacity var(--transition-base);
}

.faq-helper__step--active {
  opacity: 1;
}

.faq-helper__step--completed {
  opacity: 1;
}

.faq-helper__step-number {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--light-gray);
  color: var(--text-secondary);
  font-weight: var(--font-bold);
  border-radius: 50%;
  transition: all var(--transition-base);
}

.faq-helper__step--active .faq-helper__step-number {
  background: var(--quantum-coral);
  color: white;
}

.faq-helper__step--completed .faq-helper__step-number {
  background: var(--quantum-navy);
  color: white;
}

.faq-helper__step-label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-align: center;
}

.faq-helper__step--active .faq-helper__step-label {
  color: var(--text-primary);
  font-weight: var(--font-medium);
}

.faq-helper__step-line {
  width: 40px;
  height: 2px;
  background: var(--light-gray);
}

/* Helper Options */
.faq-helper__options {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.faq-helper__options--grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-4);
}

.faq-helper__option {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  background: white;
  border: 2px solid var(--light-gray);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-base);
  text-align: left;
}

.faq-helper__option:hover {
  border-color: var(--quantum-coral);
  background: var(--warm-cream);
}

.faq-helper__option--compact {
  flex-direction: column;
  text-align: center;
  padding: var(--space-5);
}

.faq-helper__option-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(224, 123, 84, 0.1);
  border-radius: var(--radius-md);
  color: var(--quantum-coral);
}

.faq-helper__option-icon--sm {
  width: 40px;
  height: 40px;
}

.faq-helper__option-icon svg {
  width: 24px;
  height: 24px;
}

.faq-helper__option-content {
  flex: 1;
  min-width: 0;
}

.faq-helper__option-content h3 {
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  color: var(--quantum-navy);
  margin-bottom: var(--space-1);
}

.faq-helper__option-content p {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.faq-helper__option--compact span {
  font-weight: var(--font-medium);
  color: var(--quantum-navy);
}

.faq-helper__option-arrow {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  transition: transform var(--transition-fast);
}

.faq-helper__option:hover .faq-helper__option-arrow {
  transform: translateX(4px);
  color: var(--quantum-coral);
}

/* Back Button */
.faq-helper__back {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  margin-bottom: var(--space-4);
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  cursor: pointer;
  transition: color var(--transition-fast);
}

.faq-helper__back:hover {
  color: var(--quantum-coral);
}

.faq-helper__back svg {
  width: 16px;
  height: 16px;
}

/* Helper Result */
.faq-helper__result {
  text-align: center;
  padding: var(--space-8);
}

.faq-helper__result-icon {
  width: 64px;
  height: 64px;
  color: #22c55e;
  margin-bottom: var(--space-4);
}

.faq-helper__result h3 {
  font-size: var(--text-xl);
  color: var(--quantum-navy);
  margin-bottom: var(--space-2);
}

.faq-helper__result p {
  color: var(--text-secondary);
  margin-bottom: var(--space-6);
}

.faq-helper__result-actions {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
  flex-wrap: wrap;
}

/* Categories Section */
.section--categories {
  padding: var(--space-8) 0;
  background: white;
  border-bottom: 1px solid var(--light-gray);
  position: sticky;
  top: 60px;
  z-index: var(--z-sticky);
}

.faq-categories {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  padding-bottom: var(--space-2);
  scrollbar-width: thin;
}

.faq-category {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: var(--light-gray);
  border: 2px solid transparent;
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.faq-category svg {
  width: 18px;
  height: 18px;
}

.faq-category:hover {
  background: white;
  border-color: var(--quantum-coral);
  color: var(--quantum-coral);
}

.faq-category--active {
  background: var(--quantum-navy);
  color: white;
  border-color: var(--quantum-navy);
}

.faq-category--active:hover {
  background: var(--dark-navy);
  border-color: var(--dark-navy);
  color: white;
}

/* FAQ Content Section */
.section--faq-content {
  padding: var(--space-12) 0;
}

.faq-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-12);
}

/* FAQ Section */
.faq-section {
  scroll-margin-top: 140px;
}

.faq-section--hidden {
  display: none;
}

.faq-section__header {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-4);
  border-bottom: 2px solid var(--light-gray);
  flex-wrap: wrap;
}

.faq-section__icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(30, 58, 95, 0.1);
  border-radius: var(--radius-lg);
  color: var(--quantum-navy);
}

.faq-section__icon svg {
  width: 24px;
  height: 24px;
}

.faq-section__title {
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  color: var(--quantum-navy);
  margin-bottom: var(--space-1);
}

.faq-section__subtitle {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.faq-section__header .badge {
  margin-left: auto;
}

/* FAQ Accordion Overrides */
.faq-section .accordion {
  border: none;
  background: transparent;
}

.faq-section .accordion__item {
  background: white;
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-3);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--light-gray);
  overflow: hidden;
}

.faq-section .accordion__header {
  padding: var(--space-5) var(--space-6);
  font-size: var(--text-base);
}

.faq-section .accordion__header span {
  flex: 1;
}

.faq-section .accordion__content {
  padding: 0 var(--space-6);
}

.faq-section .accordion__item--open .accordion__content {
  padding: var(--space-4) var(--space-6) var(--space-6);
  max-height: 2000px;
  border-top: 1px solid var(--light-gray);
}

.faq-section .accordion__content p {
  margin-bottom: var(--space-4);
  line-height: var(--leading-relaxed);
}

.faq-section .accordion__content p:last-child {
  margin-bottom: 0;
}

.faq-section .accordion__content ul,
.faq-section .accordion__content ol {
  margin-bottom: var(--space-4);
  padding-left: var(--space-6);
}

.faq-section .accordion__content li {
  margin-bottom: var(--space-2);
  line-height: var(--leading-relaxed);
}

/* Highlight in search results */
.faq-section .accordion__item--highlight {
  border-color: var(--quantum-coral);
  box-shadow: 0 0 0 2px rgba(224, 123, 84, 0.2);
}

/* FAQ Tables */
.faq-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--space-4);
  font-size: var(--text-sm);
}

.faq-table th {
  background: var(--quantum-navy);
  color: white;
  padding: var(--space-3) var(--space-4);
  text-align: left;
  font-weight: var(--font-semibold);
}

.faq-table th:first-child {
  border-radius: var(--radius-md) 0 0 0;
}

.faq-table th:last-child {
  border-radius: 0 var(--radius-md) 0 0;
}

.faq-table td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--light-gray);
}

.faq-table tr:last-child td {
  border-bottom: none;
}

.faq-table tr:nth-child(even) {
  background: var(--warm-cream);
}

/* FAQ Examples */
.faq-example {
  background: var(--warm-cream);
  border-left: 4px solid var(--quantum-coral);
  padding: var(--space-4);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin-bottom: var(--space-4);
}

.faq-example ul {
  margin-bottom: 0 !important;
}

/* FAQ Comparison */
.faq-comparison {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.faq-comparison__item {
  background: var(--warm-cream);
  padding: var(--space-4);
  border-radius: var(--radius-md);
}

.faq-comparison__item h4 {
  font-size: var(--text-base);
  color: var(--quantum-navy);
  margin-bottom: var(--space-3);
}

.faq-comparison__item ul,
.faq-comparison__item ol {
  margin-bottom: 0 !important;
}

/* FAQ Callouts */
.faq-important {
  background: #fef2f2;
  border-left: 4px solid #ef4444;
  padding: var(--space-3) var(--space-4);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  color: #991b1b;
}

.faq-tip {
  background: #f0fdf4;
  border-left: 4px solid #22c55e;
  padding: var(--space-3) var(--space-4);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  color: #166534;
}

.faq-highlight {
  background: rgba(224, 123, 84, 0.1);
  border-left: 4px solid var(--quantum-coral);
  padding: var(--space-3) var(--space-4);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

/* CTA Section */
.section--cta {
  background: var(--gradient-hero);
  padding: var(--space-12) 0;
}

.faq-cta {
  text-align: center;
  color: white;
}

.faq-cta__content h2 {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-3);
}

.faq-cta__content p {
  font-size: var(--text-lg);
  opacity: 0.9;
  margin-bottom: var(--space-6);
}

.faq-cta__actions {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: var(--space-6);
}

.faq-cta__tagline {
  font-style: italic;
  opacity: 0.8;
}

/* No Results Message */
.faq-no-results {
  text-align: center;
  padding: var(--space-12);
  color: var(--text-secondary);
}

.faq-no-results svg {
  width: 64px;
  height: 64px;
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}

.faq-no-results h3 {
  font-size: var(--text-xl);
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

/* Responsive */
@media (max-width: 768px) {
  .section--hero-faq {
    padding: var(--space-20) 0 var(--space-8);
  }

  .faq-hero__title {
    font-size: 2rem;
  }

  .faq-hero__subtitle {
    font-size: var(--text-base);
  }

  .faq-search__input {
    font-size: var(--text-base);
    padding: var(--space-3) var(--space-10);
  }

  .faq-helper {
    padding: var(--space-6);
  }

  .faq-helper__steps {
    gap: var(--space-1);
  }

  .faq-helper__step-line {
    width: 20px;
  }

  .faq-helper__step-label {
    display: none;
  }

  .section--categories {
    top: 0;
  }

  .faq-section__header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
  }

  .faq-section__header .badge {
    margin-left: 0;
  }

  .faq-section .accordion__header {
    padding: var(--space-4);
    font-size: var(--text-sm);
  }

  .faq-section .accordion__content {
    padding: 0 var(--space-4);
  }

  .faq-section .accordion__item--open .accordion__content {
    padding: var(--space-3) var(--space-4) var(--space-4);
  }

  .faq-table {
    font-size: var(--text-xs);
  }

  .faq-table th,
  .faq-table td {
    padding: var(--space-2);
  }
}

/* Print Styles */
@media print {
  .section--hero-faq,
  .section--helper,
  .section--categories,
  .section--cta,
  .faq-search,
  .header,
  .footer,
  .back-to-top {
    display: none !important;
  }

  .faq-section .accordion__content {
    max-height: none !important;
    padding: var(--space-4) !important;
  }
}
