/* faq.css - Polished designs for the FAQ page */

.faq-item {
  border: 1px solid var(--color-border);
  /* Reserve space to prevent layout shift */
  border-radius: 12px;
  margin-bottom: 1.25rem;
  overflow: hidden;
  transition: all 0.3s ease;
  background: white;
}

.faq-item:hover {
  border-color: var(--color-primary);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.faq-item.open {
  border-color: var(--color-primary);
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.05);
}

.faq-question {
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text-bold);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
  cursor: pointer;
  padding: 1.25rem 1.5rem;
  transition: color 0.2s;
  white-space: normal;
  /* Override global button nowrap */
  height: auto;
  /* Ensure height can expand for wrapped text */
  line-height: 1.4;
  min-height: 4rem;
  /* Stabilize height against font-load shifts */
}

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

.faq-item.open .faq-question {
  color: var(--color-primary);
  padding-bottom: 0.75rem;
}

.faq-icon {
  width: 24px;
  height: 24px;
  background: var(--color-bg-body);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  font-size: 0.8rem;
  color: var(--color-primary);
  flex-shrink: 0;
}

.faq-item.open .faq-icon {
  background: var(--color-primary);
  color: white;
  transform: rotate(180deg);
}

.faq-answer {
  display: none;
  padding: 0 1.5rem 1.5rem 1.5rem;
  color: var(--color-text-light);
  font-size: 1rem;
  line-height: 1.6;
}

.faq-item.open .faq-answer {
  display: block;
  animation: slideDown 0.3s ease-out;
}

/* Modern Alert (Support for the Verdict box) */
.modern-alert {
  display: flex;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  margin-bottom: 1rem;
  align-items: flex-start;
  font-size: 0.95rem;
}

.modern-alert.info {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #1e293b;
}

.modern-alert i {
  color: var(--color-primary);
  margin-top: 0.2rem;
  font-size: 1.1rem;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile Optimizations */
@media screen and (max-width: 768px) {
  .faq-question {
    padding: 1rem 1.25rem;
    font-size: 1.05rem;
  }

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

  .faq-icon {
    width: 20px;
    height: 20px;
    font-size: 0.7rem;
  }
}

@media screen and (max-width: 480px) {
  .faq-question {
    padding: 1rem;
    font-size: 1rem;
  }

  .faq-answer {
    padding: 0 1rem 1.25rem 1rem;
  }
}