/* =========================================================
   Legacy Solar | EV calculator site theme
   Loaded after ev.css. Makes the EV calculator match the main
   website (colours, Poppins, buttons, header and footer) without
   changing ev.css itself. Same approach as calculator/site-theme.css.
   ========================================================= */

/* ---------- 1. Site tokens win on the page itself ---------- */
:root {
  --blue: #4FAFE0;
  --navy: #0A2038;
  --ink: #0A2038;
  --muted: #6b7c8f;
  --line: #dcebf5;
  font: 16px/1.7 "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background: #fff;
}
body.ev-page { background: var(--ice-50); }

/* ---------- 2. Calculator tokens, mapped to the brand ---------- */
.ev-page .workspace {
  --blue: #1f7fb5;
  --navy: #0A2038;
  --ink: #0A2038;
  --muted: #5b6b7d;
  --line: #dcebf5;
  --solar-blue: #1f7fb5;
  --solar-blue-dark: #0A2038;
  --solar-blue-light: #e3f4fd;
  --solar-blue-paper: #f2faff;
  --solar-blue-line: #cfe2ee;
  --solar-blue-muted: #3d4f63;
  --font-display: "Poppins", system-ui, sans-serif;
  --font-body: "Poppins", system-ui, sans-serif;
  --font-label: "Poppins", system-ui, sans-serif;
  --display-tracking: -.025em;
  --control-radius: 999px;
  font-family: var(--font-body);
  color: var(--ink);
}

/* ---------- 3. Keep the website header and footer exactly as elsewhere ---------- */
.site-header .brand { gap: 0; font-size: inherit; color: inherit; letter-spacing: 0; line-height: 1.7; }
.site-header .brand img { width: auto; height: 42px; }
.site-header .header-phone { display: inline-flex; align-items: center; gap: 8px; min-height: 0; font-size: .95rem; font-weight: 600; color: var(--ink); white-space: nowrap; }
.site-header .header-phone span { display: inline; color: inherit; font-size: inherit; }
.site-header button { min-height: 0; }
.site-header .btn, .site-footer a { text-decoration: none; }
.site-footer p { margin: 0 0 1em; line-height: 1.7; }
@media (max-width: 1180px) {
  .site-header .brand img { height: 36px; }
  .site-header .header-phone { display: none; }
}
@media (min-width: 1181px) and (max-width: 1359px) {
  .site-header .header-phone { width: 44px; height: 44px; justify-content: center; padding: 0; }
  .site-header .header-phone span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
@media (max-width: 420px) { .site-header .brand img { height: 30px; } }

/* The progress sidebar sits under the sticky site header. */
@media (min-width: 901px) {
  .ev-page .journey { top: var(--header-h); min-height: calc(100dvh - var(--header-h)); }
}

/* ---------- 4. Stop general website styles leaking into the calculator ---------- */
.ev-page .workspace .card { transition: none; }
.ev-page .workspace .card:hover { transform: none; }
.ev-page .workspace .card::after { content: none; }
.ev-page .workspace .eyebrow::before { content: none; }
.ev-page .workspace p a, .ev-page .workspace li a { color: var(--blue); }
.ev-page .workspace h1, .ev-page .workspace h2, .ev-page .workspace h3 { color: var(--ink); }

/* ---------- 5. Brand buttons ---------- */
.ev-page .workspace .primary {
  background: linear-gradient(135deg, #1b76aa 0%, #186fa1 50%, #145f8c 100%);
  border: 0; color: #fff; font-weight: 600; border-radius: 999px;
  box-shadow: 0 12px 28px -12px rgba(79, 175, 224, .6);
}
.ev-page .workspace .primary:hover { background: linear-gradient(135deg, #186fa1 0%, #145f8c 55%, #11547c 100%); }
.ev-page .workspace .secondary { border: 2px solid var(--blue-600, #2f97cf); color: var(--blue-700, #1f7fb5); background: #fff; font-weight: 600; }
.ev-page .workspace .secondary:hover { background: var(--ice-50); }
.ev-page .workspace .text-button { color: var(--blue-700, #1f7fb5); font-weight: 600; }

.ev-page .workspace input:not([type="range"]):not([type="checkbox"]):not([type="radio"]),
.ev-page .workspace select, .ev-page .workspace textarea {
  border-color: #cfe2ee; border-radius: 12px; background-color: #fbfdff;
}
.ev-page .workspace input[type="range"], .ev-page .workspace input[type="checkbox"] { accent-color: #1f7fb5; }

/* ---------- 6. Heading sizes for Poppins (sizes were set for a tall, narrow display font) ---------- */
.ev-page .workspace h1 { font-weight: 700; font-size: clamp(2.2rem, 6vw, 3.4rem); line-height: 1.08; }
.ev-page .workspace h2 { font-weight: 600; letter-spacing: -.015em; }

/* Phones: stack Brand and Model so the choices are not cut off */
@media (max-width: 520px) { .ev-page .two-fields { grid-template-columns: 1fr; } }

/* Steps 2 to 5 use <h2 class="panel-title"> so the page has one H1 for search engines.
   This keeps them looking the same as the first step's heading. */
.ev-page .workspace h2.panel-title { font-weight: 700; font-size: clamp(2.2rem, 6vw, 3.4rem); line-height: 1.08; letter-spacing: -.025em; margin: 0; text-wrap: balance; }
.ev-page .workspace h2.panel-title em { font-style: normal; color: var(--blue); }
.ev-page .workspace h2.panel-title:focus { outline: none; }
