/* ═══════════════════════════════════════════════════════════════
   MINI PLAYER — Museo delle Voci Sintetiche
   Persistent audio player widget styles
   ═══════════════════════════════════════════════════════════════ */

.mva-mini-player {
    position: fixed;
    bottom: 80px; /* Above footer */
    right: 20px;
    z-index: 9000;

    width: 320px;

    background: linear-gradient(
        145deg,
        rgba(15, 15, 15, 0.98) 0%,
        rgba(8, 8, 8, 0.98) 100%
    );
    border: 1px solid rgba(201, 162, 39, 0.25);
    border-radius: 12px;

    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.03) inset,
        0 0 60px rgba(201, 162, 39, 0.08);

    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);

    /* Hidden by default */
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;

    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.mva-mini-player.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.mva-mini-player__inner {
    position: relative;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ─── Header Info ──────────────────────────────────────────── */

.mva-mini-player__info {
    padding-right: 60px; /* Space for close/music buttons */
}

.mva-mini-player__now-playing {
    font-family: 'DM Sans', -apple-system, sans-serif;
    font-size: 0.6rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(201, 162, 39, 0.7);
    margin-bottom: 4px;
}

.mva-mini-player__title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.1rem;
    font-weight: 500;
    color: #f5f5f5;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mva-mini-player__artist {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 0.85rem;
    font-style: italic;
    color: rgba(245, 245, 245, 0.5);
}

/* ─── Controls ─────────────────────────────────────────────── */

.mva-mini-player__controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mva-mini-player__btn {
    width: 40px;
    height: 40px;

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

    background: rgba(201, 162, 39, 0.08);
    border: 1px solid rgba(201, 162, 39, 0.2);
    border-radius: 50%;

    color: #c9a227;
    cursor: pointer;

    transition: all 0.25s ease;
}

.mva-mini-player__btn:hover {
    background: rgba(201, 162, 39, 0.15);
    border-color: rgba(201, 162, 39, 0.4);
    transform: scale(1.05);
}

.mva-mini-player__btn:active {
    transform: scale(0.95);
}

.mva-mini-player__btn svg {
    width: 18px;
    height: 18px;
}

/* Play/Pause toggle */
.mva-mini-player__btn--play .icon-pause {
    display: none;
}

.mva-mini-player__btn--play.playing .icon-play {
    display: none;
}

.mva-mini-player__btn--play.playing .icon-pause {
    display: block;
}

.mva-mini-player__btn--play {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #c9a227 0%, #d4af37 100%);
    border: none;
    color: #0a0a0a;
}

.mva-mini-player__btn--play:hover {
    background: linear-gradient(135deg, #d4af37 0%, #e5c97a 100%);
    box-shadow: 0 0 20px rgba(201, 162, 39, 0.4);
}

.mva-mini-player__btn--play svg {
    width: 22px;
    height: 22px;
}

/* ─── Progress Bar ─────────────────────────────────────────── */

.mva-mini-player__progress {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mva-mini-player__progress-bar {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    cursor: pointer;
    overflow: hidden;
    transition: height 0.2s ease;
}

.mva-mini-player__progress-bar:hover {
    height: 6px;
}

.mva-mini-player__progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #c9a227 0%, #d4af37 100%);
    border-radius: 2px;
    transition: width 0.1s linear;
}

.mva-mini-player__time {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    color: rgba(245, 245, 245, 0.5);
    white-space: nowrap;
    min-width: 70px;
    text-align: right;
}

/* ─── Action Buttons (top right) ───────────────────────────── */

.mva-mini-player__close,
.mva-mini-player__go-music {
    position: absolute;
    top: 12px;

    width: 28px;
    height: 28px;

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

    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;

    color: rgba(245, 245, 245, 0.5);
    cursor: pointer;
    text-decoration: none;

    transition: all 0.2s ease;
}

.mva-mini-player__close {
    right: 12px;
}

.mva-mini-player__go-music {
    right: 46px;
}

.mva-mini-player__close:hover,
.mva-mini-player__go-music:hover {
    background: rgba(201, 162, 39, 0.15);
    border-color: rgba(201, 162, 39, 0.3);
    color: #c9a227;
}

.mva-mini-player__close svg,
.mva-mini-player__go-music svg {
    width: 14px;
    height: 14px;
}

/* ─── Responsive ───────────────────────────────────────────── */

@media (max-width: 480px) {
    .mva-mini-player {
        left: 10px;
        right: 10px;
        width: auto;
        bottom: 70px;
    }
}

/* ─── Animation for glow effect ────────────────────────────── */

@keyframes miniPlayerGlow {
    0%, 100% {
        box-shadow:
            0 8px 32px rgba(0, 0, 0, 0.5),
            0 0 0 1px rgba(255, 255, 255, 0.03) inset,
            0 0 60px rgba(201, 162, 39, 0.08);
    }
    50% {
        box-shadow:
            0 8px 32px rgba(0, 0, 0, 0.5),
            0 0 0 1px rgba(255, 255, 255, 0.03) inset,
            0 0 80px rgba(201, 162, 39, 0.12);
    }
}

.mva-mini-player.visible {
    animation: miniPlayerGlow 4s ease-in-out infinite;
}
