/* ══════════════════════════════════════════════════════
   OLIVER TREE ARCHIVE — vinyl.css
   The era-browser now lives directly in the main nav row —
   it replaced the old text era-links (KRYPH / TREE / ...)
   so there's one row instead of two. Hover a record for a
   quick big-cover preview (positioned via vinyl.js); click
   one to jump to that era and start it playing. Reuses the
   site's existing tokens (--black, --white, --grey, --dim,
   --nav-h).
   ══════════════════════════════════════════════════════ */

/* ── Auto-play toggle ──────────────────────────────────── */
.vs-autoplay-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    padding: 4px 10px;
    cursor: pointer;
    font-family: "Space Mono", monospace;
    font-size: 8px;
    letter-spacing: 0.1em;
    color: var(--grey);
    transition: all 0.18s;
}

.vs-autoplay-toggle:hover {
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.05);
}

.vs-autoplay-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    flex-shrink: 0;
    transition: background 0.18s;
}

.vs-autoplay-toggle[aria-pressed="true"] {
    color: var(--white);
    border-color: rgba(74, 222, 128, 0.4);
}

.vs-autoplay-toggle[aria-pressed="true"] .vs-autoplay-dot {
    background: #4ade80;
    box-shadow: 0 0 6px rgba(74, 222, 128, 0.7);
}

/* ── The strip — sits inline in #main-nav, filling the space the old
   text era-links used to take up ─────────────────────────────────── */
