/* ==========================================================
   THE 80'S VAULT - WEATHER TV
   Version 1.0
   ========================================================== */

/* ----------------------------------------------------------
   Page
---------------------------------------------------------- */

body {
    margin: 0;
    background:
        radial-gradient(circle at center top, #323232 0, #121212 42%, #050505 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: calc(100svh + 260px);
    overflow-x: hidden;
    overflow-y: auto;
    padding-top: 12px;
}

@font-face {
    font-family: "DS-Digital";
    src: url("../fonts/clock-digital.ttf") format("truetype");
    font-display: block;
}

#divQuery {
    margin: 20px 0;
}

#homeLink {
    top: 18px;
    left: 22px;
    padding: 5px 11px 4px;
    background: rgba(0, 0, 0, .72);
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 3px;
    box-shadow:
        0 10px 24px rgba(0, 0, 0, .35),
        inset 0 1px rgba(255, 255, 255, .08);
}

.location-prompt {
    position: fixed;
    z-index: 45;
    top: 104px;
    left: 22px;
    max-width: min(315px, calc(100vw - 44px));
}

.location-prompt.hidden {
    display: none;
}

#UseDeviceLocation {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 13px 10px 11px;
    border: 1px solid rgba(255, 229, 122, .72);
    border-radius: 5px;
    background: rgba(0, 0, 0, .68);
    box-shadow:
        0 12px 28px rgba(0, 0, 0, .38),
        0 0 18px rgba(255, 229, 122, .16),
        inset 0 1px rgba(255, 255, 255, .1);
    color: #ffe57a;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    font-family: "Star4000", monospace;
    font-size: clamp(13px, 1.05vw, 17px);
    line-height: 1.1;
    text-align: left;
    text-shadow: 2px 2px 0 #000;
}

#UseDeviceLocation:hover,
#UseDeviceLocation:focus-visible {
    border-color: rgba(255, 229, 122, .95);
    background: rgba(15, 12, 4, .78);
    box-shadow:
        0 12px 28px rgba(0, 0, 0, .42),
        0 0 24px rgba(255, 229, 122, .28),
        inset 0 1px rgba(255, 255, 255, .16);
}

.location-icon {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 28px;
    height: 28px;
    border: 1px solid rgba(255, 229, 122, .7);
    border-radius: 50%;
    background: rgba(255, 229, 122, .08);
    box-shadow: inset 0 0 8px rgba(255, 229, 122, .18);
}

.location-icon svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    filter: drop-shadow(0 0 4px rgba(255, 229, 122, .55));
}

/* ----------------------------------------------------------
   TV Cabinet
---------------------------------------------------------- */

#tvWrapper {
    --tv-offset-y: 17%;
    --tv-scale-y: 91%;
    container-type: inline-size;
    position: relative;
    width: min(1215px, calc(100vw - 32px), calc((100vh - 32px) * 1.2006));
    width: min(1215px, calc(100vw - 32px), calc((100svh - 32px) * 1.2006));
    aspect-ratio: 1215 / 1012;
    margin: 0 auto 16px;
    flex: 0 0 auto;
}

#tvWrapper::before {
    content: "";
    position: absolute;
    inset: auto;
    left: 0;
    top: var(--tv-offset-y);
    width: 100%;
    height: var(--tv-scale-y);
    background: url("../images/tv/cabinet.png") center center no-repeat;
    background-size: contain;
    pointer-events: none;
    z-index: 20;
    filter:
        drop-shadow(0 32px 28px rgba(0, 0, 0, .58))
        drop-shadow(0 0 18px rgba(255, 184, 96, .08));
}

#vcrDeck {
    position: absolute;
    z-index: 25;
    left: 50%;
    top: 7%;
    width: 50%;
    height: auto;
    transform: translateX(-50%);
    pointer-events: none;
    user-select: none;
    filter:
        drop-shadow(0 10px 7px rgba(0, 0, 0, .46))
        drop-shadow(0 0 10px rgba(0, 0, 0, .35));
}

#vcrClock {
    position: absolute;
    z-index: 26;
    left: 61.4%;
    top: 11%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    user-select: none;
    color: rgba(67, 255, 50, .86);
    font-family: "DS-Digital", "DSEG7 Classic", "Digital-7 Mono", "Segment7", "LCD", "Courier New", monospace;
    font-variant-numeric: tabular-nums;
    font-weight: 400;
    font-size: clamp(12px, 1.9cqw, 30px);
    line-height: 1;
    letter-spacing: 2px;
    text-shadow:
        0 0 4px rgba(67, 255, 50, .75),
        0 0 10px rgba(67, 255, 50, .55),
        0 0 18px rgba(67, 255, 50, .35);
    mix-blend-mode: screen;
    animation: vcr-clock-flash 1.4s steps(1, end) infinite;
}

#vcrClock span {
    margin-left: .35em;
    font-size: .42em;
    letter-spacing: 1px;
}

@keyframes vcr-clock-flash {
    0%,
    49% {
        opacity: .92;
    }

    50%,
    100% {
        opacity: .12;
    }
}

#VolumePrompt {
    position: absolute;
    z-index: 30;
    top: calc(var(--tv-offset-y) + 11.75%);
    right: 4.75%;
    width: 14%;
    aspect-ratio: 1 / 1;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #ffe57a;
    cursor: pointer;
    font-family: "Star4000", monospace;
}

