/*!
 * PSP Vehicle Match. Scoped to .psp-vm. Buttons and tags use the theme's own classes (.button, .subtitle),
 * so they match the site and follow it if it changes. Everything else is vm- prefixed, with values taken
 * from the live theme: car cards from its product card, answer choices and form fields from its Gravity
 * Forms styles, the price from the vehicle page's weekly-cost panel. Light only, like the site.
 */
.psp-vm {
	--vm-blue: #0A50D3;
	--vm-blue-wash: #EBF2FF;
	--vm-lime: #A1E220;
	--vm-lime-cream: #DBEE7E;
	--vm-porcelain: #FFFFFA;
	--vm-ink: #09101F;
	--vm-ink-70: rgba(9, 16, 31, .7);
	--vm-fill: rgba(9, 16, 31, .03);       /* theme form fields and choices */
	--vm-fill-hover: rgba(9, 16, 31, .06);
	--vm-fill-strong: rgba(9, 16, 31, .08); /* theme checkbox */
	--vm-line: #9EA7B7;                    /* theme card outline and outline buttons */
	--vm-rule: rgba(9, 16, 31, .12);
	--vm-error: #B42318;
	--vm-warn-bg: #FFF3D6;
	--vm-warn-ink: #6B4500;
	--vm-ok-bg: #EAF8C9;
	--vm-ok-ink: #2C4300;
	--vm-light: "Outfit-Light", "Outfit", "Segoe UI", system-ui, -apple-system, sans-serif;
	--vm-regular: "Outfit-Regular", "Outfit", "Segoe UI", system-ui, -apple-system, sans-serif;
	--vm-medium: "Outfit-Medium", "Outfit", "Segoe UI", system-ui, -apple-system, sans-serif;
	--vm-semibold: "Outfit-SemiBold", "Outfit", "Segoe UI", system-ui, -apple-system, sans-serif;
	--vm-bold: "Outfit-Bold", "Outfit", "Segoe UI", system-ui, -apple-system, sans-serif;
	--vm-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
	--vm-r-card: 16px;
	--vm-r-ctl: 8px;
	--vm-shadow: 0 0 60px rgba(0, 0, 0, .1); /* the vehicle page's weekly-cost panel */
	--vm-tick: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 8'%3E%3Cpath d='M1 4.2l2.6 2.6L9 1.2' fill='none' stroke='%23FFFFFA' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
@media (min-width: 1080px) {
	.psp-vm { --vm-r-card: 24px; --vm-r-ctl: 14px; }
}
.psp-vm [hidden] { display: none !important; }

/*
 * Element resets, below the hero only. Each has the same weight as the theme's own element rules (and loads
 * after them), so any class wins over it: ours, and the theme's .button and .subtitle.
 */
:where(.psp-vm-stage) *, :where(.psp-vm-stage) *::before, :where(.psp-vm-stage) *::after { box-sizing: border-box; }
:where(.psp-vm-stage) h2, :where(.psp-vm-stage) h3, :where(.psp-vm-stage) h4 { margin: 0; font-family: var(--vm-bold); font-weight: 400; line-height: 1.15; letter-spacing: 0; text-transform: none; color: inherit; text-wrap: balance; }
:where(.psp-vm-stage) p, :where(.psp-vm-stage) li, :where(.psp-vm-stage) figure { margin: 0; }
:where(.psp-vm-stage) ul { margin: 0; padding: 0; list-style: none; }
:where(.psp-vm-stage) a { color: var(--vm-blue); }
:where(.psp-vm-stage) button { font: inherit; color: inherit; letter-spacing: inherit; text-transform: none; margin: 0; }
:where(.psp-vm-stage) strong { font-family: var(--vm-semibold); font-weight: 400; }
.psp-vm-stage :focus-visible { outline: 2px solid var(--vm-blue); outline-offset: 2px; }
.psp-vm-stage [tabindex="-1"]:focus { outline: none; } /* headings the quiz moves focus to, for screen readers */

/* Theme buttons and tags inside the quiz */
.psp-vm .button-container { display: block; }
.psp-vm .button[disabled] { opacity: .45; cursor: not-allowed; pointer-events: none; }
.psp-vm .vm-tag { margin: 0; justify-self: start; align-self: start; }

/* Hero: the theme's s-hero-base, with room underneath for the card to overlap the band */
.psp-vm-hero .s-hero-base__text { padding-bottom: 128px; }
.psp-vm-hero .psp-vm-lede { color: rgba(255, 255, 250, .86); }
.psp-vm.is-results .psp-vm-lede { display: none; }
.psp-vm.is-results .psp-vm-hero .s-hero-base__text { padding-bottom: 112px; }

.psp-vm-stage { position: relative; z-index: 10; margin-top: -96px; padding-bottom: 64px; color: var(--vm-ink); font-family: var(--vm-light); font-size: 16px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
.psp-vm--no-hero .psp-vm-stage { margin-top: 0; padding-top: 24px; }
.vm-wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding-inline: 20px; }
.vm-narrow { max-width: 860px; }

.vm-card { background: var(--vm-porcelain); border-radius: var(--vm-r-card); box-shadow: var(--vm-shadow); }

/* In a theme pop-up ([psp_vehicle_match mode="popup"]): the pop-up is the card */
.psp-vm--popup .psp-vm-stage { margin-top: 0; padding: 0; }
.psp-vm--popup .vm-wrap { max-width: none; padding-inline: 0; }
.psp-vm--popup .vm-card { background: transparent; border-radius: 0; box-shadow: none; }
.psp-vm--popup .vm-quiz { padding: 0; }
.psp-vm--popup .vm-q-head h2 { font-size: clamp(20px, 1.6vw, 24px); } /* below the pop-up's own title */
* + .psp-vm--popup { margin-top: 20px; } /* after the pop-up's intro line */
/* The Pop-ups tool prints the Intro, and so the quiz, inside the pop-up's header, which has a rule and space below */
.modal__header:has(> .psp-vm--popup) { border-bottom: 0; padding-bottom: 0; margin-bottom: 0; }
.vm-loading { color: var(--vm-ink-70); padding: 12px 0; }

/* Links: the theme's "↗ Show variants" style */
.vm-link { display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; padding: 6px 0; font-family: var(--vm-regular); font-size: 16px; line-height: 1.35; color: var(--vm-ink); text-decoration: none; cursor: pointer; transition: color .15s linear; }
.vm-link:hover { color: var(--vm-blue); }
.vm-link svg { width: 12px; height: 12px; flex: none; }

/* Quiz */
.vm-quiz { padding: 28px clamp(18px, 4vw, 40px) 26px; display: grid; gap: 22px; }
.vm-progress { display: grid; gap: 12px; }
.vm-progress-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 14px; color: var(--vm-ink-70); }
.vm-bar { height: 6px; background: var(--vm-fill-strong); border-radius: 99px; overflow: hidden; }
.vm-bar span { display: block; height: 100%; background: var(--vm-blue); border-radius: 99px; transition: width .3s ease; }
.vm-q-head { display: grid; gap: 8px; }
.vm-q-head h2 { font-size: clamp(22px, 2.2vw, 30px); line-height: 1.2; outline: none; }
.vm-q-head p { color: var(--vm-ink-70); max-width: 62ch; }

