/* Y2K mode (Splash & music page, per session): the booth styled like a desktop
   application from the end of the 90s / early 2000s. Grey bevelled windows,
   navy title bars, Tahoma, square corners, no glow. Only active with
   <body class="y2k"> (booth/media-prefs.js setY2kMode). */

body.y2k {
    --y2k-face: #c0c0c0;
    --y2k-light: #dfdfdf;
    --y2k-hi: #ffffff;
    --y2k-shadow: #808080;
    --y2k-dark: #000000;
    --y2k-title: linear-gradient(90deg, #000080 0%, #1084d0 100%);
    --y2k-desk: #008080;
    --y2k-font: Tahoma, 'MS Sans Serif', Verdana, Geneva, sans-serif;
    --y2k-raised: inset -2px -2px 0 var(--y2k-dark), inset 2px 2px 0 var(--y2k-hi),
                  inset -4px -4px 0 var(--y2k-shadow), inset 4px 4px 0 var(--y2k-light);
    --y2k-sunken: inset 2px 2px 0 var(--y2k-dark), inset -2px -2px 0 var(--y2k-hi),
                  inset 4px 4px 0 var(--y2k-shadow), inset -4px -4px 0 var(--y2k-light);
    -webkit-font-smoothing: none;
    font-smooth: never;
}

/* ---------- Buttons: grey, bevelled, pressed in when clicked ---------- */
body.y2k .settings-button,
body.y2k .qr-button,
body.y2k .strip-button,
body.y2k .game-open-button,
body.y2k .videoclub-button,
body.y2k .print-button,
body.y2k .print-control-btn,
body.y2k .print-confirm-button,
body.y2k .print-cancel-button,
body.y2k .calibrate-button,
body.y2k .sp-btn {
    font-family: var(--y2k-font);
    font-weight: bold;
    color: var(--y2k-dark);
    background: var(--y2k-face);
    border: none;
    border-radius: 0;
    box-shadow: var(--y2k-raised);
    text-shadow: none;
    transition: none;
    animation: none;
}
body.y2k .settings-button:hover,
body.y2k .qr-button:hover,
body.y2k .strip-button:hover,
body.y2k .game-open-button:hover,
body.y2k .videoclub-button:hover,
body.y2k .print-button:hover,
body.y2k .calibrate-button:hover,
body.y2k .sp-btn:hover {
    background: var(--y2k-face);
    transform: none;
    box-shadow: var(--y2k-raised);
}
body.y2k .settings-button:active,
body.y2k .qr-button:active,
body.y2k .strip-button:active,
body.y2k .game-open-button:active,
body.y2k .print-button:active,
body.y2k .print-control-btn:active,
body.y2k .sp-btn:active {
    transform: none;
    box-shadow: var(--y2k-sunken);
}
body.y2k .print-control-btn.focused,
body.y2k .print-confirm-button.focused,
body.y2k .print-cancel-button.focused,
body.y2k .calibrate-button.focused,
body.y2k .sp-btn:focus-visible {
    outline: 1px dotted var(--y2k-dark);
    outline-offset: -8px;
    transform: none;
}

/* ---------- Idle screen: "Press SPACE" as a little dialog window, at the top ---------- */
body.y2k .start-text {
    top: 3%;
    font-family: var(--y2k-font);
    font-size: 30px;
    color: var(--y2k-dark);
    text-shadow: none;
    background: var(--y2k-face);
    box-shadow: var(--y2k-raised), 6px 6px 0 rgba(0, 0, 0, 0.45);
    padding: 0 0 18px;
    min-width: min(520px, 70vw);
    animation: none;
    transform: translateX(-50%);
}
/* title bar with the _ □ × buttons */
body.y2k .start-text::before {
    content: "📷 Photobooth 2000";
    display: block;
    margin: 4px 4px 18px;
    padding: 4px 10px;
    font-size: 18px;
    text-align: left;
    color: #fff;
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='70' height='20'%3E%3Cg font-family='Tahoma,sans-serif' font-weight='bold' font-size='13' text-anchor='middle'%3E%3Crect x='0' y='1' width='21' height='18' fill='%23c0c0c0' stroke='%23000'/%3E%3Ctext x='10.5' y='15'%3E_%3C/text%3E%3Crect x='23' y='1' width='21' height='18' fill='%23c0c0c0' stroke='%23000'/%3E%3Crect x='28' y='5' width='11' height='9' fill='none' stroke='%23000' stroke-width='2'/%3E%3Crect x='48' y='1' width='21' height='18' fill='%23c0c0c0' stroke='%23000'/%3E%3Ctext x='58.5' y='15'%3E×%3C/text%3E%3C/g%3E%3C/svg%3E") right 4px center / 70px 20px no-repeat,
        var(--y2k-title);
    padding-right: 84px;
}
body.y2k .start-text::after {   /* blinking text cursor */
    content: "_";
    animation: y2k-blink 1s steps(1) infinite;
}
@keyframes y2k-blink { 50% { opacity: 0; } }

/* ---------- Preview / countdown ---------- */
body.y2k .preview-text p {
    font-family: var(--y2k-font);
    color: #fff;
    text-shadow: 3px 3px 0 #000080;
    animation: none;
}
body.y2k #countdown-number {
    font-family: 'Arial Black', var(--y2k-font);
    line-height: 1.05;
    color: #000080;
    text-shadow: 0.03em 0.03em 0 #808080;
    -webkit-text-stroke: 0;
    background: var(--y2k-face);
    box-shadow: var(--y2k-raised), 10px 10px 0 rgba(0, 0, 0, 0.45);
    padding: 0 0 0.08em;
    min-width: 2em;
    text-align: center;
    animation: none;
}
body.y2k #countdown-number::before {   /* title bar */
    content: "⏳ Smile.exe";
    display: block;
    margin: 4px 4px 0.05em;
    padding: 3px 10px;
    font: bold max(16px, 0.075em) / 1.3 var(--y2k-font);
    text-align: left;
    text-shadow: none;
    color: #fff;
    background: var(--y2k-title);
}
body.y2k #countdown-number:empty { display: none; }
body.y2k #photo-counter {
    font-family: var(--y2k-font);
    font-size: 30px;
    color: var(--y2k-dark);
    text-shadow: none;
    background: var(--y2k-face);
    border: none;
    border-radius: 0;
    box-shadow: var(--y2k-raised);
}
body.y2k .effect-switcher { font-family: var(--y2k-font); }
body.y2k .effect-switcher .fx-pill {
    border: none;
    border-radius: 0;
    background: var(--y2k-face);
    box-shadow: var(--y2k-raised);
    color: var(--y2k-dark);
}
body.y2k .effect-switcher .fx-label { text-shadow: none; }
body.y2k .effect-switcher .fx-arrow { color: var(--y2k-dark); }
body.y2k .effect-switcher .fx-hint { color: #fff; text-shadow: 1px 1px 0 #000; }

/* ---------- Final strip: teal desktop, the strip in a sunken frame ---------- */
body.y2k #final-strip-overlay { background: var(--y2k-desk); }
body.y2k #final-strip-img {
    border: 10px solid var(--y2k-face);
    border-radius: 0;
    box-shadow: inset 0 0 0 2px var(--y2k-dark), 6px 6px 0 rgba(0, 0, 0, 0.45);
}
body.y2k .final-hint {   /* status bar */
    font-family: var(--y2k-font);
    font-size: 18px;
    color: var(--y2k-dark);
    text-shadow: none;
    background: var(--y2k-face);
    border-radius: 0;
    box-shadow: var(--y2k-sunken);
    animation: none;
}

