/**
 * E20 Fuel Compatibility Checker Styles
 * Designed to work with Danto Hugo theme
 * Inherits theme colors and respects dark/light mode
 */

/* ========================================
   Hero Section
   ======================================== */

.e20-tool__hero {
  padding: 3rem 0 2rem;
  text-align: center;
}

.hero__title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero__description {
  font-size: 1.125rem;
  margin-bottom: 2rem;
  opacity: 0.9;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.hero__stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.stat__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.stat__icon {
  font-size: 1.5rem;
}

.stat__value {
  font-size: 1.25rem;
  font-weight: 700;
}

.stat__label {
  font-size: 0.875rem;
  opacity: 0.7;
}

/* ========================================
   Checker Form Section
   ======================================== */

.e20-tool__form-wrapper {
  padding: 2rem 0;
}

.checker-card {
  max-width: 600px;
  margin: 0 auto;
  padding: 2rem;
  background: var(--background-color, #fff);
  border-radius: 1rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.checker-card__title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  text-align: center;
}

.checker-card__subtitle {
  text-align: center;
  opacity: 0.7;
  margin-bottom: 2rem;
}

.e20-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-label {
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.label-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  background: var(--link-color, #3b82f6);
  color: #fff;
  border-radius: 50%;
  font-size: 0.875rem;
  font-weight: 700;
}

.form-select {
  padding: 0.75rem 1rem;
  border: 2px solid var(--border-color, #e5e7eb);
  border-radius: 0.5rem;
  font-size: 1rem;
  transition: all 0.2s ease;
  background: var(--background-color, #fff);
  color: var(--text-color, #000);
  cursor: pointer;
}

.form-select:focus {
  outline: none;
  border-color: var(--link-color, #3b82f6);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-check-compatibility,
.btn-reset {
  padding: 1rem 2rem;
  background: var(--link-color, #3b82f6);
  color: #fff;
  border: none;
  border-radius: 0.5rem;
  font-size: 1.125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.btn-check-compatibility:hover:not(:disabled),
.btn-reset:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.btn-check-compatibility:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-check-compatibility.btn-ready {
  animation: pulse 2s infinite;
}

.btn-reset {
  background: var(--secondary-color, #6b7280);
}

.btn-icon {
  font-size: 1.25rem;
  transition: transform 0.2s ease;
}

.btn-check-compatibility:hover .btn-icon {
  transform: translateX(4px);
}

.btn-reset:hover .btn-icon {
  transform: rotate(180deg);
}

/* Loading Indicator */
.loading-indicator {
  text-align: center;
  padding: 2rem;
  margin-top: 1rem;
}

.spinner {
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-left-color: var(--link-color, #3b82f6);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.8; }
}

/* ========================================
   Result Section
   ======================================== */

.e20-tool__result {
  padding: 2rem 0;
}

.result-card {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
  background: var(--background-color, #fff);
  border-radius: 1rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.result-header {
  text-align: center;
  padding: 1.5rem;
  border-radius: 0.75rem;
  margin-bottom: 2rem;
}

.result-header--compatible {
  background: #d1fae5;
  border: 2px solid #10b981;
}

.result-header--incompatible {
  background: #fee2e2;
  border: 2px solid #ef4444;
}

.result-header--info {
  background: #dbeafe;
  border: 2px solid #3b82f6;
}

.result-header--warning {
  background: #fef3c7;
  border: 2px solid #f59e0b;
}

.result-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.status-icon {
  font-size: 2rem;
}

.status-text {
  font-size: 1.5rem;
  font-weight: 700;
}

.status-text--success { color: #059669; }
.status-text--danger { color: #dc2626; }
.status-text--info { color: #2563eb; }
.status-text--warning { color: #d97706; }

.result-vehicle {
  font-size: 1.25rem;
  margin: 0;
  opacity: 0.8;
}

/* Result Details Grid */
.result-details {
  margin-bottom: 2rem;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.detail-card {
  padding: 1rem;
  background: var(--secondary-bg-color, #f9fafb);
  border-radius: 0.5rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.detail-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.detail-content {
  flex: 1;
}

.detail-title {
  font-size: 0.875rem;
  font-weight: 600;
  margin: 0 0 0.25rem 0;
  opacity: 0.7;
}

.detail-value {
  font-size: 1.125rem;
  font-weight: 700;
  margin: 0;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.status-badge--success {
  background: #d1fae5;
  color: #059669;
}

.status-badge--danger {
  background: #fee2e2;
  color: #dc2626;
}

.status-badge--info {
  background: #dbeafe;
  color: #2563eb;
}

.status-badge--warning {
  background: #fef3c7;
  color: #d97706;
}

/* Explanation Section */
.result-explanation {
  margin-bottom: 2rem;
}

.explanation-title {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.explanation-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.explanation-list li {
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
}

.explanation-list li::before {
  content: attr(data-icon);
  position: absolute;
  left: 0;
}

/* Action Box */
.result-action {
  margin-bottom: 1.5rem;
}

.action-box {
  padding: 1.5rem;
  border-radius: 0.75rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.action-box--success {
  background: #d1fae5;
  border: 2px solid #10b981;
}

.action-box--danger {
  background: #fee2e2;
  border: 2px solid #ef4444;
}

.action-box--info {
  background: #dbeafe;
  border: 2px solid #3b82f6;
}

.action-box--warning {
  background: #fef3c7;
  border: 2px solid #f59e0b;
}

.action-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.action-content {
  flex: 1;
}

.action-title {
  font-size: 1.125rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
}

.action-text {
  margin: 0 0 0.5rem 0;
}

.action-note {
  margin: 0.5rem 0 0 0;
  font-size: 0.9375rem;
}

/* Notes */
.result-notes {
  padding: 1rem;
  background: var(--secondary-bg-color, #f9fafb);
  border-left: 4px solid var(--link-color, #3b82f6);
  border-radius: 0.25rem;
}

.notes-text {
  margin: 0;
  font-size: 0.9375rem;
}

/* ========================================
   FAQ Section - SEO-Friendly Accordion
   ======================================== */

.e20-tool__faq {
  padding: 2rem 0;
}

/* Content Section Cards (for H2 sections) */
.content-section-card {
  background: var(--background-color, #fff);
  border-radius: 1rem;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: box-shadow 0.3s ease;
}

.content-section-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.content-section-card h2 {
  margin-top: 0;
  margin-bottom: 1.5rem;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--heading-color, #111827);
  border-bottom: 3px solid var(--link-color, #3b82f6);
  padding-bottom: 0.75rem;
}

.content-section-card p,
.content-section-card ul,
.content-section-card ol {
  line-height: 1.7;
  margin-bottom: 1rem;
}

.content-section-card ul,
.content-section-card ol {
  padding-left: 1.5rem;
}

/* FAQ Card Styling */
.faq-card {
  background: var(--background-color, #fff);
  border-radius: 0.75rem;
  margin-bottom: 1rem;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  border: 1px solid var(--border-color, #e5e7eb);
}

.faq-card:hover {
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

/* FAQ Question Header */
.faq-question {
  padding: 1.25rem 1.5rem;
  background: var(--secondary-bg-color, #f9fafb);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all 0.3s ease;
  user-select: none;
}

.faq-question:hover {
  background: var(--hover-bg-color, #f3f4f6);
}

.faq-card.faq-active .faq-question {
  background: var(--link-color, #3b82f6);
  color: #fff;
}

/* FAQ Icon */
.faq-icon {
  font-size: 0.875rem;
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.faq-card.faq-active .faq-icon {
  transform: rotate(90deg);
}

/* FAQ Title */
.faq-title {
  font-size: 1.125rem;
  font-weight: 600;
  flex: 1;
}

/* FAQ Answer Wrapper - SEO Friendly (no display:none) */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
}

.faq-card.faq-active .faq-answer {
  max-height: 5000px; /* Large enough for any content */
  padding: 0 1.5rem 1.5rem 1.5rem;
}

/* FAQ Answer Content */
.faq-answer-content {
  padding-top: 1rem;
}

.faq-answer-content p {
  margin-bottom: 1rem;
  line-height: 1.7;
}

.faq-answer-content p:last-child {
  margin-bottom: 0;
}

.faq-answer-content ul,
.faq-answer-content ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
  line-height: 1.7;
}

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

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

.faq-answer-content th,
.faq-answer-content td {
  padding: 0.75rem;
  border: 1px solid var(--border-color, #e5e7eb);
  text-align: left;
}

.faq-answer-content th {
  background: var(--secondary-bg-color, #f9fafb);
  font-weight: 600;
}

.faq-answer-content strong {
  font-weight: 600;
  color: var(--heading-color, #111827);
}

/* ========================================
   Responsive Design
   ======================================== */

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

  .hero__description {
    font-size: 1rem;
  }

  .hero__stats {
    gap: 1rem;
  }

  .checker-card,
  .content-section-card {
    padding: 1.5rem;
    border-radius: 0.75rem;
  }

  .result-grid {
    grid-template-columns: 1fr;
  }

  .action-box {
    flex-direction: column;
  }

  .faq-question {
    padding: 1rem;
  }

  .faq-title {
    font-size: 1rem;
  }

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

  .content-section-card h2 {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .hero__title {
    font-size: 1.75rem;
  }

  .checker-card,
  .result-card,
  .content-section-card {
    padding: 1rem;
    border-radius: 0.5rem;
  }

  .btn-check-compatibility,
  .btn-reset {
    font-size: 1rem;
    padding: 0.875rem 1.5rem;
  }

  .faq-question {
    padding: 0.875rem 1rem;
    gap: 0.75rem;
  }

  .faq-title {
    font-size: 0.9375rem;
  }

  .content-section-card h2 {
    font-size: 1.375rem;
  }

  .faq-answer-content table {
    font-size: 0.8125rem;
  }

  .faq-answer-content th,
  .faq-answer-content td {
    padding: 0.5rem;
  }
}

/* ========================================
   Dark Mode Support
   ======================================== */

[data-color-mode="dark"] .checker-card,
[data-color-mode="dark"] .result-card,
[data-color-mode="dark"] .content-section-card,
[data-color-mode="dark"] .faq-card {
  background: var(--background-color-alt, #1f2937);
  border-color: var(--border-color, #374151);
}

[data-color-mode="dark"] .detail-card,
[data-color-mode="dark"] .result-notes {
  background: var(--secondary-bg-color, #374151);
}

[data-color-mode="dark"] .faq-question {
  background: var(--secondary-bg-color, #374151);
}

[data-color-mode="dark"] .faq-question:hover {
  background: var(--hover-bg-color, #4b5563);
}

[data-color-mode="dark"] .content-section-card h2 {
  color: var(--heading-color, #f9fafb);
}

[data-color-mode="dark"] .faq-answer-content th {
  background: var(--secondary-bg-color, #374151);
}

[data-color-mode="dark"] .faq-answer-content th,
[data-color-mode="dark"] .faq-answer-content td {
  border-color: var(--border-color, #4b5563);
}

/* Print Styles */
@media print {
  .e20-tool__form-wrapper,
  .btn-reset {
    display: none;
  }

  .e20-tool__result {
    page-break-inside: avoid;
  }
}