/* Answer choices: the theme's form choices (grey fill, no outline, circle on the right) */
.vm-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.vm-options.vm-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.vm-opt { position: relative; width: 100%; min-height: 48px; display: grid; gap: 2px; align-content: center; text-align: left; padding: 12px 48px 12px 16px; background: var(--vm-fill); border: 0; border-radius: var(--vm-r-ctl); cursor: pointer; line-height: 1.3; transition: background-color .15s linear; }
.vm-opt:hover { background-color: var(--vm-fill-hover); }
.vm-opt-lbl { font-family: var(--vm-medium); font-size: 16px; }
.vm-opt-hint { font-size: 14px; color: var(--vm-ink-70); }
.vm-opt-count { font-family: var(--vm-regular); font-size: 13px; color: var(--vm-blue); font-variant-numeric: tabular-nums; }
.vm-opt-count.is-zero { color: var(--vm-ink-70); }
.vm-opt::after { content: ""; position: absolute; right: 14px; top: 50%; width: 20px; height: 20px; margin-top: -10px; border-radius: 50%; background: var(--vm-porcelain) center / 10px 8px no-repeat; transition: background-color .15s linear; }
.vm-opt.vm-multi::after { border-radius: 5px; }
.vm-opt[aria-pressed="true"]::after { background-color: var(--vm-blue); background-image: var(--vm-tick); }
.vm-opt[disabled] { opacity: .45; cursor: not-allowed; }
.vm-opt[disabled]:hover { background-color: var(--vm-fill); }
.vm-q-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--vm-rule); padding-top: 18px; }
.vm-live { font-size: 15px; color: var(--vm-ink-70); font-variant-numeric: tabular-nums; }
.vm-live strong { color: var(--vm-ink); }
.vm-foot-actions { display: flex; gap: 20px; align-items: center; }
@media (min-width: 1080px) {
	.vm-opt-lbl { font-size: 17px; }
}