.vs-shelf {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1 1 auto;
    min-width: 0;
    height: 100%;
    overflow-x: auto;
    overflow-y: visible;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.vs-shelf::-webkit-scrollbar {
    display: none;
}

.vs-record {
    position: relative;
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
    -webkit-tap-highlight-color: transparent;
}

.vs-record-main {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.vs-record-main:focus-visible,
.vs-record:focus-within {
    outline: 2px solid var(--vs-accent, #fff);
    outline-offset: 4px;
    border-radius: 50%;
}

/* Small "shuffle this era" icon — tucked in the corner, only shown once
   you're already looking at the record (hover/focus/previewing), so the
   strip doesn't look cluttered with icons at rest. */
.vs-record-shuffle {
    position: absolute;
    right: -4px;
    bottom: -4px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #111114;
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: var(--dim);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    z-index: 3;
    opacity: 0;
    transform: scale(0.7);
    transition: opacity 0.18s ease, transform 0.18s ease, color 0.18s ease,
        border-color 0.18s ease;
}

.vs-record:hover .vs-record-shuffle,
.vs-record:focus-within .vs-record-shuffle,
.vs-record.is-previewing .vs-record-shuffle {
    opacity: 1;
    transform: scale(1);
}

.vs-record-shuffle:hover,
.vs-record-shuffle:focus-visible {
    color: var(--vs-accent, var(--white));
    border-color: var(--vs-accent, rgba(255, 255, 255, 0.5));
}

/* Small square sleeve, sitting on top of the disc */
.vs-sleeve {
    position: absolute;
    top: 0;
    left: 0;
    width: 36px;
    height: 36px;
    display: block;
    border-radius: 2px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 4px 10px -4px rgba(0, 0, 0, 0.7);
    background: #111;
    transform-origin: 15% 50%;
    transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1),
        box-shadow 0.32s ease;
    z-index: 2;
}

.vs-sleeve-art {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.9) brightness(0.85);
    transition: filter 0.3s ease;
}

/* The record itself — a sliver peeks out, slides out further on hover */
.vs-disc {
    position: absolute;
    top: 0;
    left: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    z-index: 1;
    transform: translateX(3%);
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    background: repeating-radial-gradient(
            circle at center,
            rgba(255, 255, 255, 0.06) 0px,
            rgba(255, 255, 255, 0.06) 1px,
            transparent 1px,
            transparent 2px
        ),
        radial-gradient(circle at 35% 30%, #2b2b2b 0%, #0a0a0a 72%);
    box-shadow: 0 4px 10px -4px rgba(0, 0, 0, 0.75);
}

.vs-disc-art {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 46%;
    height: 46%;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.vs-disc-hole {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #050505;
}

.vs-record:hover .vs-sleeve,
.vs-record:focus-within .vs-sleeve,
.vs-record.is-previewing .vs-sleeve {
    transform: rotate(-10deg) translate(-16%, 4%);
    box-shadow: 0 8px 16px -4px rgba(0, 0, 0, 0.85);
}

.vs-record:hover .vs-sleeve-art,
.vs-record.is-previewing .vs-sleeve-art {
    filter: saturate(1) brightness(1);
}

.vs-record:hover .vs-disc,
.vs-record:focus-within .vs-disc,
.vs-record.is-previewing .vs-disc {
    transform: translateX(26%) rotate(20deg);
}

/* Currently-scrolled era, kept in sync by the scroll-spy in script.js —
   same idea as the old nav-pills' .active state. */
.vs-record.active .vs-sleeve {
    box-shadow: 0 0 0 2px var(--vs-accent, var(--white)),
        0 4px 10px -4px rgba(0, 0, 0, 0.7);
}

/* ── Hover tooltip: a single floating "giant cover" preview, shared by
   all records and positioned via JS (see vinyl.js). It lives outside the
   scrolling .vs-shelf container on purpose — an element positioned
   relative to a container with overflow-x:auto also gets clipped on the
   y-axis (that's a real CSS quirk: you can't mix overflow-x:auto with
   overflow-y:visible on the same box), which silently hid an earlier,
   simpler version of this tooltip. Using position:fixed and computing
   its position in JS sidesteps that entirely. */
.vs-tip {
    position: fixed;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 160px;
    padding: 10px 10px 12px;
    background: #111114;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    box-shadow: 0 18px 40px -10px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(0, 0, 0, 0.4);
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    transition: opacity 0.16s ease, transform 0.16s ease;
    z-index: 500;
}

.vs-tip::before {
    content: "";
    position: absolute;
    top: -5px;
    left: var(--vs-tip-arrow, 20px);
    transform: rotate(45deg);
    width: 9px;
    height: 9px;
    background: #111114;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.vs-tip.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.vs-tip-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 3px;
    margin-bottom: 8px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.vs-tip-num {
    font-family: "Space Mono", monospace;
    font-size: 9px;
    letter-spacing: 0.12em;
    color: var(--vs-accent, var(--grey));
}

.vs-tip-name {
    font-family: "Bebas Neue", sans-serif;
    font-size: 18px;
    line-height: 1.1;
    color: var(--white);
    margin-top: 2px;
}

.vs-tip-years {
    font-family: "Space Mono", monospace;
    font-size: 9px;
    letter-spacing: 0.06em;
    color: var(--grey);
    margin-top: 3px;
}

.vs-tip-cta {
    font-family: "Space Mono", monospace;
    font-size: 8.5px;
    letter-spacing: 0.03em;
    color: var(--dim);
    margin-top: 6px;
}

/* Little pulse when a record is actually picked (clicked) */
.vs-record.is-selected .vs-disc {
    animation: vs-pulse 0.6s ease;
}

@keyframes vs-pulse {
    0% {
        filter: drop-shadow(0 0 0 transparent);
    }
    40% {
        filter: drop-shadow(0 0 10px var(--vs-accent, #fff));
    }
    100% {
        filter: drop-shadow(0 0 0 transparent);
    }
}

@media (max-width: 720px) {
    .vs-shelf {
        gap: 8px;
    }
    .vs-tip {
        width: 132px;
    }
}

@media (max-width: 640px) {
    .vs-shelf {
        flex-basis: 100%;
        width: 100%;
        height: 40px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .vs-sleeve,
    .vs-disc,
    .vs-tip,
    .vs-record.is-selected .vs-disc {
        transition: none !important;
        animation: none !important;
    }
}
