/* =========================================================
   Nothing but Joyful – player.css
   ========================================================= */

/* ── Card ─────────────────────────────────────────────── */
.nbj-player-card {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem;
    background: linear-gradient(145deg, #ffffff 0%, #f0f4ff 100%);
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    padding: 1.75rem 2rem 3.5rem;
    max-width: 620px;
    margin: 0 auto;
    text-align: left;
    overflow: hidden;
    border: 1px solid rgba(30, 77, 183, 0.08);
}

/* ── Album art ────────────────────────────────────────── */
.nbj-player-card__art {
    flex-shrink: 0;
}

.nbj-player-card__art img {
    width: 110px;
    height: 110px;
    border-radius: 0.875rem;
    object-fit: cover;
    display: block;
    box-shadow: 0 4px 16px rgba(30, 58, 110, 0.18);
}

/* ── Info column ──────────────────────────────────────── */
.nbj-player-card__info {
    flex: 1 1 200px;
    min-width: 0;
}

/* ── Live badge ───────────────────────────────────────── */
.nbj-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: var(--color-white);
    background: linear-gradient(90deg, #e53935, #c62828);
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    margin-bottom: 0.6rem;
    box-shadow: 0 2px 8px rgba(229, 57, 53, 0.35);
}

/* ── Now playing label ────────────────────────────────── */
.nbj-now-playing-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--color-muted);
    margin: 0 0 0.25rem;
}

/* ── Track title with marquee ─────────────────────────── */
.nbj-track-title-wrap {
    overflow: hidden;
    margin: 0 0 1rem;
}

#nbj-track-title {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-navy);
    margin: 0;
    white-space: nowrap;
    display: inline-block;
}

/* Animate only when the text overflows its container */
#nbj-track-title.is-scrolling {
    animation: nbj-marquee 18s linear infinite;
    padding-right: 4rem;
}

@keyframes nbj-marquee {
    0%   { transform: translateX(0); }
    10%  { transform: translateX(0); }          /* pause at start */
    90%  { transform: translateX(-100%); }
    100% { transform: translateX(-100%); }      /* pause at end before reset */
}

/* ── Controls ─────────────────────────────────────────── */
.nbj-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Play button – larger, filled, prominent */
.nbj-play-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    border: none;
    background: var(--color-blue);
    color: var(--color-white);
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(30, 77, 183, 0.35);
    transition: background-color 0.2s, transform 0.15s, box-shadow 0.2s;
    flex-shrink: 0;
}

.nbj-play-btn:hover,
.nbj-play-btn:focus-visible {
    background: var(--color-navy);
    transform: scale(1.06);
    outline: none;
}

.nbj-play-btn.is-playing {
    box-shadow: 0 0 0 5px rgba(30, 77, 183, 0.2), 0 4px 14px rgba(30, 77, 183, 0.35);
}

/* Volume button – smaller, outline style */
.nbj-volume-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 50%;
    border: 2px solid rgba(30, 77, 183, 0.3);
    background: transparent;
    color: var(--color-blue);
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s, color 0.2s;
    flex-shrink: 0;
}

.nbj-volume-btn:hover,
.nbj-volume-btn:focus-visible {
    border-color: var(--color-blue);
    background: var(--color-blue);
    color: var(--color-white);
    outline: none;
}

/* ── Animated waveform bar ────────────────────────────── */
.nbj-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2rem;
    background: linear-gradient(to right, rgba(30, 58, 110, 0.05), rgba(30, 58, 110, 0.03));
    border-top: 1px solid rgba(30, 58, 110, 0.07);
    display: flex;
    align-items: center;
    padding: 0 1.25rem;
    gap: 0.75rem;
}

.nbj-waveform {
    display: flex;
    align-items: center;
    gap: 3px;
    height: 14px;
    margin-right: auto;
}

.nbj-waveform i {
    display: block;
    width: 3px;
    border-radius: 2px;
    background: #e53935;
    animation: nbj-wave 1.1s ease-in-out infinite;
    transform-origin: bottom;
}

.nbj-waveform i:nth-child(1) { height: 5px;  animation-delay: 0.0s; }
.nbj-waveform i:nth-child(2) { height: 12px; animation-delay: 0.2s; }
.nbj-waveform i:nth-child(3) { height: 14px; animation-delay: 0.1s; }
.nbj-waveform i:nth-child(4) { height: 9px;  animation-delay: 0.3s; }
.nbj-waveform i:nth-child(5) { height: 6px;  animation-delay: 0.15s; }

@keyframes nbj-wave {
    0%, 100% { transform: scaleY(1);   opacity: 1;   }
    50%       { transform: scaleY(0.3); opacity: 0.5; }
}

/* Pause waveform when not playing */
.nbj-waveform.is-paused i {
    animation-play-state: paused;
    opacity: 0.35;
}

.nbj-progress-bar__live-label {
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    color: #e53935;
}

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 480px) {
    .nbj-player-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .nbj-controls {
        justify-content: center;
    }

    #nbj-track-title {
        white-space: normal;
    }

    #nbj-track-title.is-scrolling {
        animation: none;
        white-space: normal;
    }
}
