
/* ==========================================
   JINGLEBELLE'S CHRISTMAS JUKEBOX
   Vintage Santa's Workshop Edition
   ========================================== */

.jukebox-section {
    text-align: center;
    padding: 35px 18px 30px;
}

.jb-shell {
    --red: #c52c35;
    --darkred: #8f1d28;
    --green: #4b8724;
    --darkgreen: #174a27;
    --forest: #062211;
    --cream: #fff9ec;

    max-width: 660px;
    margin: 0 auto;
    color: #ffffff;
    font-family: system-ui, Arial, sans-serif;

    filter: drop-shadow(
        0 13px 13px rgba(20, 55, 30, 0.22)
    );
}

/* ==========================================
   VINTAGE RED ARCH
   ========================================== */

.jb-arch {
    height: 175px;
    position: relative;

    border: 13px solid var(--darkred);
    border-bottom: 0;
    border-radius: 330px 330px 0 0;

    background: linear-gradient(
        135deg,
        #ef555d 0%,
        #c52c35 45%,
        #8f1d28 100%
    );

    padding: 16px 16px 0;

    box-shadow:
        inset 0 0 0 6px #ffffff,
        0 0 0 5px #ffffff;
}

.jb-arch-inner {
    height: 100%;
    border-radius: 300px 300px 0 0;

    background: radial-gradient(
        ellipse at 50% 25%,
        #5a9b3c 0%,
        #307333 48%,
        #104324 100%
    );

    border: 6px solid #ffffff;
    border-bottom: 0;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    text-shadow: 1px 3px 2px #062211;
    letter-spacing: 2px;
}

.jb-star {
    font-size: 30px;
    color: #fff7db;
    text-shadow:
        0 0 8px rgba(255, 255, 255, 0.8),
        0 0 16px rgba(255, 244, 190, 0.5);
}

.jb-brand {
    font-size: clamp(18px, 4vw, 28px);
    font-weight: 1000;
    color: #ffffff;
}

.jb-brand-small {
    font-size: 12px;
    font-weight: 900;
    color: #fff4dc;
    letter-spacing: 3px;
    margin-top: 4px;
}

/* ==========================================
   MAIN GREEN JUKEBOX BODY
   ========================================== */

.jb-main {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) 40px;

    background: var(--darkgreen);

    border-left: 6px solid #ffffff;
    border-right: 6px solid #ffffff;
}

/* Candy cane stripes only on the sides */

.jb-side {
    background: repeating-linear-gradient(
        135deg,
        #ffffff 0 14px,
        #ffffff 14px 22px,
        #cf303a 22px 36px,
        #cf303a 36px 44px
    );

    box-shadow:
        inset 0 0 0 4px #236436,
        inset 0 0 9px rgba(0, 0, 0, 0.2);
}

.jb-center {
    padding: 15px 18px 22px;

    background: linear-gradient(
        135deg,
        #4b8724 0%,
        #32752d 45%,
        #174a27 100%
    );
}

/* ==========================================
   NOW PLAYING WINDOW
   ========================================== */

.jb-now-playing {
    background: linear-gradient(
        145deg,
        #174a30,
        #062211
    );

    border: 5px solid #fff9ec;
    border-radius: 18px;

    padding: 20px 18px 21px;

    box-shadow:
        inset 0 0 0 3px #bd3039,
        0 5px 12px rgba(0, 0, 0, 0.3);
}

.jb-kicker,
.jb-selector-heading {
    font-weight: 900;
    letter-spacing: 2px;
    font-size: 12px;
    color: #fff9ec;
}

/* ==========================================
   BIGGER VINYL RECORD
   ========================================== */

.jb-record {
    height: 124px;
    width: 124px;
    border-radius: 50%;
    margin: 15px auto;

    background: repeating-radial-gradient(
        circle,
        #121417 0 3px,
        #242729 4px 5px,
        #101113 6px 8px
    );

    display: grid;
    place-items: center;

    border: 4px solid #34383b;

    box-shadow:
        0 4px 12px #001c16,
        0 0 12px rgba(255, 255, 255, 0.18);
}

.jb-record-label {
    display: grid;
    place-items: center;

    width: 51px;
    height: 51px;
    border-radius: 50%;

    background: #c52c35;
    border: 3px solid #fff9ec;

    font-size: 12px;
    font-weight: 900;
    line-height: 1.15;
    color: #ffffff;
}

.jb-record.is-playing {
    animation: jb-spin 3s linear infinite;
}

@keyframes jb-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Warm white glow while playing */

.jb-shell:has(.jb-record.is-playing)
.jb-now-playing {
    box-shadow:
        inset 0 0 0 3px #bd3039,
        0 0 18px rgba(255, 250, 225, 0.55),
        0 0 30px rgba(255, 245, 205, 0.22);
}

/* ==========================================
   SONG INFORMATION
   ========================================== */

.jb-now-playing h2 {
    color: #ffffff;
    font-size: clamp(17px, 3vw, 22px);
    margin: 5px 0 3px;
}

.jb-now-playing p {
    margin: 0;
    color: #e5f1e4;
    font-size: 13px;
}

/* ==========================================
   AUDIO PROGRESS
   ========================================== */

