/* ============================================================
   Visitor looks: Frutiger Aero and Retro Terminal
   ------------------------------------------------------------
   A visitor can dress the public site in one of these from the picker in
   the footer (includes/visitor_looks.php, assets/js/looks.js). The choice
   lives in their own browser and shows as data-look on <html>.

   A look is theme-pad.css with a different palette plus decoration: the
   script puts the theme-pad class on <body>, and the rules here re-declare
   every --tp-* variable under html[data-look], which outranks both the
   glance pad defaults and an admin custom theme's <style id="theme-custom">.
   So a new --tp-* variable in theme-pad.css needs a value in BOTH palette
   blocks below. Unlike theme-pad.css, literal colours are expected here.
   ============================================================ */

/* ---------- The picker (in the footer, every look) ---------- */
.look-picker { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.5rem; font-size: 0.85rem; }
.look-picker[hidden] { display: none; }
.look-picker label { font-weight: 700; color: var(--c-text-soft); }
.look-picker select { font: inherit; padding: 0.35rem 0.5rem; border: 1px solid var(--c-border-strong); border-radius: var(--r-sm); background-color: var(--c-surface); color: var(--c-text); }
.look-go, .look-mute { font: inherit; font-weight: 700; cursor: pointer; border-radius: var(--r-sm); padding: 0.35rem 0.8rem; }
.look-go { border: 1px solid var(--c-red); background: var(--c-red); color: #fff; animation: look-beckon 1.6s ease-in-out infinite; }
.look-go.is-idle { visibility: hidden; animation: none; }   /* keeps its room, so nothing shifts when it appears */
.look-mute { display: inline-flex; align-items: center; gap: 0.35rem; border: 1px solid var(--c-border-strong); background: transparent; color: var(--c-text-soft); }
.look-mute:hover { color: var(--c-text); border-color: var(--c-text-soft); }
.look-mute svg { width: 16px; height: 16px; flex: none; }
.look-mute .look-mute-off { display: none; }
.look-mute[aria-pressed="true"] .look-mute-on { display: none; }
.look-mute[aria-pressed="true"] .look-mute-off { display: inline; }
@keyframes look-beckon { 0%, 100% { box-shadow: 0 0 0 0 rgba(179, 38, 30, 0.55); } 50% { box-shadow: 0 0 0 6px rgba(179, 38, 30, 0); } }
.look-go[data-to="aero"] { border: 1px solid #0B6DB8; border-radius: 999px; background: linear-gradient(180deg, #BDEBFF 0%, #4DB8F5 48%, #1C8FE0 52%, #6FD0FF 100%); color: #06304F; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6); animation-name: look-beckon-aero; }
@keyframes look-beckon-aero { 0%, 100% { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75), 0 0 0 0 rgba(90, 190, 255, 0.7); } 50% { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75), 0 0 0 6px rgba(90, 190, 255, 0); } }
.look-go[data-to="unix"] { border: 1px solid #33FF66; border-radius: 0; background: #000; color: #33FF66; font-family: ui-monospace, Menlo, Consolas, "Courier New", monospace; text-shadow: 0 0 6px rgba(51, 255, 102, 0.7); animation-name: look-beckon-unix; }
@keyframes look-beckon-unix { 0%, 100% { box-shadow: 0 0 0 0 rgba(51, 255, 102, 0.8); } 50% { box-shadow: 0 0 0 6px rgba(51, 255, 102, 0); } }

/* ---------- The wipe ---------- */
html.look-wipe::view-transition-old(root) { animation: none; }
html.look-wipe::view-transition-new(root) { animation: look-wipe 2.8s cubic-bezier(0.45, 0, 0.3, 1) both; }
@keyframes look-wipe { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
html.look-unwipe::view-transition-new(root) { animation: none; z-index: 1; mix-blend-mode: normal; }
html.look-unwipe::view-transition-old(root) { animation: look-unwipe 2.8s cubic-bezier(0.45, 0, 0.3, 1) both; z-index: 2; mix-blend-mode: normal; }
@keyframes look-unwipe { from { clip-path: inset(0 0 0 0); } to { clip-path: inset(0 100% 0 0); } }
.look-band { position: fixed; z-index: 99998; top: 0; bottom: 0; left: 0; width: 180px; pointer-events: none; background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(170, 230, 255, 0.35) 55%, rgba(255, 255, 255, 0.95) 97%, #FFFFFF 100%); animation: look-band 2.8s cubic-bezier(0.45, 0, 0.3, 1) both; }
@keyframes look-band { 0% { transform: translateX(-180px); opacity: 1; } 92% { opacity: 1; } 100% { transform: translateX(calc(100vw - 180px)); opacity: 0; } }
.look-band-back { background: linear-gradient(270deg, rgba(255, 255, 255, 0) 0%, rgba(170, 230, 255, 0.35) 55%, rgba(255, 255, 255, 0.95) 97%, #FFFFFF 100%); animation-name: look-band-back; }
@keyframes look-band-back { 0% { transform: translateX(100vw); opacity: 1; } 92% { opacity: 1; } 100% { transform: translateX(0); opacity: 0; } }
.look-band.is-unix { width: 90px; background: linear-gradient(90deg, rgba(51, 255, 102, 0) 0%, rgba(51, 255, 102, 0.25) 60%, rgba(160, 255, 190, 0.95) 94%, #FFFFFF 100%); box-shadow: 0 0 40px 10px rgba(51, 255, 102, 0.35); animation-name: look-band-unix; }
@keyframes look-band-unix { 0% { transform: translateX(-90px); opacity: 1; } 92% { opacity: 1; } 100% { transform: translateX(calc(100vw - 90px)); opacity: 0; } }
.look-band.look-band-back.is-unix { background: linear-gradient(270deg, rgba(51, 255, 102, 0) 0%, rgba(51, 255, 102, 0.25) 60%, rgba(160, 255, 190, 0.95) 94%, #FFFFFF 100%); animation-name: look-band-back; }
@media (prefers-reduced-motion: reduce) { .look-go { animation: none; } }

/* ============================================================
   Frutiger Aero: sky, glass, gloss and bubbles
   ============================================================ */
html[data-look="aero"] body.theme-pad {
  --tp-black: #CDEBFB;
  --tp-panel: #FFFFFF;
  --tp-panel-2: #EAF6FD;
  --tp-field: #FFFFFF;
  --tp-track: #C5E2F3;
  --tp-track-strong: #9CCBE6;
  --tp-ink: #12324D;
  --tp-ink-soft: #3F5F78;
  --tp-ink-mute: #64829A;
  --tp-red: #1272CC;
  --tp-red-dark: #0C59A3;
  --tp-red-soft: #E3F2FD;
  --tp-red-on-black: #0A5CAD;
  --tp-on-text: #0B2F4F;
  --tp-on-soft: #254C6B;
  --tp-on-mute: #3F6381;
  --tp-on-border: #9FD0EA;
  --tp-on-border-strong: #7DBADB;
  --tp-on-red-dark: #07437F;
  --tp-on-red-soft: #BFE2F7;
  --tp-link-line: rgba(10, 92, 173, 0.45);
  --tp-head: #F4FBFF;
  --tp-head-2: #E4F3FC;
  --tp-head-field: #FFFFFF;
  --tp-head-ink: #12324D;
  --tp-head-ink-soft: #3F5F78;
  --tp-head-ink-mute: #64829A;
  --tp-head-track: #C5E2F3;
  --tp-head-track-strong: #9CCBE6;
  --tp-head-red: #1272CC;
  --tp-head-red-dark: #0C59A3;
  --tp-head-red-soft: #E3F2FD;
  --tp-head-rule: #5CC26A;
  --tp-shadow-card: 0 1px 2px rgba(10, 60, 110, 0.12), 0 6px 18px rgba(10, 80, 140, 0.14);
  --tp-shadow-lift: 0 10px 28px rgba(10, 80, 140, 0.22);
  --f-body: "Segoe UI", "Frutiger", "Frutiger Linotype", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 18px;
  background: #CDEBFB;
}
/* The sky, bubbles and a soft sun, on a fixed layer behind everything (a
   fixed layer, not background-attachment, which phones ignore). */
html[data-look="aero"] body.theme-pad::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 88% 8%, rgba(255, 255, 255, 0.95) 0, rgba(255, 255, 255, 0.35) 9%, rgba(255, 255, 255, 0) 26%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='520' height='520' viewBox='0 0 520 520'%3E%3Cdefs%3E%3CradialGradient id='b' cx='35%25' cy='30%25' r='75%25'%3E%3Cstop offset='0' stop-color='%23fff' stop-opacity='.75'/%3E%3Cstop offset='.35' stop-color='%23fff' stop-opacity='.08'/%3E%3Cstop offset='.85' stop-color='%23bfe9ff' stop-opacity='.22'/%3E%3Cstop offset='1' stop-color='%23fff' stop-opacity='.6'/%3E%3C/radialGradient%3E%3C/defs%3E%3Ccircle cx='90' cy='120' r='46' fill='url(%23b)'/%3E%3Ccircle cx='400' cy='70' r='22' fill='url(%23b)'/%3E%3Ccircle cx='300' cy='260' r='64' fill='url(%23b)'/%3E%3Ccircle cx='470' cy='380' r='30' fill='url(%23b)'/%3E%3Ccircle cx='120' cy='420' r='34' fill='url(%23b)'/%3E%3Ccircle cx='220' cy='60' r='12' fill='url(%23b)'/%3E%3Ccircle cx='40' cy='290' r='16' fill='url(%23b)'/%3E%3C/svg%3E") 0 0 / 520px 520px,
    radial-gradient(ellipse 90% 30% at 50% 100%, rgba(140, 214, 120, 0.55), rgba(140, 214, 120, 0) 70%),
    linear-gradient(180deg, #5DB9F0 0%, #9FDBFA 32%, #D8F3FF 62%, #EAFBE6 100%);
}
html[data-look="aero"] body.theme-pad :is(.etrains, .newest-loco, .collection-stats--pad) { background: transparent; }

/* Header and footer: frosted glass with a gloss line, a green rule. */
html[data-look="aero"] body.theme-pad .site-header,
html[data-look="aero"] body.theme-pad .site-footer {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(232, 246, 255, 0.86) 49%, rgba(206, 234, 251, 0.86) 51%, rgba(236, 249, 255, 0.92) 100%);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 14px rgba(10, 80, 140, 0.18);
}
html[data-look="aero"] body.theme-pad .site-header { border-bottom: 4px solid transparent; border-image: linear-gradient(90deg, #2FA8E8, #67D36E 50%, #2FA8E8) 1; }
html[data-look="aero"] body.theme-pad .site-footer { border-top: 4px solid transparent; border-image: linear-gradient(90deg, #2FA8E8, #67D36E 50%, #2FA8E8) 1; }

/* Panels are glass: a little see-through, a bright top edge. */
html[data-look="aero"] body.theme-pad :is(.card, .contact-form, .contact-aside, .faq-item, .newest-loco-card, .etrains-video, .account-card, .game-card, .glance-panel, .sl-item, .vai-box, .cai-summary, .pr-chart, .pr-stat, .tv-pick, .tv-result-row, .trivia-card, .pir-card, .wl-item, .cstat-card, .hl-card, .eid-slot, .featured-carousel) {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.82) 100%);
  border-color: rgba(255, 255, 255, 0.9);
  box-shadow: inset 0 1px 0 #FFFFFF, 0 1px 2px rgba(10, 60, 110, 0.12), 0 8px 22px rgba(10, 80, 140, 0.16);
}

/* Glossy buttons: the blue ones like a gel capsule. */
html[data-look="aero"] body.theme-pad .btn { border-radius: 999px; }
html[data-look="aero"] body.theme-pad :is(.btn-primary, .back-btn, .look-go:not([data-to])) {
  background: linear-gradient(180deg, #7CCBFA 0%, #2F9BE8 48%, #1272CC 52%, #3FA9F0 100%);
  border-color: #0C59A3;
  color: #FFFFFF;
  text-shadow: 0 1px 1px rgba(0, 40, 90, 0.55);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 2px 6px rgba(10, 80, 140, 0.3);
}
html[data-look="aero"] body.theme-pad .back-btn { border: 0; box-shadow: none; }
html[data-look="aero"] body.theme-pad .btn-primary:hover { filter: brightness(1.08); }
html[data-look="aero"] body.theme-pad :is(.btn-secondary, .pager-btn, .look-mute) {
  background: linear-gradient(180deg, #FFFFFF 0%, #EEF6FB 48%, #DCEBF5 52%, #F2F9FD 100%);
  border-color: #9CCBE6;
  color: #12324D;
  box-shadow: inset 0 1px 0 #FFFFFF, 0 1px 3px rgba(10, 80, 140, 0.18);
}
html[data-look="aero"] body.theme-pad :is(h1, h2, .newest-loco-heading) { text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8); }
html[data-look="aero"] body.theme-pad :is(input[type="text"], input[type="search"], input[type="email"], input[type="password"], input[type="number"], input[type="url"], input[type="tel"], input:not([type]), select, textarea) {
  border-radius: 8px;
  box-shadow: inset 0 2px 4px rgba(10, 80, 140, 0.14);
}

/* ============================================================
   Retro Terminal: green phosphor on a black tube
   ============================================================ */
html[data-look="unix"] body.theme-pad {
  --tp-black: #020A04;
  --tp-panel: #04150A;
  --tp-panel-2: #072110;
  --tp-field: #010603;
  --tp-track: #0F5A26;
  --tp-track-strong: #178A38;
  --tp-ink: #33FF66;
  --tp-ink-soft: #27CC52;
  --tp-ink-mute: #1FA844;
  --tp-red: #33FF66;
  --tp-red-dark: #8DFFAB;
  --tp-red-soft: #0A2E15;
  --tp-red-on-black: #8DFFAB;
  --tp-on-text: #33FF66;
  --tp-on-soft: #27CC52;
  --tp-on-mute: #1FA844;
  --tp-on-border: #0F5A26;
  --tp-on-border-strong: #178A38;
  --tp-on-red-dark: #D6FFE0;
  --tp-on-red-soft: #0A2E15;
  --tp-link-line: rgba(141, 255, 171, 0.6);
  --tp-head: #031006;
  --tp-head-2: #072110;
  --tp-head-field: #010603;
  --tp-head-ink: #33FF66;
  --tp-head-ink-soft: #27CC52;
  --tp-head-ink-mute: #1FA844;
  --tp-head-track: #0F5A26;
  --tp-head-track-strong: #178A38;
  --tp-head-red: #8DFFAB;
  --tp-head-red-dark: #D6FFE0;
  --tp-head-red-soft: #0A2E15;
  --tp-head-rule: #33FF66;
  --tp-shadow-card: none;
  --tp-shadow-lift: 0 0 18px rgba(51, 255, 102, 0.25);
  --f-body: ui-monospace, "SF Mono", Menlo, Consolas, "DejaVu Sans Mono", "Courier New", monospace;
  --r-sm: 0px;
  --r-md: 0px;
  --r-lg: 0px;
  background: #020A04;
  text-shadow: 0 0 6px rgba(51, 255, 102, 0.45);
}
/* The glow in the middle of the tube, behind everything. */
html[data-look="unix"] body.theme-pad::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse 120% 90% at 50% 40%, #052310 0%, #020A04 70%);
}
/* Scan lines over the whole tube; clicks pass straight through. */
html[data-look="unix"] body.theme-pad::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 99990;
  pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(0, 0, 0, 0) 0 2px, rgba(0, 0, 0, 0.22) 2px 3px);
}
html[data-look="unix"] body.theme-pad :is(h1, h2, h3, h4, .brand-name, button, input, select, textarea) { font-family: var(--f-body); }
html[data-look="unix"] body.theme-pad :is(h1, h2, .newest-loco-heading, .faq-group-h)::before { content: "> "; }
html[data-look="unix"] body.theme-pad .brand-name::after { content: "_"; animation: look-cursor 1.1s steps(1) infinite; }
@keyframes look-cursor { 50% { opacity: 0; } }
html[data-look="unix"] body.theme-pad :is(.site-header, .site-footer) { background: #031006; box-shadow: 0 0 22px rgba(51, 255, 102, 0.18); }
/* The logo and the header icons glow green like everything else on the tube. */
html[data-look="unix"] body.theme-pad .brand-emblem img { filter: grayscale(1) sepia(1) hue-rotate(70deg) saturate(5) brightness(1.05); }
html[data-look="unix"] body.theme-pad .site-social img { filter: grayscale(1) sepia(1) hue-rotate(70deg) saturate(5) brightness(1.2); }
/* Panels: black glass with a thin green frame. */
html[data-look="unix"] body.theme-pad :is(.card, .contact-form, .contact-aside, .faq-item, .newest-loco-card, .etrains-video, .account-card, .game-card, .glance-panel, .sl-item, .vai-box, .pr-chart, .pr-stat, .tv-pick, .tv-result-row, .trivia-card, .pir-card, .wl-item, .cstat-card, .hl-card, .eid-slot, .featured-carousel) {
  border: 1px solid #178A38;
  box-shadow: inset 0 0 24px rgba(51, 255, 102, 0.06);
}
/* Anything filled with the accent is inverse video: dark lettering on green. */
html[data-look="unix"] body.theme-pad :is(.admin-pill-badge, .admin-pill.is-current, .admin-pill.is-current:hover, .back-btn, .btn-ghost:hover, .btn-primary, .btn-primary:hover, .cat-year, .comms-chip-badge, .cr-order-badge, .eid-clear:focus-visible, .eid-clear:hover, .eid-num, .fv-arrow:focus-visible, .fv-arrow:hover, .fv-dot.is-active, .ipb-btn-unblock, .layout-live-badge.is-on, .mc-dot, .member-bell-badge, .pager-btn:focus-visible, .pager-btn:hover, .pr-chart-tab.is-active, .pr-modal-close:focus-visible, .pr-modal-close:hover, .pr-modal-rank, .pr-top .pr-rank, .row-flag, .site-footer .social a:hover, .sq-tabs a.is-active, .stats-blocked-tag, .stats-key-human, .stats-pill.is-active, .stats-pr-bar span, .stats-tab.is-active, .stats-viz-tab.is-active, .trivia-ai-tag, .tv-pick-qty, .tv-pick-remove:focus-visible, .tv-pick-remove:hover, .tv-picks-clear:focus-visible, .tv-picks-clear:hover, .tv-plus:not(:disabled), .tv-qty-badge, .tv-result-fill, .tv-tab.is-active, .tv-type-btn.is-active, .vc-pager-num.is-current, .vg-idea-num, .wl-btn-danger:hover, .wl-count, .look-go:not([data-to])) {
  color: #021006;
  text-shadow: none;
}
html[data-look="unix"] body.theme-pad :is(.btn-primary:hover, .back-btn:hover) { color: #021006; }
html[data-look="unix"] body.theme-pad .btn { text-transform: uppercase; letter-spacing: 0.04em; }
html[data-look="unix"] body.theme-pad :is(.btn-secondary, .pager-btn, .look-mute) { background: #000; color: #33FF66; border: 1px solid #178A38; }
html[data-look="unix"] body.theme-pad :is(.btn-secondary, .pager-btn, .look-mute):hover { border-color: #33FF66; }
html[data-look="unix"] body.theme-pad :is(input[type="text"], input[type="search"], input[type="email"], input[type="password"], input[type="number"], input[type="url"], input[type="tel"], input:not([type]), select, textarea) {
  border: 1px solid #178A38;
  caret-color: #33FF66;
  text-shadow: 0 0 6px rgba(51, 255, 102, 0.45);
}
html[data-look="unix"] body.theme-pad ::selection { background: #33FF66; color: #021006; text-shadow: none; }
html[data-look="unix"] body.theme-pad .flash { background: #04150A; color: #33FF66; border: 1px dashed #33FF66; }
html[data-look="unix"] body.theme-pad .flash.error { color: #FFB000; border-color: #FFB000; text-shadow: 0 0 6px rgba(255, 176, 0, 0.45); }
@media (prefers-reduced-motion: reduce) { html[data-look="unix"] body.theme-pad .brand-name::after { animation: none; } }