/* ---------- Loading: "Please wait..." with a block progress bar ---------- */
body.y2k #loading { background: var(--y2k-desk); }
body.y2k #loading p {
    font-family: var(--y2k-font);
    color: #fff;
    text-shadow: 2px 2px 0 #000;
    animation: none;
}
body.y2k .spinner {
    width: 260px;
    height: 26px;
    border: none;
    border-radius: 0;
    background: var(--y2k-face) repeating-linear-gradient(90deg, #000080 0 16px, transparent 16px 20px) 4px 4px / 0 18px no-repeat;
    box-shadow: var(--y2k-sunken);
    animation: y2k-progress 2.4s steps(12) infinite;
}
@keyframes y2k-progress { to { background-size: 252px 18px; } }

/* ---------- Settings, QR gallery, strip selector, postcard preview: windows ---------- */
body.y2k #settings-panel { background: var(--y2k-desk); font-family: var(--y2k-font); }
body.y2k .settings-left,
body.y2k .settings-right,
body.y2k .qr-gallery,
body.y2k .sp-card {
    background: var(--y2k-face);
    border: none;
    border-radius: 0;
    box-shadow: var(--y2k-raised), 6px 6px 0 rgba(0, 0, 0, 0.45);
    font-family: var(--y2k-font);
    color: var(--y2k-dark);
}
body.y2k .settings-left h2,
body.y2k .qr-gallery-header,
body.y2k .sp-title {
    font-family: var(--y2k-font);
    color: #fff;
    background: var(--y2k-title);
    padding: 3px 8px;
    text-shadow: none;
}
body.y2k .qr-gallery-title { color: #fff; text-shadow: none; font-family: var(--y2k-font); }
body.y2k .strip-selector-title {
    font-family: var(--y2k-font);
    color: #fff;
    text-shadow: 2px 2px 0 #000;
}
body.y2k .strip-selector-option {
    background: var(--y2k-face);
    border: none;
    border-radius: 0;
    box-shadow: var(--y2k-raised);
    color: var(--y2k-dark);
    font-family: var(--y2k-font);
}
body.y2k .strip-selector-option.focused,
body.y2k .strip-selector-option.selected {
    transform: none;
    outline: 2px dotted #000080;
    outline-offset: -8px;
    box-shadow: var(--y2k-sunken);
}
body.y2k .strip-option-label { color: var(--y2k-dark); text-shadow: none; }
body.y2k .color-option,
body.y2k .logo-option,
body.y2k .decoration-option { border-radius: 0; }

/* ---------- Phones (mobile.js, #pbm): same look on the phone booth UI ---------- */
body.y2k #pbm .pbm-round,
body.y2k #pbm .pbm-chip,
body.y2k #pbm .pbm-btn,
body.y2k #pbm .pbm-seg-b,
body.y2k #pbm .pbm-mode {
    font-family: var(--y2k-font);
    color: var(--y2k-dark);
    background: var(--y2k-face);
    border: none;
    border-radius: 0;
    box-shadow: var(--y2k-raised);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    text-shadow: none;
}
body.y2k #pbm .pbm-round:active,
body.y2k #pbm .pbm-chip:active,
body.y2k #pbm .pbm-btn:active { transform: none; box-shadow: var(--y2k-sunken); }
body.y2k #pbm .pbm-pics-img { border-radius: 0; inset: 4px; }
body.y2k #pbm .pbm-btn.primary { color: #fff; background: var(--y2k-title); box-shadow: var(--y2k-raised); }
body.y2k #pbm .pbm-btn.ghost { background: transparent; box-shadow: none; color: #fff; }
body.y2k #pbm .pbm-chip.on,
body.y2k #pbm .pbm-mode.on,
body.y2k #pbm .pbm-seg-b.on { color: #fff; background: #000080; box-shadow: var(--y2k-sunken); }
body.y2k #pbm .pbm-seg { background: var(--y2k-face); border-radius: 0; box-shadow: var(--y2k-sunken); }
body.y2k #pbm .pbm-cap {
    font-family: var(--y2k-font); color: #fff; text-shadow: 1px 1px 0 #000;
    background: #000080; padding: 1px 6px;
}
/* START: a big grey "Start" button like the taskbar's */
body.y2k #pbm .pbm-start-ring {
    width: auto; height: auto; border-radius: 0; padding: 0;
    background: none; box-shadow: none; animation: none;
}
body.y2k #pbm .pbm-start-dot {
    width: 92px; height: 72px; border-radius: 0; font-size: 34px;
    background: var(--y2k-face); box-shadow: var(--y2k-raised), 5px 5px 0 rgba(0, 0, 0, 0.45);
}
body.y2k #pbm .pbm-start:active .pbm-start-dot { transform: none; box-shadow: var(--y2k-sunken); }
body.y2k #pbm .pbm-start-label {
    font: bold 18px/1 var(--y2k-font); letter-spacing: 1px; text-transform: none;
    color: #fff; background: #000080; padding: 3px 10px; text-shadow: none;
}
body.y2k #pbm .pbm-start-label::after { content: "_"; animation: y2k-blink 1s steps(1) infinite; }
/* sheets: a window with a blue title bar */
body.y2k #pbm .pbm-sheet {
    background: var(--y2k-face); color: var(--y2k-dark); border-radius: 0;
    box-shadow: var(--y2k-raised), 0 -6px 0 rgba(0, 0, 0, 0.35); font-family: var(--y2k-font);
}
body.y2k #pbm .pbm-sheet p { color: #222; }
body.y2k #pbm .pbm-sheet h2,
body.y2k #pbm .pbm-sheet .pbm-sheet-title {
    font-family: var(--y2k-font); color: #fff; background: var(--y2k-title);
    margin: 0 -8px 6px; padding: 4px 10px; text-align: left; letter-spacing: 0;
}
body.y2k #pbm .pbm-btn.ghost { color: var(--y2k-dark); }
html.is-mobile body.y2k #preview-screen { background: var(--y2k-desk) !important; }