/* Results */
.vm-results { display: grid; gap: 28px; }
.vm-res-head { padding: 28px clamp(18px, 4vw, 36px); display: grid; gap: 14px; }
.vm-res-head h2 { font-size: clamp(24px, 2.6vw, 36px); line-height: 1.12; outline: none; }
.vm-meta { color: var(--vm-ink-70); }
.vm-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.vm-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 6px 12px; background: var(--vm-fill); border: 0; border-radius: 10px; font-family: var(--vm-regular); font-size: 14px; text-align: left; cursor: pointer; transition: background-color .15s linear; }
.vm-chip:hover { background: var(--vm-fill-hover); }
.vm-chip-ed { color: var(--vm-blue); font-family: var(--vm-medium); font-size: 13px; }
.vm-note { background: var(--vm-blue-wash); border-radius: 14px; padding: 12px 16px; font-size: 15px; }

/* Car cards: the theme's product card as used on /vehicles/ */
.vm-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.vm-car { position: relative; display: flex; flex-direction: column; background: var(--vm-porcelain); border: 1px solid var(--vm-line); border-radius: var(--vm-r-card); }
.vm-car::before { content: ""; position: absolute; inset: -1px; border: 2px solid transparent; border-radius: inherit; pointer-events: none; z-index: 2; transition: border-color .15s linear; }
.vm-car.is-top::before { border-color: var(--vm-blue); }
.vm-car.is-wild::before { border-color: var(--vm-lime-cream); }
.vm-car:hover::before { border-color: var(--vm-blue); }
.vm-car-art { position: relative; display: block; padding-top: 68.67%; overflow: hidden; border-radius: calc(var(--vm-r-card) - 1px) calc(var(--vm-r-card) - 1px) 0 0; background: #F2F2EE; }
.vm-car-art img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: center; }
.vm-car-art.is-sil { background: var(--vm-blue-wash); } /* no photo: silhouette on the wash */
.vm-car-art svg { position: absolute; left: 50%; top: 52%; width: 70%; max-width: 230px; height: auto; transform: translate(-50%, -50%); }
.vm-badge { position: absolute; left: 14px; top: 14px; z-index: 1; }
.vm-badge.is-light { background-color: var(--vm-porcelain); }
.vm-car-body { flex: 1; display: flex; flex-direction: column; gap: 12px; padding: 16px 20px 18px; }
.vm-car-body h3 { font-family: var(--vm-medium); font-size: 18px; line-height: 1.3; }
.vm-car-body h3 a { color: inherit; text-decoration: none; }
.vm-car-body h3 a:hover { color: var(--vm-blue); }
.vm-variant { font-family: var(--vm-regular); font-size: 14px; color: var(--vm-ink-70); margin-top: 2px; }
.vm-price { font-family: var(--vm-bold); font-size: 32px; line-height: 1.1; color: var(--vm-blue); font-variant-numeric: tabular-nums; }
.vm-price small { font-family: var(--vm-medium); font-size: 17px; margin-left: 2px; }
.vm-costs { font-family: var(--vm-regular); font-size: 14px; line-height: 1.35; margin-top: 4px; }
.vm-specs { font-family: var(--vm-regular); font-size: 14px; line-height: 1.35; color: var(--vm-ink-70); font-variant-numeric: tabular-nums; }
.vm-why { display: grid; gap: 8px; }
.vm-why li { font-size: 15px; line-height: 1.35; padding-left: 28px; position: relative; }
.vm-why li::before { content: ""; position: absolute; left: 0; top: 0; width: 18px; height: 18px; border-radius: 50%; background: var(--vm-lime) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3L14.5 7' fill='none' stroke='%2309101F' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat; }
.vm-watch { background: var(--vm-warn-bg); color: var(--vm-warn-ink); font-size: 14px; border-radius: 10px; padding: 8px 12px; }
.vm-car-actions { margin-top: auto; padding-top: 6px; display: grid; gap: 6px; justify-items: center; }
.vm-car-actions .button { width: 100%; }
.vm-more-title { font-size: clamp(20px, 1.7vw, 26px); }
.vm-after { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 28px; }
.vm-empty { padding: 28px clamp(18px, 4vw, 36px); display: grid; gap: 16px; }
.vm-empty h3 { font-size: clamp(20px, 1.8vw, 26px); }
.vm-row { display: flex; flex-wrap: wrap; gap: 10px; }
.vm-small { font-size: 14px; color: var(--vm-ink-70); }
.vm-assume { font-size: 13px; color: var(--vm-ink-70); max-width: 90ch; }

/* Capture + talk to a human. Fields and checkbox: the theme's Gravity Forms styles. */
.vm-split { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.vm-split.is-solo { grid-template-columns: minmax(0, 1fr); }
.vm-panel { padding: 26px clamp(20px, 3vw, 32px); display: grid; gap: 16px; align-content: start; }
.vm-panel h3 { font-size: clamp(20px, 1.6vw, 24px); line-height: 1.2; }
.vm-panel > p { color: var(--vm-ink-70); }
.vm-form { display: grid; gap: 20px; margin: 0; }
.vm-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 16px; }
.vm-field { display: grid; gap: 10px; align-content: start; font-family: var(--vm-light); font-size: 15px; line-height: 1.3; margin: 0; }
.vm-req { color: var(--vm-blue); }
.vm-field input { display: block; width: 100%; height: 48px; margin: 0; padding: 12.5px 16px; font-family: var(--vm-light); font-size: 17px; line-height: 1.35; color: var(--vm-ink); background: var(--vm-fill); border: 0; border-radius: 14px; box-shadow: none; -webkit-appearance: none; appearance: none; transition: box-shadow .15s ease-in-out; }
.vm-field input::placeholder { color: var(--vm-ink); opacity: .5; }
.vm-field input:focus, .vm-field input:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--vm-blue); }
.vm-field input[aria-invalid="true"] { box-shadow: inset 0 0 0 2px var(--vm-error); }
.vm-check { display: flex; gap: 12px; align-items: flex-start; font-family: var(--vm-regular); font-size: 15px; line-height: 1.33; margin: 0; cursor: pointer; }
.vm-check input { flex: none; width: 20px; height: 20px; margin: 0; border: 0; border-radius: 5px; background: var(--vm-fill-strong) center / 10px 8px no-repeat; -webkit-appearance: none; appearance: none; cursor: pointer; }
.vm-check input:checked { background-color: var(--vm-blue); background-image: var(--vm-tick); }
.vm-check a { color: var(--vm-blue); }
.vm-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.vm-quote-for { background: var(--vm-blue-wash); border-radius: 14px; padding: 12px 16px; font-size: 15px; }
.vm-ok { background: var(--vm-ok-bg); color: var(--vm-ok-ink); border-radius: 14px; padding: 14px 16px; font-size: 15px; }
.vm-human { background: var(--vm-blue); color: var(--vm-porcelain); }
.vm-human > p { color: rgba(255, 255, 250, .86); }
.vm-human .button { justify-self: start; }
.vm-human :focus-visible { outline-color: var(--vm-porcelain); }

