/*
 * Dark theme overrides for the motor flows: vehicle (index, personal, plans, files, inspection, finalize,
 * success, error) and renewal (which reuses vehicle.css). Loaded after vehicle.css.
 * Colours come from the --tk-* tokens in takaful.css. Brand gradients, green/blue buttons and the
 * discount badge keep their colours and white text.
 * Before the marker: light-mode class that replaces a former inline colour (identical light output).
 */
.vehicle-summary-row.vehicle-summary-row--note { color: #9ca3af; }

/* Dark mode */
[data-theme="dark"] .vehicle-summary-row.vehicle-summary-row--note { color: var(--tk-muted); }

/* Summary + quote cards */
[data-theme="dark"] .vehicle-ui .vehicle-section-divider { background: var(--tk-line); }
[data-theme="dark"] .vehicle-ui .vehicle-summary-card,
[data-theme="dark"] .vehicle-ui .your-quote-cover,
[data-theme="dark"] .vehicle-ui .q-veh-item,
[data-theme="dark"] .vehicle-ui .vehicle-plan-compare,
[data-theme="dark"] .vehicle-ui .motor-index-fact {
  background: var(--tk-surface-raised);
  border-color: var(--tk-card-border);
  box-shadow: 0 14px 30px var(--tk-shadow-color);
}
[data-theme="dark"] .vehicle-ui .vehicle-summary-card,
[data-theme="dark"] .vehicle-ui .motor-index-fact { box-shadow: none; }
[data-theme="dark"] .vehicle-ui .vehicle-summary-card__title { border-bottom-color: var(--tk-line); }
[data-theme="dark"] .vehicle-ui .vehicle-summary-row { color: var(--tk-ink); border-bottom-color: var(--tk-line); }
[data-theme="dark"] .vehicle-ui .vehicle-summary-row__label { color: var(--tk-muted); }
[data-theme="dark"] .vehicle-ui .vehicle-contribution { border-top-color: var(--tk-line); }
[data-theme="dark"] .vehicle-ui .vehicle-contribution__label,
[data-theme="dark"] .vehicle-ui .vehicle-kicker,
[data-theme="dark"] .vehicle-ui .vehicle-plan-card__name,
[data-theme="dark"] .vehicle-ui .form-sec-hd h4,
[data-theme="dark"] .vehicle-ui .form-sec-input-hd h4 { color: var(--tk-ink); }
[data-theme="dark"] .vehicle-ui .vehicle-contribution__amount,
[data-theme="dark"] .vehicle-ui .vehicle-plan-card__price,
[data-theme="dark"] .vehicle-ui .q-veh-item .q-veh-title h4,
[data-theme="dark"] .vehicle-ui .motor-index-hero__price strong,
[data-theme="dark"] .vehicle-ui .motor-index-help a,
[data-theme="dark"] .vehicle-ui .vehicle-plan-table__price-note,
[data-theme="dark"] .vehicle-ui .vehicle-plan-sticky-summary__eyebrow { color: var(--tk-green-text); }
[data-theme="dark"] .vehicle-ui .vehicle-contribution__currency { color: var(--tk-muted); }
[data-theme="dark"] .vehicle-ui .radio-input,
[data-theme="dark"] .vehicle-ui .motor-index-check,
[data-theme="dark"] .vehicle-ui .custom-plan-option { color: var(--tk-ink); }

/* Plan cards + plan type cards */
[data-theme="dark"] .vehicle-ui .vehicle-plan-card,
[data-theme="dark"] .vehicle-ui .plan-type-card {
  background: var(--tk-surface-raised);
  border-color: var(--tk-border-neutral);
}
[data-theme="dark"] .vehicle-ui .vehicle-plan-card:hover,
[data-theme="dark"] .vehicle-ui .vehicle-plan-card.is-selected {
  background: var(--tk-accent-tint);
  border-color: var(--tk-green-text);
  box-shadow: 0 8px 20px var(--tk-shadow-color);
}
[data-theme="dark"] .vehicle-ui .plan-type-card--active { background: var(--tk-accent-tint); border-color: var(--tk-green-text); }
[data-theme="dark"] .vehicle-ui .plan-type-card--switch { border-color: var(--tk-green-text); }
[data-theme="dark"] .vehicle-ui .plan-type-card--switch:hover { box-shadow: 0 4px 16px var(--tk-shadow-color); }
[data-theme="dark"] .vehicle-ui .plan-type-card__body h4 { color: var(--tk-ink); }
[data-theme="dark"] .vehicle-ui .plan-type-card__body p,
[data-theme="dark"] .vehicle-ui .custom-plan-hint { color: var(--tk-muted); }

/* Quote vehicle item */
[data-theme="dark"] .vehicle-ui .your-quote-hd h2,
[data-theme="dark"] .vehicle-ui .q-veh-item .vehicle-value .value-amount,
[data-theme="dark"] .vehicle-ui .q-veh-item .insurance-info .insurance-type,
[data-theme="dark"] .vehicle-ui .q-veh-item .vehicle-dtls .vehicle-name { color: var(--tk-ink); }
[data-theme="dark"] .vehicle-ui .your-quote-hd p,
[data-theme="dark"] .vehicle-ui .q-veh-item .vehicle-value .value-currency { color: var(--tk-muted); }
[data-theme="dark"] .vehicle-ui .q-veh-item .vehicle-value .value-icon,
[data-theme="dark"] .vehicle-ui .q-veh-item .insurance-info .insurance-icon { background: var(--tk-accent-tint); color: var(--tk-green-text); }
[data-theme="dark"] .vehicle-ui .q-veh-item .q-veh-nav .btn-edit,
[data-theme="dark"] .vehicle-ui .vehicle-plan-sticky-summary .btn-summary-toggle {
  background: var(--tk-surface-raised);
  border-color: var(--tk-border-neutral);
  color: var(--tk-green-text);
}
[data-theme="dark"] .vehicle-ui .q-veh-item .q-veh-nav .btn-edit:hover,
[data-theme="dark"] .vehicle-ui .q-veh-item .q-veh-nav .btn-edit:focus { background: linear-gradient(90deg, #139bd3 0%, #98c829 100%); color: var(--tk-on-brand); }

/* Plan comparison table, tabs and panels */
[data-theme="dark"] .vehicle-ui .vehicle-plan-compare__head h3 { color: var(--tk-ink); }
[data-theme="dark"] .vehicle-ui .vehicle-plan-compare__head p { color: var(--tk-muted); }
[data-theme="dark"] .vehicle-ui .vehicle-plan-table-wrap,
[data-theme="dark"] .vehicle-ui .vehicle-plan-panel { background: var(--tk-surface-raised); border-color: var(--tk-table-border); }
[data-theme="dark"] .vehicle-ui .vehicle-plan-table th,
[data-theme="dark"] .vehicle-ui .vehicle-plan-table td { border-bottom-color: var(--tk-table-border); border-inline-end-color: var(--tk-table-border); }
[data-theme="dark"] .vehicle-ui .vehicle-plan-table thead th,
[data-theme="dark"] .vehicle-ui .vehicle-plan-panel__head { background: var(--tk-table-head-bg); }
[data-theme="dark"] .vehicle-ui .vehicle-plan-table tbody th,
[data-theme="dark"] .vehicle-ui .vehicle-plan-panel__row,
[data-theme="dark"] .vehicle-ui .vehicle-plan-table__plan,
[data-theme="dark"] .vehicle-ui .vehicle-plan-table__name,
[data-theme="dark"] .vehicle-ui .vehicle-plan-table__price,
[data-theme="dark"] .vehicle-ui .vehicle-plan-table__price-current { color: var(--tk-ink); }
[data-theme="dark"] .vehicle-ui .vehicle-plan-panel__row { border-top-color: var(--tk-table-border); }
[data-theme="dark"] .vehicle-ui .vehicle-plan-table th.is-selected,
[data-theme="dark"] .vehicle-ui .vehicle-plan-table td.is-selected {
  background: var(--tk-accent-tint);
  border-inline-start-color: rgba(152, 200, 41, 0.6);
  border-inline-end-color: rgba(152, 200, 41, 0.6);
}
[data-theme="dark"] .vehicle-ui .vehicle-plan-table__badge { background: var(--tk-accent-tint); color: var(--tk-green-text); }
[data-theme="dark"] .vehicle-ui .vehicle-plan-table__desc,
[data-theme="dark"] .vehicle-ui .vehicle-plan-table__price-original,
[data-theme="dark"] .vehicle-ui .vehicle-plan-table__price-detail,
[data-theme="dark"] .vehicle-ui .vehicle-feature-value,
[data-theme="dark"] .vehicle-ui .vehicle-feature-price { color: var(--tk-muted); }
[data-theme="dark"] .vehicle-ui .vehicle-plan-table__select { border-color: var(--tk-green-text); color: var(--tk-green-text); }
[data-theme="dark"] .vehicle-ui .vehicle-plan-table th.is-selected .vehicle-plan-table__select { background: linear-gradient(90deg, #139bd3, #98c829); color: var(--tk-on-brand); }
[data-theme="dark"] .vehicle-ui .vehicle-feature-value--yes i { background: var(--tk-accent-tint); color: var(--tk-green-text); }
[data-theme="dark"] .vehicle-ui .vehicle-feature-value--no i { background: var(--tk-table-stripe); color: var(--tk-muted); }
[data-theme="dark"] .vehicle-ui .vehicle-plan-tab { background: var(--tk-surface-raised); border-color: var(--tk-line); color: var(--tk-muted); }
[data-theme="dark"] .vehicle-ui .vehicle-plan-tab.is-active { background: linear-gradient(90deg, #139bd3, #98c829); color: var(--tk-on-brand); }

/* Sticky summary */
[data-theme="dark"] .vehicle-ui .vehicle-plan-sticky-summary {
  background: var(--tk-surface-raised);
  border-color: var(--tk-card-border);
  box-shadow: 0 18px 42px var(--tk-shadow-color);
}
[data-theme="dark"] .vehicle-ui .vehicle-plan-dependent strong,
[data-theme="dark"] .vehicle-ui .vehicle-plan-sticky-summary__total span:not(.summary-discount-amount__original) { color: var(--tk-ink); }
[data-theme="dark"] .vehicle-ui .vehicle-plan-dependent span,
[data-theme="dark"] .vehicle-ui .vehicle-plan-sticky-summary__total small,
[data-theme="dark"] .vehicle-ui .vehicle-plan-summary-sidebar__vat { color: var(--tk-muted); }
/* The near-black continue button would vanish on the dark card, so it takes the brand gradient. */
[data-theme="dark"] .vehicle-ui .vehicle-plan-sticky-summary .btn-continue { background: linear-gradient(90deg, #139bd3, #98c829); color: var(--tk-on-brand); }

/* Index step (stepper + hero) */
[data-theme="dark"] .vehicle-ui .motor-index-form-hd h1,
[data-theme="dark"] .vehicle-ui .motor-index-hero__text h2,
[data-theme="dark"] .vehicle-ui .motor-index-step.is-active .motor-index-step__label,
[data-theme="dark"] .vehicle-ui .motor-index-hero__price,
[data-theme="dark"] .vehicle-ui .motor-index-fact p { color: var(--tk-ink); }
[data-theme="dark"] .vehicle-ui .motor-index-form-hd p,
[data-theme="dark"] .vehicle-ui .motor-index-hero__note,
[data-theme="dark"] .vehicle-ui .motor-index-hero__tc,
[data-theme="dark"] .vehicle-ui .motor-index-step__label,
[data-theme="dark"] .vehicle-ui .motor-index-step.is-done .motor-index-step__label { color: var(--tk-muted); }
[data-theme="dark"] .vehicle-ui .motor-index-step__num { background: var(--tk-line); color: var(--tk-muted); }
[data-theme="dark"] .vehicle-ui .motor-index-step.is-active .motor-index-step__num,
[data-theme="dark"] .vehicle-ui .motor-index-step.is-done .motor-index-step__num { background: var(--takaful-primary); color: var(--tk-on-brand); }
[data-theme="dark"] .vehicle-ui .motor-index-step__line { background: var(--tk-line); }
[data-theme="dark"] .vehicle-ui .motor-index-step__line.is-done { background: var(--takaful-primary); }

/* Success page */
[data-theme="dark"] .vehicle-ui .motor-success-banner {
  background: linear-gradient(120deg, rgba(95, 208, 143, 0.14) 0%, rgba(95, 208, 143, 0.06) 100%);
  border-color: rgba(95, 208, 143, 0.35);
}
[data-theme="dark"] .vehicle-ui .motor-success-banner__body h1,
[data-theme="dark"] .vehicle-ui .motor-success-details-grid__value,
[data-theme="dark"] .vehicle-ui .motor-success-support__title,
[data-theme="dark"] .vehicle-ui .motor-success-support__text strong,
[data-theme="dark"] .vehicle-ui .motor-success-upsell__body h4 { color: var(--tk-ink); }
[data-theme="dark"] .vehicle-ui .motor-success-banner__body h1 span { color: var(--tk-muted); }
[data-theme="dark"] .vehicle-ui .motor-success-banner__body p,
[data-theme="dark"] .vehicle-ui .motor-success-policy-hero__number { color: var(--tk-green-text); }
[data-theme="dark"] .vehicle-ui .motor-success-policy-hero__label,
[data-theme="dark"] .vehicle-ui .motor-success-details-grid__label,
[data-theme="dark"] .vehicle-ui .motor-success-support__text span { color: var(--tk-muted); }
[data-theme="dark"] .vehicle-ui .motor-success-orange-row { color: #fbbf24; }
[data-theme="dark"] .vehicle-ui .motor-success-action-btn--secondary { background: transparent; color: #fbbf24; border-color: rgba(251, 191, 36, 0.6); }
[data-theme="dark"] .vehicle-ui .motor-success-action-btn--secondary:hover { background: rgba(251, 191, 36, 0.12); color: #fcd34d; }
[data-theme="dark"] .vehicle-ui .motor-success-action-btn--ghost { color: var(--tk-ink); border-color: var(--tk-line); }
[data-theme="dark"] .vehicle-ui .motor-success-action-btn--ghost:hover { background: var(--tk-accent-tint); color: var(--tk-ink); }
[data-theme="dark"] .vehicle-ui .motor-success-divider { background: var(--tk-line); }
[data-theme="dark"] .vehicle-ui .motor-success-details-grid { border-color: var(--tk-line); }
[data-theme="dark"] .vehicle-ui .motor-success-details-grid__item,
[data-theme="dark"] .vehicle-ui .motor-success-details-grid__item:nth-child(3n) { border-right-color: var(--tk-line); border-bottom-color: var(--tk-line); }
[data-theme="dark"] .vehicle-ui .motor-success-support__title,
[data-theme="dark"] .vehicle-ui .motor-success-upsell { border-bottom-color: var(--tk-line); }
[data-theme="dark"] .vehicle-ui .motor-success-support__icon { background: var(--tk-accent-tint); }
[data-theme="dark"] .vehicle-ui .motor-success-support__icon--amber { background: rgba(251, 191, 36, 0.14); color: #fbbf24; }

/* Finalize documents, upload badges, PDF preview frame */
[data-theme="dark"] .vehicle-ui .motor-doc-uploaded-badge { background: var(--tk-accent-tint); color: var(--tk-green-text); }
[data-theme="dark"] .vehicle-ui .motor-finalize-doc-card { background: var(--tk-surface-raised); border-color: var(--tk-line); }
[data-theme="dark"] .vehicle-ui .motor-finalize-doc-card__label { background: var(--tk-surface-alt); color: var(--tk-ink); border-bottom-color: var(--tk-line); }
[data-theme="dark"] .vehicle-ui .motor-finalize-doc-card__pdf-link { color: var(--tk-link); }
[data-theme="dark"] .vehicle-ui .motor-finalize-doc-card__pdf-link:hover { color: var(--tk-link-hover); }
[data-theme="dark"] .vehicle-ui .motor-finalize-doc-card__pdf-link i { color: var(--tk-invalid); }
/* PDF viewers render a white page; keep a white backing so it does not blend with the dark card. */
[data-theme="dark"] .vehicle-ui .motor-finalize-doc-card__preview iframe,
[data-theme="dark"] .vehicle-ui .takaful-file-preview iframe { background: #fff; border-radius: 6px; }

/* Loading skeleton */
[data-theme="dark"] .vehicle-ui .skeleton-bar { background-image: linear-gradient(90deg, #363c3a 25%, #434a47 50%, #363c3a 75%); }

/* Terms link inside the motor index checkboxes (it used Bootstrap's default blue, low contrast on the dark card) */
[data-theme="dark"] .vehicle-ui .motor-index-check a { color: var(--tk-link); }
[data-theme="dark"] .vehicle-ui .motor-index-check a:hover { color: var(--tk-link-hover); }