#VolumePrompt::before,
#VolumePrompt::after {
    content: "";
    position: absolute;
    inset: 17%;
    border: 3px solid rgba(255, 229, 122, .96);
    border-radius: 50%;
    box-shadow:
        0 0 14px rgba(255, 229, 122, .82),
        inset 0 0 10px rgba(255, 229, 122, .28);
    animation: volume-pulse 1.35s ease-in-out infinite;
}

#VolumePrompt::after {
    inset: 8%;
    opacity: .42;
    animation-delay: .3s;
}

#VolumePrompt span {
    position: absolute;
    left: 110%;
    top: 24%;
    width: 170px;
    padding: 7px 9px 6px;
    border: 2px solid rgba(255, 229, 122, .88);
    border-radius: 4px;
    background: rgba(0, 0, 0, .82);
    box-shadow: 0 0 18px rgba(255, 229, 122, .35);
    font-size: clamp(12.6px, 1.26cqw, 19.8px);
    line-height: 1.1;
    text-align: center;
    text-shadow: 2px 2px 0 #000;
}

#VolumePrompt span::after {
    content: "";
    position: absolute;
    left: -13px;
    top: 50%;
    width: 13px;
    height: 2px;
    background: #ffe57a;
    box-shadow: 0 0 10px rgba(255, 229, 122, .7);
}

#VolumePrompt.hidden {
    display: none;
}

@keyframes volume-pulse {
    0% {
        transform: scale(.96);
        opacity: .72;
    }

    50% {
        transform: scale(1.08);
        opacity: 1;
    }

    100% {
        transform: scale(.96);
        opacity: .72;
    }
}

/* ----------------------------------------------------------
   WeatherStar Position
---------------------------------------------------------- */

#divTwc {
    container-type: size;
    position: absolute;
    z-index: 10;
    left: 7.5%;
    top: calc(var(--tv-offset-y) + 14.01%);
    width: 70%;
    height: 61%;
    max-width: none;
    margin: 0;
    overflow: hidden;
    background: #050505;
    border-radius: 7% / 9%;
    box-shadow:
        inset 0 0 18px rgba(0, 0, 0, .72),
        inset 0 0 4px rgba(255, 255, 255, .18);
}

#container {
    --weather-screen-scale: min(
        calc(100cqw / 640px),
        calc(100cqh / 480px)
    );
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(var(--weather-screen-scale));
    transform-origin: center center;
}

/* ----------------------------------------------------------
   Responsive
---------------------------------------------------------- */

@media (max-width: 900px) {

    #tvWrapper {
        width: calc(100vw - 24px);
        margin: 12px auto;
    }

    #homeLink {
        top: 12px;
        left: 12px;
        font-size: 14px;
        letter-spacing: 1.5px;
    }

    .location-prompt {
        top: 94px;
        left: 12px;
        max-width: min(300px, calc(100vw - 24px));
    }

}

@media (orientation: portrait) and (max-width: 700px) {

    body {
        justify-content: flex-start;
        padding-top: 0;
    }

    #tvWrapper {
        margin-top: 46px;
    }

}

@media (max-width: 700px) {

    body {
        overflow: hidden;
        justify-content: flex-start;
        padding-top: 0;
    }

    #tvWrapper {
        --tv-offset-y: 35%;
        --tv-scale-y: 91%;
        width: min(100vw - 12px, calc((100svh - 12px) * 1.2006));
        height: auto;
        aspect-ratio: 1215 / 1012;
        margin: 28px auto 6px;
    }

    #tvWrapper::before {
        inset: auto;
        left: 0;
        top: var(--tv-offset-y);
        width: 100%;
        height: var(--tv-scale-y);
    }

    #vcrDeck {
        top: 25%;
    }

    #vcrClock {
        top: 29%;
        font-size: clamp(9.6px, 1.52cqw, 24px);
    }

    #divTwc {
        left: 9%;
        top: calc(var(--tv-offset-y) + 10.01%);
        width: 67%;
        height: 68.25%;
        transform: none;
        border-radius: 7% / 9%;
    }

    #container {
        --mobile-weather-screen-scale-x: calc(100cqw / 640px);
        --mobile-weather-screen-scale-y: calc(100cqh / 480px);
        transform:
            translate(-50%, -50%)
            scaleX(var(--mobile-weather-screen-scale-x))
            scaleY(var(--mobile-weather-screen-scale-y));
    }

    #VolumePrompt {
        display: block;
        top: calc(var(--tv-offset-y) + 11.75%);
        right: 4.9%;
        width: 14%;
    }

    #VolumePrompt span {
        left: 50%;
        right: auto;
        top: 116%;
        width: 122px;
        transform: translateX(-50%);
        font-size: 10.8px;
    }

    #VolumePrompt span::after {
        left: 50%;
        top: -11px;
        width: 2px;
        height: 11px;
        transform: translateX(-50%);
    }

    .location-prompt {
        top: 48px;
        left: 50%;
        width: min(285px, calc(100vw - 24px));
        max-width: none;
        transform: translateX(-50%);
    }

    #UseDeviceLocation {
        padding: 8px 11px 8px 9px;
        font-size: 12px;
        gap: 8px;
    }

    .location-icon {
        width: 24px;
        height: 24px;
    }

    .location-icon svg {
        width: 15px;
        height: 15px;
    }

}

/* The TV skin is now the chrome, so the simulator controls stay hidden. */

#divTwcBottom {
    display: none !important;
}

#divQuery {
    display: none !important;
}

#enabledDisplays,
#settings,
#divInfo,
.heading,
.info,
#version {
    display: none !important;
}
 