/* Build panel (Settings > Vehicle Match, or ?vm_debug=1) */
.vm-dev { border: 1px solid var(--vm-line); border-radius: var(--vm-r-card); background: #fff; }
.vm-dev summary { cursor: pointer; padding: 14px 18px; font-family: var(--vm-medium); list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.vm-dev summary::-webkit-details-marker { display: none; }
.vm-dev summary span { color: var(--vm-ink-70); font-family: var(--vm-light); font-size: 14px; }
.vm-dev-body { padding: 0 18px 18px; display: grid; gap: 14px; }
.vm-dev-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.vm-dev h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--vm-blue); font-family: var(--vm-medium); margin-bottom: 6px; }
.vm-dev pre { margin: 0; font-family: var(--vm-mono); font-size: 12px; background: #F3F5F9; border-radius: 8px; padding: 10px 12px; overflow: auto; max-height: 260px; white-space: pre; }

/* Compare in the calculator: a toggle on each car's photo, a hint above the cards, and a bar at the bottom of the screen. */
.vm-compare { position: absolute; right: 12px; top: 12px; z-index: 2; display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border: 1px solid var(--vm-line); border-radius: 999px; background: var(--vm-porcelain); color: var(--vm-ink); font-family: var(--vm-medium); font-size: 14px; line-height: 1; cursor: pointer; box-shadow: 0 2px 10px rgba(9, 16, 31, .12); transition: background .15s linear, border-color .15s linear, color .15s linear; }
.vm-compare span { display: inline-flex; align-items: center; gap: 7px; }
.vm-car-art .vm-compare svg { position: static; left: auto; top: auto; transform: none; width: 12px; height: 12px; max-width: none; flex: none; } /* not the photo's fallback-silhouette rule */
.vm-compare .vm-compare-on { display: none; }
.vm-compare[aria-pressed="true"] { background: var(--vm-ink); border-color: var(--vm-ink); color: var(--vm-porcelain); }
.vm-compare[aria-pressed="true"] .vm-compare-on { display: inline-flex; }
.vm-compare[aria-pressed="true"] .vm-compare-off { display: none; }
.vm-compare:hover:not(:disabled):not([aria-pressed="true"]) { border-color: var(--vm-blue); color: var(--vm-blue); }
.vm-compare:focus-visible { outline: 2px solid var(--vm-blue); outline-offset: 2px; }
.vm-compare:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.vm-car:has(.vm-compare[aria-pressed="true"]) { border-color: var(--vm-ink); box-shadow: inset 0 0 0 1px var(--vm-ink); }
.vm-compare-hint { display: flex; align-items: center; gap: 10px; font-family: var(--vm-regular); font-size: 15px; line-height: 1.4; }
.vm-compare-hint svg { width: 22px; height: 22px; padding: 5px; flex: none; border-radius: 50%; background: var(--vm-lime); color: var(--vm-ink); box-sizing: border-box; }
.vm-compare-hint strong { font-family: var(--vm-medium); font-weight: 400; }
.vm-compare-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 900; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--vm-ink); color: var(--vm-porcelain); box-shadow: 0 -8px 30px rgba(9, 16, 31, .25); }
.vm-compare-bar[hidden] { display: none; }
.vm-compare-inner { max-width: 1180px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; }
.vm-compare-text { font-family: var(--vm-regular); font-size: 15px; line-height: 1.4; }
.vm-compare-text strong { font-family: var(--vm-semibold); font-weight: 400; color: var(--vm-lime); margin-right: 6px; }
.vm-compare-more { display: block; color: rgba(255, 255, 250, .7); font-size: 13px; }
.vm-compare-bar .button { flex: none; }
.psp-vm.is-results.has-compare-bar { padding-bottom: 96px; }

@media (max-width: 900px) {
	.vm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.vm-split, .vm-dev-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 620px) {
	.vm-wrap { padding-inline: 16px; }
	.psp-vm-hero .s-hero-base__text { padding-bottom: 112px; }
	.vm-options, .vm-options.vm-three, .vm-grid, .vm-fields { grid-template-columns: minmax(0, 1fr); }
	.vm-q-foot { flex-direction: column-reverse; align-items: stretch; }
	.vm-foot-actions { justify-content: space-between; }
	.vm-chips { flex-wrap: nowrap; overflow-x: auto; padding: 0 4px 4px; margin-inline: -4px; }
	.vm-chip { flex: none; }
	.vm-human .button { justify-self: stretch; }
	.vm-compare-inner { flex-direction: column; align-items: stretch; }
	.vm-compare-bar .button { width: 100%; }
	.psp-vm.is-results.has-compare-bar { padding-bottom: 150px; }
}
@media (prefers-reduced-motion: reduce) {
	.psp-vm * { transition: none !important; animation: none !important; }
}
