/* FAQ Page Styles */
/* Styles for FAQ search, accordions, and interactive elements */

/* FAQ Search Container */
.faq-search-container {
  background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
  padding: 1.5rem;
  border-radius: 12px;
  margin: 2rem 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.search-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 1.1rem;
  color: #333;
  margin-bottom: 0.75rem;
}

.search-icon {
  font-size: 1.3rem;
}

.faq-search-input {
  width: 100%;
  padding: 0.875rem 3rem 0.875rem 1rem;
  font-size: 1rem;
  border: 2px solid #ccc;
  border-radius: 8px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  background-color: white;
}

.faq-search-input:focus {
  outline: none;
  border-color: #0066CC;
  box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.search-help {
  display: block;
  margin-top: 0.5rem;
  color: #666;
  font-size: 0.875rem;
  font-style: italic;
}

.search-results-count {
  margin-top: 1rem;
  padding: 0.75rem;
  background-color: #e3f2fd;
  border-left: 4px solid #0066CC;
  border-radius: 4px;
  font-weight: 600;
  color: #0066CC;
}

.clear-search-btn {
  position: absolute;
  top: 50%;
  right: 1rem;
  transform: translateY(-50%);
  padding: 0.5rem 1rem;
  background-color: #dc3545;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.875rem;
  transition: background-color 0.2s ease;
}

.clear-search-btn:hover {
  background-color: #c82333;
}

.clear-search-btn:focus {
  outline: 3px solid rgba(220, 53, 69, 0.5);
  outline-offset: 2px;
}

/* Accordion Controls */
.accordion-controls {
  display: flex;
  gap: 1rem;
  margin: 1.5rem 0;
  flex-wrap: wrap;
}

.accordion-control-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background-color: white;
  border: 2px solid #0066CC;
  border-radius: 8px;
  color: #0066CC;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.accordion-control-btn:hover {
  background-color: #0066CC;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 102, 204, 0.2);
}

.accordion-control-btn:focus {
  outline: 3px solid rgba(0, 102, 204, 0.5);
  outline-offset: 2px;
}

.accordion-control-btn .icon {
  font-size: 1.2rem;
}

/* FAQ Accordion */
.faq-accordion-section {
  margin: 2rem 0;
}

.faq-accordion {
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  margin-bottom: 1rem;
  background: white;
  transition: all 0.2s ease;
}

.faq-accordion:hover {
  border-color: #0066CC;
  box-shadow: 0 2px 8px rgba(0, 102, 204, 0.1);
}

.faq-accordion[open] {
  border-color: #0066CC;
  box-shadow: 0 4px 12px rgba(0, 102, 204, 0.15);
}

.faq-question {
  display: flex;
  align-items: center;
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  user-select: none;
  list-style: none;
  font-weight: 600;
  font-size: 1.1rem;
  color: #333;
  transition: background-color 0.2s ease;
}

.faq-question:hover {
  background-color: #f5f7fa;
}

.faq-question:focus {
  outline: 3px solid rgba(0, 102, 204, 0.5);
  outline-offset: -3px;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.question-icon {
  font-size: 1.5rem;
  margin-right: 1rem;
  flex-shrink: 0;
}

.question-text {
  flex-grow: 1;
}

.accordion-arrow {
  font-size: 0.9rem;
  margin-left: 1rem;
  transition: transform 0.3s ease;
  color: #0066CC;
}

.faq-accordion[open] .accordion-arrow {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 1.5rem 1.5rem 4rem;
  line-height: 1.7;
  color: #444;
}

.faq-answer h4 {
  margin: 1rem 0 0.5rem;
  color: #333;
}

.faq-answer ul, .faq-answer ol {
  margin: 0.75rem 0;
  padding-left: 1.5rem;
}

.faq-answer li {
  margin: 0.5rem 0;
}

.faq-answer table {
  margin: 1rem 0;
  width: 100%;
  border-collapse: collapse;
}

.faq-answer table th,
.faq-answer table td {
  padding: 0.75rem;
  border: 1px solid #ddd;
  text-align: left;
}

.faq-answer table th {
  background-color: #f5f7fa;
  font-weight: 600;
}

/* FAQ Section Styling */
.faq-section {
  margin-bottom: 2rem;
  transition: opacity 0.2s ease;
}

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

.faq-section h2,
.faq-section h3 {
  scroll-margin-top: 2rem;
}

/* Highlight matching text */
.search-highlight {
  background-color: #fff59d;
  padding: 0.125rem 0.25rem;
  border-radius: 2px;
  font-weight: 600;
}

/* No results message */
.no-results-message {
  padding: 2rem;
  text-align: center;
  background-color: #fff3cd;
  border: 2px solid #ffc107;
  border-radius: 8px;
  margin: 2rem 0;
}

.no-results-message h3 {
  color: #856404;
  margin-top: 0;
}

.no-results-message p {
  color: #664d03;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  .faq-search-container {
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
  }

  .search-label {
    color: #e0e0e0;
  }

  .faq-search-input {
    background-color: #2d2d2d;
    color: #e0e0e0;
    border-color: #444;
  }

  .faq-search-input:focus {
    border-color: #4DB8FF;
    box-shadow: 0 0 0 3px rgba(77, 184, 255, 0.2);
  }

  .search-help {
    color: #aaa;
  }

  .search-results-count {
    background-color: #1a2a3a;
    border-left-color: #4DB8FF;
    color: #4DB8FF;
  }

  .search-highlight {
    background-color: #b39c00;
    color: #000;
  }

  .no-results-message {
    background-color: #3a2f1a;
    border-color: #ffc107;
  }

  .no-results-message h3 {
    color: #ffc107;
  }

  .no-results-message p {
    color: #ddd;
  }

  /* Accordion Dark Mode */
  .accordion-control-btn {
    background-color: #2d2d2d;
    border-color: #4DB8FF;
    color: #4DB8FF;
  }

  .accordion-control-btn:hover {
    background-color: #0066CC;
    color: white;
  }

  .faq-accordion {
    background-color: #2d2d2d;
    border-color: #444;
  }

  .faq-accordion:hover {
    border-color: #4DB8FF;
  }

  .faq-accordion[open] {
    border-color: #4DB8FF;
  }

  .faq-question {
    color: #e0e0e0;
  }

  .faq-question:hover {
    background-color: #3a3a3a;
  }

  .accordion-arrow {
    color: #4DB8FF;
  }

  .faq-answer {
    color: #bbb;
  }

  .faq-answer h4 {
    color: #e0e0e0;
  }

  .faq-answer table th {
    background-color: #3a3a3a;
  }

  .faq-answer table th,
  .faq-answer table td {
    border-color: #555;
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  .faq-search-input,
  .clear-search-btn,
  .faq-section,
  .accordion-control-btn,
  .faq-accordion,
  .accordion-arrow {
    transition: none;
  }

  .accordion-control-btn:hover {
    transform: none;
  }
}

/* Mobile Responsive */
@media (max-width: 600px) {
  .faq-search-container {
    padding: 1rem;
  }

  .clear-search-btn {
    position: static;
    width: 100%;
    margin-top: 0.75rem;
  }

  .faq-search-input {
    padding-right: 1rem;
  }

  .accordion-controls {
    flex-direction: column;
  }

  .accordion-control-btn {
    width: 100%;
    justify-content: center;
  }

  .faq-question {
    font-size: 1rem;
    padding: 1rem 1.25rem;
  }

  .question-icon {
    font-size: 1.3rem;
    margin-right: 0.75rem;
  }

  .faq-answer {
    padding: 0 1.25rem 1.25rem 3rem;
    font-size: 0.95rem;
  }
}
