/* Garage "showroom" cards. The current vehicle is a hero card (large photo, spec tiles, big running cost);
   vehicle history is a compact row per vehicle. Markup hooks (data-gr-*) are unchanged. Colours come from the
   My Account tokens (--av2-*) so light and dark themes both work. */
html.account-root body .gr-list{--gr-serif:Georgia,'Times New Roman',serif;--gr-line:var(--av2-line,#d7e7ef);--gr-card:var(--av2-card,#fff);--gr-soft:var(--av2-soft,#f6fbfd);--gr-ink:var(--av2-ink,#0b315c);--gr-muted:var(--av2-muted,#58758b);--gr-accent:var(--av2-accent,#007f94);--gr-tint:var(--av2-active,#eaf7fd)}
html.account-root body .gr-list:not(.gr-empty){gap:20px}

/* ---- current vehicles: hero card ---- */
html.account-root body .gr-list:not(.gr-history) .gr-card{display:flex;flex-wrap:wrap;gap:0;padding:0;border:1px solid var(--gr-line);border-radius:24px;overflow:hidden;background:var(--gr-card)}
html.account-root body .gr-list:not(.gr-history) .gr-photo{flex:1.1 1 260px;width:auto;max-width:none;min-height:300px;align-self:stretch;border-radius:0;background:linear-gradient(160deg,var(--gr-tint),var(--gr-soft))}
html.account-root body .gr-list:not(.gr-history) .gr-photo img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
html.account-root body .gr-list:not(.gr-history) .gr-primary-label{top:16px;left:16px;padding:6px 12px;border-radius:999px;background:#fff;color:#07505e;font-size:13px;font-weight:700}
html.account-root body .gr-list:not(.gr-history) .gr-card-main{flex:1.5 1 340px;min-width:0;display:flex;flex-direction:column;gap:20px;padding:26px}
html.account-root body .gr-card-top{align-items:flex-start;gap:12px}
html.account-root body .gr-title h3{margin:0;font:700 30px/1.1 var(--gr-serif);letter-spacing:-.2px;color:var(--gr-ink)}
html.account-root body .account-shell .gr-title p,html.account-root body .gr-title p{margin:6px 0 0;font-size:15px;line-height:1.4;color:var(--gr-muted)}
html.account-root body .gr-badge{padding:6px 12px;border-radius:999px;font-size:13px;font-weight:700}

html.account-root body .gr-facts{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(120px,100%),1fr));gap:12px;margin:0;font-size:inherit}
html.account-root body .gr-facts>div{min-width:0;padding:12px 14px;border-radius:14px;background:var(--gr-soft);border:1px solid var(--av2-rule,#e7f1f5)}
html.account-root body .gr-facts dt{margin:0 0 4px;font-size:12px;font-weight:700;color:var(--gr-muted)}
html.account-root body .gr-facts dd{margin:0;font-size:16px;font-weight:700;color:var(--gr-ink);overflow-wrap:anywhere}

html.account-root body .account-root .gr-cost,html.account-root body .gr-cost{display:flex;flex-wrap:wrap;gap:12px 32px;margin:0;padding:14px 18px;border-radius:14px;background:var(--gr-tint);font-size:14px;color:var(--gr-muted)}
html.account-root body .gr-cost-item{display:flex;flex-direction:column;gap:2px}
html.account-root body .gr-cost-label{font-size:13px;color:var(--gr-muted)}
html.account-root body .gr-cost-item strong{font:700 30px/1.1 var(--gr-serif);color:var(--gr-accent)}

html.account-root body .gr-row-bottom{flex-wrap:wrap;gap:12px 16px;margin-top:auto}
html.account-root body .account-root .gr-row-bottom small,html.account-root body .gr-row-bottom small{font-size:14px;color:var(--gr-muted)}
html.account-root body .gr-row-actions{align-items:center;gap:8px}
html.account-root body .gr-row-actions>.gr-text-button{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:0 20px;border:1px solid var(--gr-line);border-radius:999px;background:var(--gr-card);color:var(--gr-ink);font-size:15px;font-weight:700;text-decoration:none}
html.account-root body .gr-row-actions>.gr-text-button[data-gr-view]{border-color:var(--gr-accent);color:var(--gr-accent)}
html.account-root body .gr-row-actions>.gr-text-button:hover{background:var(--gr-tint)}
html.account-root body .gr-menu summary{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;min-width:44px;padding:0;border:1px solid var(--gr-line);border-radius:50%;background:var(--gr-card);color:var(--gr-ink)}
/* The card clips its rounded photo, so the ••• menu opens upwards to stay inside the card. */
html.account-root body .gr-list:not(.gr-history) .gr-menu-actions{top:auto;bottom:calc(100% + 6px)}

/* ---- vehicle history: one compact row per vehicle ---- */
html.account-root body .gr-list.gr-history{grid-template-columns:1fr;gap:14px;padding-top:6px}
html.account-root body .gr-history .gr-card{display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;gap:14px 20px;padding:16px 20px;border:1px solid var(--gr-line);border-radius:20px;background:var(--gr-card);overflow:visible}
html.account-root body .gr-history .gr-photo{flex:none;position:relative;width:96px;height:72px;min-height:0;align-self:center;border-radius:12px;overflow:hidden}
html.account-root body .gr-history .gr-photo img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
html.account-root body .gr-history .gr-history-stamp{display:none}
html.account-root body .gr-history .gr-card-main{flex:1 1 240px;min-width:0;padding:0;display:flex;flex-direction:column;gap:8px}
html.account-root body .gr-history .gr-badge{display:inline-block}
html.account-root body .gr-history .gr-title h3{font-size:22px}
html.account-root body .gr-history .gr-facts{display:flex;flex-wrap:wrap;gap:2px 16px}
html.account-root body .gr-history .gr-facts>div{padding:0;border:0;background:none}
html.account-root body .gr-history .gr-facts dt{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
html.account-root body .gr-history .gr-facts dd{font-size:14px;font-weight:500;color:var(--gr-muted)}
html.account-root body .gr-history .gr-cost{padding:0;background:none}
html.account-root body .gr-history .gr-cost-item{flex-direction:row;align-items:baseline;gap:8px}
html.account-root body .gr-history .gr-cost-item strong{font:700 16px/1.2 Arial,Helvetica,sans-serif;color:var(--gr-ink)}
html.account-root body .gr-history .gr-row-bottom{margin-top:0}
html.account-root body .gr-history .gr-row-actions{width:auto}

@media(max-width:520px){
 html.account-root body .gr-list:not(.gr-history) .gr-photo{min-height:220px}
 html.account-root body .gr-list:not(.gr-history) .gr-card-main{padding:20px}
 html.account-root body .gr-title h3{font-size:26px}
 html.account-root body .gr-history .gr-card{padding:14px}
}

/* Generated placeholders are illustrations with captions, never cropped photos.
   The source-based selector also applies when an uploaded photo fails to load. */
html.account-root body .gr-list .gr-photo img[src^="data:image/svg+xml,"]{object-fit:contain;padding:clamp(16px,3vw,32px);box-sizing:border-box;color-scheme:light}
html.account-root body .gr-list.gr-history .gr-photo img[src^="data:image/svg+xml,"]{padding:4px}
html[data-theme=dark].account-root body .gr-list .gr-photo img[src^="data:image/svg+xml,"],html[data-theme=dark] :is(.gr-detail-hero,.gr-photo-editor) img[src^="data:image/svg+xml,"]{color-scheme:dark}
html[data-theme=light] :is(.gr-detail-hero,.gr-photo-editor) img[src^="data:image/svg+xml,"]{color-scheme:light}

/* Keep the approved illustration intact in tall cards and compact previews. */
html.account-root body .gr-list .gr-photo img[src="/assets/garage/vehicle-placeholder-suv.webp"],
html.account-root body :is(.gr-detail-hero,.gr-photo-editor) img[src="/assets/garage/vehicle-placeholder-suv.webp"]{object-fit:contain;object-position:center;padding:0;background:#e1f5fa}
