/* Compare page specific styles */

/* Header with country selector */
.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.country-selector {
  display: flex;
  align-items: center;
  gap: 8px;
}

.country-selector label {
  font-size: 0.9rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.country-selector select {
  padding: 8px 32px 8px 12px;
  font-size: 0.9rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23888' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}

.country-selector select:hover {
  border-color: #999;
}

.country-selector select:focus {
  outline: none;
  border-color: var(--accent);
}

/* Price fallback indicator */
.price-fallback {
  cursor: help;
  color: var(--text-muted);
}

/* Card price tag in header */
.ev-card-price-tag {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  letter-spacing: -0.01em;
}

/* Model tagline - fixed height for consistent card layout */
.ev-card-tagline {
  font-size: 0.85rem;
  font-style: italic;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
  /* Fixed total height including padding - border always at same position */
  box-sizing: border-box;
  height: 150px;
  padding-bottom: 16px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
}

/* Features row */
.ev-card-features {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.feature {
  display: inline-block;
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 100px;
  background: var(--bg);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.feature-good {
  background: rgba(22, 163, 74, 0.1);
  color: var(--green);
  border-color: rgba(22, 163, 74, 0.2);
}

.feature-bad {
  background: rgba(220, 38, 38, 0.1);
  color: var(--red);
  border-color: rgba(220, 38, 38, 0.2);
}

.feature-neutral {
  background: var(--bg);
  color: var(--text-muted);
}

/* Brand info on cards (short sentences) */
.ev-card-brand-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.brand-info-item {
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--text-muted);
}

.brand-info-label {
  font-weight: 600;
  color: var(--text);
  margin-right: 4px;
}

.brand-info-text {
  color: var(--text-muted);
}

/* Brand info in modal (long sentences) */
.modal-brand-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-brand-item {
  padding: 16px;
  background: var(--bg);
  border-radius: 8px;
}

.modal-brand-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 600;
}

.modal-brand-text {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text);
}

/* Badges */
.badge {
  display: inline-block;
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.02em;
  vertical-align: middle;
}

.badge-chinese {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
}

.badge-good {
  background: rgba(22, 163, 74, 0.12);
  color: var(--green);
}

.badge-neutral {
  background: rgba(100, 100, 100, 0.12);
  color: var(--text-muted);
}

.badge-bad {
  background: rgba(220, 38, 38, 0.12);
  color: var(--red);
}

.badge-coming-soon {
  background: rgba(59, 130, 246, 0.12);
  color: #3b82f6;
}

/* Image wrapper for ribbon overlay */
.ev-card-image-wrapper {
  position: relative;
}

/* Coming soon ribbon on image */
.ev-card-ribbon {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(59, 130, 246, 0.9);
  color: white;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* Modal status badge */
.modal-status {
  margin-top: 6px;
}

/* Modal grid */
.modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 16px;
  background: var(--bg);
  border-radius: 8px;
}

.modal-grid > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Override card without image */
.ev-card .ev-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

/* Push brand info to bottom of card */
.ev-card .ev-card-brand-info {
  margin-top: auto;
}

/* FAQ Section */
.faq-section {
  margin-top: 64px;
  margin-bottom: 48px;
  max-width: 800px;
}

.faq-section h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 24px;
  color: var(--text);
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-item:first-of-type {
  border-top: 1px solid var(--border);
}

.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  text-align: left;
  gap: 16px;
}

.faq-question:hover {
  color: var(--accent);
}

.faq-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  position: relative;
}

.faq-icon::before,
.faq-icon::after {
  content: '';
  position: absolute;
  background: var(--text-muted);
  transition: transform 0.2s ease;
}

.faq-icon::before {
  width: 12px;
  height: 2px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.faq-icon::after {
  width: 2px;
  height: 12px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.faq-question[aria-expanded="true"] .faq-icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.faq-answer {
  display: none;
  padding-bottom: 20px;
}

.faq-answer.open {
  display: block;
}

.faq-answer p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin: 0;
}

/* Responsive */
@media (max-width: 640px) {
  .header-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .country-selector {
    width: 100%;
    justify-content: space-between;
  }

  .ev-card-features {
    gap: 6px;
  }

  .feature {
    font-size: 0.7rem;
    padding: 3px 8px;
  }

  .brand-info-item {
    font-size: 0.75rem;
  }

  .modal-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .modal-brand-item {
    padding: 12px;
  }

  .modal-brand-text {
    font-size: 0.85rem;
  }
}