.jb-time {
    display: flex;
    gap: 9px;
    align-items: center;
    margin: 17px auto 10px;

    font-size: 12px;
    font-variant-numeric: tabular-nums;
    color: #ffffff;
}

.jb-time input {
    flex: 1;
    min-width: 0;
    accent-color: #e44851;
    cursor: pointer;
}

/* ==========================================
   PLAYER CONTROLS
   ========================================== */

.jb-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

.jb-controls button {
    border: 2px solid #fff9ec;

    background: linear-gradient(
        #ed5159,
        #bd202b
    );

    color: #ffffff;
    border-radius: 50%;

    width: 43px;
    height: 43px;

    font-size: 12px;
    font-weight: 900;
    cursor: pointer;

    box-shadow: 0 3px 0 #76151e;
}

.jb-controls .jb-play {
    width: 57px;
    height: 57px;
    font-size: 22px;

    background: linear-gradient(
        #ffffff,
        #e8eee7
    );

    color: #b8232e;
    box-shadow: 0 3px 0 #9ea99d;
}

.jb-controls button:hover,
.jb-controls button:focus-visible {
    filter: brightness(1.1);
    outline: 2px solid #ffffff;
    outline-offset: 3px;
}

/* ==========================================
   DOWNLOAD BUTTON
   ========================================== */

.jb-download {
    display: inline-block;

    background: #fff9ec;
    color: #17602e !important;

    text-decoration: none !important;
    border: 2px solid #c52c35;
    border-radius: 30px;

    padding: 10px 18px;
    margin-top: 17px;

    font-weight: 900;
    font-size: 13px;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.jb-download:hover {
    background: #ffffff;
    transform: translateY(-2px);
}

.jb-download[aria-disabled="true"] {
    opacity: 0.55;
    pointer-events: none;
}

.jb-status {
    min-height: 1.2em;
    margin-top: 8px !important;
    color: #fff9ec !important;
}

/* ==========================================
   SONG SELECTION
   ========================================== */

.jb-selector-heading {
    padding: 20px 0 10px;
    color: #fff9ec;
}

.jb-track-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    text-align: left;
}

.jb-track {
    display: flex;
    gap: 9px;
    align-items: center;
    text-align: left;
    min-width: 0;

    padding: 9px;

    border: 2px solid #fff9ec;
    border-radius: 7px;

    background: linear-gradient(
        #fffdf7,
        #f0f3e8
    );

    color: #174a27;
    cursor: pointer;

    transition:
        background 0.2s ease,
        border-color 0.2s ease;
}

.jb-track:hover,
.jb-track:focus-visible {
    background: #ffffff;
    border-color: #c52c35;

    outline: 2px solid #ffffff;
    outline-offset: 1px;
}

.jb-track[aria-pressed="true"] {
    background: #ffe7e7;
    border-color: #c52c35;
}

.jb-track-num {
    font-size: 12px;
    font-weight: 900;
    color: #c52c35;
}

.jb-track-copy {
    min-width: 0;
    flex: 1;
}

.jb-track-copy strong,
.jb-track-copy small {
    display: block;
    overflow-wrap: anywhere;
}

.jb-track-copy strong {
    font-size: 12px;
    line-height: 1.25;
    color: #174a27;
}

.jb-track-copy small {
    font-size: 10px;
    color: #637363;
    margin-top: 3px;
}

.jb-track-note {
    font-size: 20px;
    color: #c52c35;
}

/* ==========================================
   SOLID GREEN BASE
   ========================================== */

.jb-base {
    position: relative;

    border: 6px solid #fff9ec;
    border-top: 5px solid #c52c35;
    border-radius: 0 0 32px 32px;

    background: linear-gradient(
        #347a35,
        #174a27
    );

    padding: 15px 6px;

    font-size: 11px;
    letter-spacing: 2px;
    font-weight: 900;

    color: #ffffff;

    text-shadow: 1px 2px 2px #062211;
}

.jb-base span {
    color: #fff9ec;
}

/* ==========================================
   HELP TEXT
   ========================================== */

.jb-help {
    font-size: 13px;
    color: #526b68;
    margin: 18px auto 0;
    max-width: 620px;
}

/* ==========================================
   MOBILE
   ========================================== */

@media (max-width: 600px) {

    .jb-main {
        grid-template-columns:
            17px minmax(0, 1fr) 17px;
    }

    .jb-center {
        padding: 12px 8px 18px;
    }

    .jb-arch {
        height: 140px;
        padding: 10px 10px 0;
        border-width: 9px;
    }

    .jb-brand-small {
        font-size: 9px;
        letter-spacing: 1px;
    }

    .jb-track-list {
        grid-template-columns: 1fr;
    }

    .jb-now-playing {
        padding: 13px 10px;
    }

    .jb-record {
        width: 108px;
        height: 108px;
    }

    .jb-base {
        font-size: 9px;
        letter-spacing: 1px;
    }

    .jukebox-section {
        padding: 25px 8px;
    }
}

/* ==========================================
   REDUCED MOTION
   ========================================== */

@media (prefers-reduced-motion: reduce) {

    .jb-record.is-playing {
        animation: none;
    }

    .jb-download,
    .jb-track {
        transition: none;
    }
}