/* ---------- Notifications: a yellow tooltip balloon ---------- */
body.y2k #print-notification {
    font-family: var(--y2k-font) !important;
    color: var(--y2k-dark) !important;
    background: #ffffe1 !important;           /* tooltip balloon yellow */
    border: 1px solid #000 !important;
    border-radius: 0 !important;
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.45) !important;
    text-shadow: none !important;
}

/* ---------- Taskbar (idle screen, TV): Start menu, tasks, clock ---------- */
#y2k-taskbar { display: none; }
body.y2k #y2k-taskbar {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    z-index: 65;
    height: 46px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px max(6px, 1.6%) 2px;   /* clear of the edges a zoomed calibration crops */
    box-sizing: border-box;
    background: var(--y2k-face);
    box-shadow: inset 0 2px 0 var(--y2k-light), inset 0 3px 0 var(--y2k-hi);
    font: 16px var(--y2k-font);
    color: var(--y2k-dark);
}
body.y2k #y2k-taskbar button {
    font: inherit;
    color: inherit;
    height: 36px;
    padding: 0 12px;
    border: none;
    border-radius: 0;
    background: var(--y2k-face);
    box-shadow: var(--y2k-raised);
    cursor: pointer;
    white-space: nowrap;
}
body.y2k #y2k-taskbar button:active,
body.y2k #y2k-taskbar.y2k-open .y2k-start,
body.y2k #y2k-taskbar .y2k-task-on {
    box-shadow: var(--y2k-sunken);
}
body.y2k #y2k-taskbar .y2k-task-on {
    background: repeating-conic-gradient(#fff 0 25%, var(--y2k-face) 0 50%) 0 0 / 2px 2px;
    font-weight: bold;
}
body.y2k #y2k-taskbar .y2k-start { font-weight: bold; padding: 0 14px 0 8px; }
body.y2k #y2k-taskbar .y2k-start span { margin-right: 6px; }
body.y2k #y2k-taskbar .y2k-task { min-width: 160px; text-align: left; }
body.y2k #y2k-taskbar .y2k-sep { width: 2px; height: 34px; box-shadow: inset 1px 0 var(--y2k-shadow), inset -1px 0 var(--y2k-hi); }
body.y2k #y2k-taskbar .y2k-tray {
    margin-left: auto;
    height: 34px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    box-shadow: inset 1px 1px 0 var(--y2k-shadow), inset -1px -1px 0 var(--y2k-hi);
}
/* Start menu */
body.y2k #y2k-taskbar .y2k-menu {
    position: absolute;
    left: max(6px, 1.6%); bottom: 44px;
    display: flex;
    min-width: 300px;
    padding: 4px;
    background: var(--y2k-face);
    box-shadow: var(--y2k-raised), 5px 5px 0 rgba(0, 0, 0, 0.4);
}
body.y2k #y2k-taskbar .y2k-menu[hidden] { display: none; }
body.y2k #y2k-taskbar .y2k-menu-side {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    padding: 8px 4px;
    color: #c0c0c0;
    font-size: 24px;
    background: linear-gradient(0deg, #000080, #1084d0);
}
body.y2k #y2k-taskbar .y2k-menu-side b { color: #fff; margin-left: 6px; }
body.y2k #y2k-taskbar .y2k-menu-items { flex: 1; display: flex; flex-direction: column; }
body.y2k #y2k-taskbar .y2k-menu-items button {
    height: 44px;
    text-align: left;
    box-shadow: none;
    background: transparent;
    display: flex;
    align-items: center;
    gap: 8px;
}
body.y2k #y2k-taskbar .y2k-menu-items button:hover,
body.y2k #y2k-taskbar .y2k-menu-items button:focus-visible { background: #000080; color: #fff; outline: none; }
body.y2k #y2k-taskbar .y2k-menu-items kbd { margin-left: auto; font: inherit; opacity: 0.7; }
body.y2k #y2k-taskbar hr { width: 100%; border: none; height: 2px; margin: 3px 0; box-shadow: inset 0 1px var(--y2k-shadow), inset 0 -1px var(--y2k-hi); }

/* the corner buttons at the bottom live in the taskbar now */
body.y2k:not(.is-mobile) #qr-btn,
body.y2k:not(.is-mobile) #videoclub-btn { display: none !important; }
body.y2k:not(.is-mobile) #game-open-btn { bottom: 58px !important; }
