/*
 * Night mode for the website: the same boards and glass, after dark.
 * The moon button in the menu bar switches it; until a visitor picks, it follows the device's setting.
 * Loaded after site.css. Every rule here hangs off html.is-dark, so day mode is untouched.
 */

:root.is-dark {
  color-scheme: dark;

  /* Text: headings and body turn light. --navy is the heading colour, so the few
     navy fills (buttons, icons, tags) are set back to a dark colour further down. */
  --ink: #E3EAF1;
  --ink-2: #A3B3C4;
  --navy: #F3F6F9;
  --night: #0A1828;

  /* Links and accents */
  --blue: #5BA3DB;
  --blue-600: #8EC6F2;
  --blue-700: #C2E0F8;
  --amber: #F3CF8E;

  /* Tints become see-through washes */
  --blue-100: rgba(91, 163, 219, .16);
  --mist: rgba(255, 255, 255, .05);
  --sand-300: rgba(233, 193, 143, .3);
  --sand-100: rgba(233, 193, 143, .13);
  --sand-50: rgba(233, 193, 143, .07);
  --green: #7FD8AE;
  --green-100: rgba(95, 199, 154, .15);
  --danger: #F2A097;
  --danger-100: rgba(240, 128, 116, .15);
  --line: rgba(255, 255, 255, .1);
  --line-2: rgba(255, 255, 255, .17);

  /* Smoked glass */
  --g: rgba(255, 255, 255, .055);
  --g-solid: rgba(15, 30, 47, .97);
  --g-edge: rgba(255, 255, 255, .1);
  --g-shadow: 0 1px 0 rgba(255, 255, 255, .06) inset, 0 30px 60px -30px rgba(0, 0, 0, .85);
  --g-hair: rgba(255, 255, 255, .08);
  --board-head: rgba(3, 9, 16, .6);
  --shadow-float: 0 30px 60px -30px rgba(0, 0, 0, .85), 0 1px 0 rgba(255, 255, 255, .06) inset;
}

