/* Beatstream — custom styles for things Tailwind utilities can't express
   cleanly: native range inputs, scrollbars, waveform cursor. */

:root {
    --brand: #dc2626;
}

/* Native range inputs (volume slider) */
input[type="range"].volume-slider {
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    border-radius: 9999px;
    background: linear-gradient(to right, var(--brand) 0%, var(--brand) 80%, #3a3a3a 80%, #3a3a3a 100%);
    outline: none;
    cursor: pointer;
}

input[type="range"].volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    transition: transform 0.1s ease;
}

input[type="range"].volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

input[type="range"].volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border: none;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
}

/* Hide scrollbars (e.g. horizontal tab strips) */
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.no-scrollbar::-webkit-scrollbar {
    display: none;
    height: 0;
    width: 0;
}

/* Scrollbars */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #111111;
}

::-webkit-scrollbar-thumb {
    background: #2a2a2a;
    border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
    background: #3a3a3a;
}

/* Waveform seek cursor */
#player-waveform,
.waveform-canvas {
    cursor: pointer;
}

/* The player is a flex sibling below the scroll area (see header/footer.php),
   so it never overlaps page content and never intercepts clicks meant for
   links or buttons behind it. */

/* Toast animation */
@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateX(16px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast-enter {
    animation: toast-in 0.2s ease forwards;
}

/* Comment marker pulse on the track waveform */
@keyframes marker-pulse {
    0%, 100% { opacity: 0.85; }
    50% { opacity: 0.45; }
}

.waveform-marker {
    animation: marker-pulse 2.2s ease-in-out infinite;
}

/* Loading skeleton shimmer */
@keyframes shimmer {
    0% { background-position: -400px 0; }
    100% { background-position: 400px 0; }
}

.skeleton {
    background: #1a1a1a;
    background-image: linear-gradient(90deg, #1a1a1a 0px, #262626 40px, #1a1a1a 80px);
    background-size: 400px 100%;
    animation: shimmer 1.4s ease infinite;
}

/* Equalizer bars (animated playing indicator) */
@keyframes eq {
    0%, 100% { transform: scaleY(0.3); }
    50% { transform: scaleY(1); }
}

.eq-bar {
    display: inline-block;
    width: 3px;
    height: 100%;
    background: var(--brand);
    transform-origin: bottom;
    animation: eq 0.8s ease-in-out infinite;
}

/* Now-playing indicator on track rows/cards: white play -> white pause */
.pause-ico { display: none; }
.is-playing .play-tri { display: none; }
.is-playing .pause-ico { display: block; }

/* Soft-navigation progress bar (see pajax.js) */
html.pajax-loading::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--brand);
    z-index: 9999;
    transform-origin: left;
    animation: pajax-progress 0.9s ease-out forwards;
}

@keyframes pajax-progress {
    0%   { transform: scaleX(0); }
    60%  { transform: scaleX(0.7); }
    100% { transform: scaleX(1); opacity: 0.4; }
}
