/* p: the car's screen. Landscape first (the Tesla's browser): map on the left, a panel on the right,
 * big targets. Stacks on a phone. Builds on parking's style.css (pins, chips, cards) and the theme. */

[hidden] { display: none !important; }
body.car { height: 100dvh; display: flex; flex-direction: column; overflow: hidden; font-size: 18px; }
body.car header.top { width: auto; margin: 0; height: 56px; padding: 0 16px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--veil-2); flex: none; }
.brand { color: var(--ink); text-decoration: none; font-size: 22px; font-weight: 600; font-style: italic; }
.status-chips { flex: 1; display: flex; gap: 8px; flex-wrap: wrap; overflow: hidden; }
.chip { font-size: 14px; padding: 4px 10px; border-radius: var(--r-pill); box-shadow: inset 0 0 0 1px var(--veil-3); color: var(--ink-2); text-decoration: none; white-space: nowrap; }
.chip.ok { box-shadow: inset 0 0 0 1px rgb(127 207 90 / .55); color: #b9ee9f; }
.chip.bad { box-shadow: inset 0 0 0 1px rgb(255 110 90 / .6); color: #ffb3a6; }
.chip.warn { box-shadow: inset 0 0 0 1px rgb(255 210 63 / .6); color: #ffe38a; }

body.car main.split { width: auto; margin: 0; padding: 0; min-height: 0; flex: 1; display: flex; }
.mapside { position: relative; flex: 1.5; min-width: 0; }
.mapside .map { height: 100%; max-height: none; min-height: 0; }
.panel { width: min(560px, 42vw); flex: none; overflow-y: auto; padding: 16px; border-left: 1px solid var(--veil-2); background: var(--bg-surface-deep, var(--ground-1)); }
.follow { position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%); min-height: 56px; padding: 12px 24px; font-size: 18px; box-shadow: var(--shadow); }

.card { display: block; padding: 16px; margin: 0 0 14px; }
.card .label { margin: 0 0 6px; font-size: 15px; color: var(--ink-3); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card .big { margin: 0 0 8px; font-size: 24px; line-height: 1.25; }
.card.live { box-shadow: inset 0 0 0 2px rgb(127 207 90 / .45); }
.card.bad { box-shadow: inset 0 0 0 2px rgb(255 110 90 / .55); }
.card p { margin: 0 0 6px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.row.end { justify-content: flex-end; }
.row button, .row .button { min-height: 56px; padding: 12px 20px; font-size: 18px; }
.danger { color: var(--danger); }
.tag { font-size: 13px; padding: 2px 8px; border-radius: var(--r-pill); background: rgb(255 210 63 / .2); color: #ffe38a; }
.pulse { width: 10px; height: 10px; border-radius: 50%; background: #7fcf5a; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .pulse { animation: none; } }
.facts { margin: 4px 0 8px; padding-left: 20px; }
.facts li { margin: 2px 0; }
.lines { margin: 8px 0; padding: 8px 12px; border-radius: var(--r-md); background: var(--veil-1); font-size: 16px; }
.lines p { margin: 4px 0; }
.lines .us { color: var(--ink-3); }

.confirms { position: fixed; z-index: 20; top: 64px; left: 50%; transform: translateX(-50%); width: min(720px, calc(100% - 32px)); display: flex; flex-direction: column; gap: 10px; }
.confirm { padding: 16px 18px; border-radius: var(--r-lg); background: var(--ground-2, #2a1d14); box-shadow: var(--shadow), inset 0 0 0 2px rgb(255 210 63 / .6); font-size: 20px; }
.confirm p { margin: 0 0 6px; }

.where { display: flex; gap: 10px; }
.where input { flex: 1; min-height: 56px; font-size: 20px; }
.where button { min-height: 56px; }
.results { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.result { text-align: left; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 56px; padding: 10px 14px; background: var(--veil-1); color: var(--ink); box-shadow: none; }
.result span { font-size: 15px; color: var(--ink-3); }
.stay { margin: 12px 0; }
.stay .chip-btn { min-height: 48px; padding: 10px 16px; font-size: 17px; }
.summary { margin: 12px 0 4px; }
.list-label { margin: 18px 0 6px; font-size: 15px; color: var(--ink-3); }

.spots { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.spot { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--r-md); background: var(--veil-1); }
.spot-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; text-align: left; background: transparent; box-shadow: none; color: var(--ink); padding: 6px; min-height: 56px; }
.spot-main .why { font-size: 15px; color: var(--ink-2); }
.spot-main .n { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; color: var(--ground-0, #140904); background: var(--go); font-size: 16px; }
.spot-main .n.pin-yellow { background: var(--yellow); }
.spot-main .n.pin-meter { background: var(--pay); }
.spot-main .n.pin-white { background: var(--white-curb); }
.spot-main .n.pin-garage { background: var(--cream); }
.spot-acts { display: flex; flex-direction: column; gap: 6px; flex: none; }
.spot-acts button { min-height: 48px; padding: 8px 14px; font-size: 16px; }
.suite-primary.small { min-height: 48px; font-size: 16px; }

.spaces { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 12px; }
.space { display: flex; flex-direction: column; align-items: center; min-width: 96px; min-height: 64px; padding: 8px 12px; background: var(--veil-1); color: var(--ink); box-shadow: inset 0 0 0 1px var(--veil-3); }
.space span { font-size: 14px; color: var(--ink-3); }
.space[aria-checked="true"] { background: var(--cream); color: var(--ground-1); }
.space[aria-checked="true"] span { color: var(--ground-2, #2a1d14); }

.settings h2 { margin: 24px 0 8px; }
.settings .chip-btn { min-height: 48px; padding: 10px 16px; }
.settings .toggle { display: flex; gap: 10px; align-items: center; min-height: 48px; margin-top: 12px; }
.log { font-size: 15px; max-height: 320px; overflow-y: auto; }
.log p { margin: 4px 0; }
.log .error { margin: 4px 0; }
.log .warn { color: #ffe38a; }
.ok { color: #b9ee9f; }

.toast { position: fixed; z-index: 30; left: 50%; bottom: 28px; transform: translateX(-50%); padding: 14px 22px; border-radius: var(--r-pill); background: var(--cream); color: var(--ground-1); font-size: 18px; box-shadow: var(--shadow); max-width: calc(100% - 32px); }
.toast.bad { background: #ffb3a6; }

/* The car on the map: a dot with a nose that turns with the heading. */
.car-dot { width: 28px; height: 28px; }
.car-dot span { display: block; width: 28px; height: 28px; border-radius: 50%; background: #7cc4ff; border: 3px solid #fff; box-shadow: 0 0 0 6px rgb(124 196 255 / .25); position: relative; }
.car-dot span::after { content: ""; position: absolute; left: 50%; top: -12px; transform: translateX(-50%); border: 7px solid transparent; border-bottom: 10px solid #fff; }

@media (max-width: 820px), (orientation: portrait) {
  body.car { height: auto; overflow: auto; }
  body.car main.split { flex-direction: column; }
  .mapside { height: 48vh; flex: none; }
  .panel { width: auto; border-left: 0; overflow: visible; }
}

/* Sign-in */
body.login main { max-width: 420px; margin: 18vh auto 0; padding: 0 16px; }
body.login h1 { font-style: italic; }
body.login form { display: flex; flex-direction: column; gap: 12px; }
body.login input { min-height: 56px; font-size: 20px; padding: 10px 14px; border-radius: var(--r-md); border: 1px solid var(--veil-3); background: var(--veil-1); color: var(--ink); }