/* ---------- Page ---------- */
.is-dark body {
  background: linear-gradient(180deg, #0A1828 0, #0C1D31 1100px, #0D1D2F 2400px, #111C28 4200px, #141B24 100%);
  background-color: #0D1D2F;
}
/* the drifting glows and particles (set up in site.css), in night colours */
:root.is-dark {
  --glow-on: 1;
  --pt1: rgba(120, 170, 230, .8);
  --pt2: rgba(255, 255, 255, .8);
  --pt3: rgba(233, 193, 143, .9);
  --pt4: rgba(243, 207, 142, .75);
}
.is-dark .skip { background: var(--night); }
.is-dark ::selection { background: rgba(91, 163, 219, .4); color: #FFFFFF; }

/* ---------- Menu bar and footer ---------- */
.is-dark .site-header { background: rgba(5, 12, 21, .74); border-bottom-color: rgba(255, 255, 255, .07); }
.is-dark .site-footer { background: #060E18; border-top: 1px solid rgba(255, 255, 255, .06); }
.is-dark .staff-banner, .is-dark .staff-banner a { color: #10273F; }

/* The day/night button, next to the phone number */
.theme-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none; padding: 0;
  border: 1px solid rgba(255, 255, 255, .25); border-radius: 12px; background: rgba(255, 255, 255, .05);
  color: #FFFFFF; cursor: pointer;
}
.theme-btn:hover { border-color: var(--sand); }
.theme-btn svg { width: 20px; height: 20px; }
.theme-btn .i-sun { display: none; color: var(--sand); }
.is-dark .theme-btn .i-sun { display: block; }
.is-dark .theme-btn .i-moon { display: none; }
.header-row .theme-btn { margin-left: -16px; }
@media (max-width: 860px) {
  .header-row .theme-btn { margin-left: 0; }
}

/* ---------- Buttons and fields ---------- */
.is-dark .btn-primary { background: #2E78B5; color: #FFFFFF; }
.is-dark .btn-primary:hover { background: #3A88C8; color: #FFFFFF; }
.is-dark .btn-quiet { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .16); color: var(--ink); }
.is-dark .btn-quiet:hover { background: rgba(255, 255, 255, .1); border-color: var(--sand); color: #FFFFFF; }
.is-dark .btn-on-dark:hover { color: #10273F; }
.is-dark input[type="text"], .is-dark input:not([type]), .is-dark input[type="email"], .is-dark input[type="tel"],
.is-dark input[type="date"], .is-dark input[type="time"], .is-dark input[type="datetime-local"], .is-dark input[type="search"],
.is-dark input[type="password"], .is-dark input[type="number"], .is-dark select, .is-dark textarea, .is-dark .date-btn {
  background-color: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .15); color: var(--ink);
}
.is-dark input:hover, .is-dark select:hover, .is-dark textarea:hover, .is-dark .date-btn:hover { border-color: rgba(255, 255, 255, .3); }
.is-dark ::placeholder { color: #7D8FA2; }
.is-dark select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%238EC6F2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.is-dark select option { background: #11202F; color: var(--ink); }
.is-dark input[type="checkbox"], .is-dark input[type="radio"] { accent-color: #5BA3DB; }

/* ---------- Home: the coast at night ---------- */
.is-dark .hero-stage { background: #0A1828; }
@media (max-width: 1279px) {
  .is-dark .hero-stage { background: none; }
  .is-dark .hero-copy-band { background: #0A1828; }
}
.is-dark .hero-eyebrow { background: rgba(255, 255, 255, .09); border: 1px solid rgba(255, 255, 255, .14); }
.is-dark .hero-price { color: var(--ink-2); }
.is-dark .hero-card { background: rgba(9, 21, 36, .58); border-color: rgba(255, 255, 255, .12); }

.scene-night { display: none; }
.is-dark .scene-night { display: inline; }
.is-dark #scene-sky stop:nth-child(1), .is-dark #scene-sky stop:nth-child(2) { stop-color: #0A1828; }
.is-dark #scene-sky stop:nth-child(3) { stop-color: #18304A; }
.is-dark #scene-sky stop:nth-child(4) { stop-color: #27405A; }
.is-dark #scene-sea stop:nth-child(1) { stop-color: #1B3A57; }
.is-dark #scene-sea stop:nth-child(2) { stop-color: #0F2740; }
.is-dark #scene-road stop:nth-child(1) { stop-color: #141E2A; }
.is-dark #scene-road stop:nth-child(2) { stop-color: #0E1620; }
/* the sun becomes the moon */
.is-dark .hero-scene [fill="#F3DDBE"] { fill: #EFE5CF; }
.is-dark .hero-scene [stroke="#DFB589"][stroke-dasharray] { stroke: #EFE5CF; opacity: .22; }
.is-dark .hero-scene .scene-cloud path { fill: #2A3F58; opacity: .9; }
/* mountains, far to near */
.is-dark .hero-scene [fill="#CBD9E6"] { fill: #22395A; }
.is-dark .hero-scene [fill="#A9C0D4"] { fill: #1B3150; }
.is-dark .hero-scene [fill="#7E9EAF"] { fill: #142842; }
.is-dark .hero-scene [fill="#9DB6C8"] { fill: #172C46; }
.is-dark .hero-scene [stroke="#F3E2CB"] { stroke: #3A5272; }
/* the town: moonlit walls, lights on inside */
.is-dark .hero-scene [fill="#F6EEE2"] { fill: #8C97A8; }
.is-dark .hero-scene [fill="#D9774E"] { fill: #7B4B3D; }
.is-dark .hero-scene [fill="#C9683F"] { fill: #6A3F33; }
.is-dark .hero-scene [fill="#9DB4C8"] { fill: #FFD58A; }
.is-dark .hero-scene [fill="#6E93B3"] { fill: #3E5878; }
/* bay, greenery, promenade, ground */
.is-dark .hero-scene .scene-sparkle { stroke: #EFE5CF; }
.is-dark .hero-scene [fill="#7D9A8A"] { fill: #1E3A36; }
.is-dark .hero-scene [fill="#3F6B57"] { fill: #12291F; }
.is-dark .hero-scene [fill="#4D7A63"] { fill: #183329; }
.is-dark .hero-scene [fill="#6C9A7E"] { fill: #1B372E; }
.is-dark .hero-scene [fill="#5A8A6E"] { fill: #163028; }
.is-dark .hero-scene [fill="#6F9A82"] { fill: #21443A; }
.is-dark .hero-scene [fill="#7FA890"] { fill: #2A5246; }
.is-dark .hero-scene [fill="#EADBC6"] { fill: #2C3746; }
.is-dark .hero-scene [fill="#DCC8AA"] { fill: #364352; }
.is-dark .hero-scene [stroke="#D2BC9C"] { stroke: #3F4C5C; }
.is-dark .hero-scene [fill="#EFE3D2"] { fill: #121E2B; }
.is-dark .hero-scene [stroke="#D9C4A6"] { stroke: #1D2B3B; }
.is-dark .hero-scene [fill="#DCCAB0"] { fill: #22303F; }
.is-dark .hero-scene [fill="#CFBB9D"] { fill: #1D2A38; }
.is-dark .hero-scene .scene-lane { opacity: .55; }
/* the car, here and on the maintenance page: dark glass, headlight and tail-light on */
.is-dark .hero-scene [fill="#D9E7F2"], .is-dark .hero-art [fill="#D9E7F2"] { fill: #2C4560; }
.is-dark .hero-scene [fill="#FFF6E8"], .is-dark .hero-art [fill="#FFF6E8"] { fill: #FFF8E2; }
.is-dark .hero-scene [fill="#C8463E"], .is-dark .hero-art [fill="#C8463E"] { fill: #FF5A4E; }
.is-dark .hero-scene [fill="#E6ECF1"], .is-dark .hero-art [fill="#E6ECF1"] { fill: #9AA9B8; }
.is-dark .hero-art [fill="#F5E9DC"] { fill: #E4D9C0; }
.is-dark .hero-art [stroke="#DFB589"][stroke-dasharray="2 10"] { stroke: #B89A70; }
@media (prefers-reduced-motion: no-preference) {
  .is-dark .scene-star { animation: star-twinkle 3.6s ease-in-out infinite; }
}
@keyframes star-twinkle { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }

/* "How it works" and other icons: amber on a dark tile */
.is-dark .fact-icon, .is-dark .place-icon, .is-dark .tip-icon, .is-dark .drive-box-icon { background: rgba(233, 193, 143, .14); color: var(--amber); }
.is-dark .help-card { background: rgba(46, 120, 181, .16); border: 1px solid rgba(142, 198, 242, .16); }
.is-dark .dest, .is-dark .place-hero { background: var(--night); }
.is-dark .dest-times li { background: rgba(5, 12, 21, .74); color: #F3F6F9; }
.is-dark .dest-times .icon { color: var(--blue-600); }

/* ---------- Boards: a black strip with amber letters, like a station board at night ---------- */
.is-dark .board-head, .is-dark .price-table thead th { color: var(--amber); }
.is-dark .board .car-card:nth-child(even) { background: rgba(255, 255, 255, .025); }
.is-dark .board .car-card.is-link:hover { background: rgba(255, 255, 255, .07); }
.is-dark .board .fee-free { color: var(--green); }
.is-dark .car-plinth, .is-dark .board .car-plinth, .is-dark .sr-media .car-plinth, .is-dark .gallery-stage, .is-dark .gallery-thumb {
  background: radial-gradient(120% 70% at 50% 100%, rgba(233, 193, 143, .14), rgba(255, 255, 255, .035) 70%);
}
.is-dark .board .car-plinth.fit-fill, .is-dark .car-plinth.fit-fill { background: transparent; }

/* ---------- Home: the showroom row ---------- */
.is-dark .sr-tag { background: #F3CF8E; color: #10273F; box-shadow: 0 10px 22px -10px rgba(0, 0, 0, .9); }
.is-dark .sr-tag small { color: #6B5230; }
.is-dark .sr-car.is-taken .sr-tag { background: rgba(243, 207, 142, .55); }
.is-dark .sr-link:hover { box-shadow: var(--g-shadow), 0 30px 50px -28px rgba(0, 0, 0, .95); }
.is-dark .sr-link:hover .sr-cta { color: var(--blue-600); }
.is-dark .sr-link:focus-visible { outline-color: #8EC6F2; }
.is-dark .sr-taken, .is-dark .last-one, .is-dark .status-pending { color: var(--amber); }

/* ---------- Cards, notes and boxes ---------- */
.is-dark .empty, .is-dark .cancel-box, .is-dark .submit-block, .is-dark .car-quote { background: rgba(233, 193, 143, .07); }
.is-dark .car-quote.is-bad { background: var(--danger-100); }
.is-dark .car-card, .is-dark .empty, .is-dark .cancel-box, .is-dark .submit-block, .is-dark .car-quote, .is-dark .flash,
.is-dark .form-alert, .is-dark .spec-grid > div, .is-dark .drive-box, .is-dark .rt, .is-dark .place-card-link { border-color: var(--g-edge); }
.is-dark .car-row.is-full { background: rgba(255, 255, 255, .02); }
.is-dark .specs li { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .1); }
.is-dark .spec-grid > div, .is-dark .do-list li { background: rgba(255, 255, 255, .045); }
.is-dark .option-body { background: rgba(255, 255, 255, .045); border-color: rgba(255, 255, 255, .13); }
.is-dark .option:hover .option-body { border-color: rgba(255, 255, 255, .3); }
.is-dark .option input:checked + .option-body { background: rgba(91, 163, 219, .14); border-color: #5BA3DB; box-shadow: 0 0 0 3px rgba(91, 163, 219, .2); }
.is-dark .plate { background: #FFFFFF; border-color: #10273F; }
.is-dark .plate-text { color: #10273F; }
.is-dark .faq summary::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 1v10M1 6h10' stroke='%238EC6F2' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}
.is-dark .gallery-btn { background: rgba(10, 24, 40, .85); color: var(--ink); }
.is-dark .gallery-btn:hover { background: #10273F; }

/* ---------- Date picker and availability calendar ---------- */
.is-dark .cal-nav { background: rgba(255, 255, 255, .05); color: var(--ink); }
.is-dark .cal-day { background: rgba(255, 255, 255, .04); color: var(--ink); }
.is-dark .dp .cal-day.is-open { background: rgba(255, 255, 255, .05); }
.is-dark .cal-day.is-start, .is-dark .cal-day.is-end,
.is-dark .dp .cal-day.is-start, .is-dark .dp .cal-day.is-end, .is-dark .dp .cal-day.is-start:hover, .is-dark .dp .cal-day.is-end:hover { background: #2E78B5; color: #FFFFFF; }
.is-dark .cal-day.is-free { color: #9BE3C1; }
.is-dark .cal-legend .lg-free { background: rgba(95, 199, 154, .32); }
.is-dark .cal-day.is-part, .is-dark .cal-day.is-part.only-until, .is-dark .cal-legend .lg-part { background: linear-gradient(135deg, var(--green-100) 0 50%, rgba(240, 128, 116, .22) 50% 100%); color: var(--ink); }
.is-dark .cal-day.is-part.only-from { background: linear-gradient(135deg, rgba(240, 128, 116, .22) 0 50%, var(--green-100) 50% 100%); }
.is-dark .cal-day.is-full, .is-dark .cal-legend .lg-full { background: rgba(240, 128, 116, .22); color: #F2A097; }
.is-dark .cal-day.is-off { background: transparent; color: #4F6073; }

/* ---------- Places ---------- */
.is-dark .af-glider, .is-dark .af:not(.has-glider) .af-tab.is-active, .is-dark .af.has-glider .af-tab.is-active:hover { background: #2E78B5; }
.is-dark .af-tab.is-active { color: #FFFFFF; }
.is-dark .af-tab.is-active .af-sub { color: #D6E8F7; }
.is-dark .af-tab.is-active .af-thumb { box-shadow: 0 0 0 2px #0A1828, 0 0 0 4px var(--area, #8FB8DE); }
.is-dark .place-book { background: rgba(46, 120, 181, .18); border: 1px solid rgba(142, 198, 242, .16); }
.is-dark .place-card-link:hover, .is-dark .place-card.is-hot .place-card-link { border-color: rgba(255, 255, 255, .32); }
.is-dark .area-bay, .is-dark .pin-bay { --area: #4A90CC; }
.is-dark .area-coast, .is-dark .pin-coast { --area: #D08A45; }
.is-dark .area-old, .is-dark .pin-old { --area: #D0675A; }
.is-dark .area-north, .is-dark .pin-north { --area: #3F9A72; }

/* The map at night */
.is-dark .pmap svg, .is-dark .pmap-sea { background: #0C2034; fill: #0C2034; }
.is-dark .pmap-land { fill: #19293A; stroke: #283A4E; }
.is-dark .pmap-me { fill: #22364B; stroke: #5BA3DB; }
.is-dark .pmap-lake { fill: #15385A; stroke: #23557F; }
.is-dark .pmap-names text { fill: #6E8093; }
.is-dark .pmap-names .pmap-sea-name { fill: #4F86B8; }
.is-dark .pmap-airport-dot { fill: #0A1828; stroke: #E3EAF1; }
.is-dark .pmap-airport-name { stroke: #22364B; }
.is-dark .pmap-tip rect { fill: #050D16; stroke: rgba(255, 255, 255, .18); }
.is-dark .pmap-credit { color: #6C8DAE; }

/* ---------- Maintenance page ---------- */
.is-dark .maint-body { background: linear-gradient(180deg, #0A1828 0, #0D1D2F 60%, #141B24 100%); }
.logo-night { display: none; }
.is-dark .logo-day { display: none; }
.is-dark .logo-night { display: block; }
