/**
 * Radio Continuous Player & PJAX Styles
 * Modern Glassmorphism & Vibrant Animations
 */

/* ==========================================================================
   PJAX Page Transitions & Loader
   ========================================================================== */

/* Top Progress Loader Bar */
.rcp-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #c6a75e, #f39c12, #e74c3c);
    box-shadow: 0 0 10px rgba(198, 167, 94, 0.8);
    width: 0%;
    z-index: 999999;
    transition: width 0.3s ease, opacity 0.3s ease;
    display: none;
    pointer-events: none;
}

/* Container Animations */
.rcp-fade-out {
    opacity: 0.2;
    transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.rcp-fade-in {
    opacity: 1;
    transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   Persistent Floating Player Bar
   ========================================================================== */

.rcp-player-bar {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 92%;
    max-width: 960px;
    z-index: 99999;
    background: rgba(18, 18, 22, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 60px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(198, 167, 94, 0.15);
    padding: 10px 24px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: #ffffff;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.rcp-player-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

/* Radio Brand / Track Info */
.rcp-radio-info {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 220px;
}

.rcp-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(231, 76, 60, 0.2);
    border: 1px solid rgba(231, 76, 60, 0.5);
    color: #e74c3c;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
}

.rcp-pulse-dot {
    width: 7px;
    height: 7px;
    background-color: #e74c3c;
    border-radius: 50%;
    animation: rcpPulse 1.5s infinite;
}

@keyframes rcpPulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 8px rgba(231, 76, 60, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(231, 76, 60, 0);
    }
}

.rcp-track-details {
    display: flex;
    flex-direction: column;
}

.rcp-station-name {
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
}

.rcp-station-slogan {
    font-size: 11px;
    color: #c6a75e;
    opacity: 0.9;
    margin-top: 2px;
}

/* Controls */
.rcp-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

.rcp-btn-play {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #c6a75e, #a8873f);
    border: none;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(198, 167, 94, 0.4);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
    outline: none;
}

.rcp-btn-play:hover {
    transform: scale(1.08);
    box-shadow: 0 8px 24px rgba(198, 167, 94, 0.6);
}

.rcp-btn-play:active {
    transform: scale(0.96);
}

.rcp-icon-loading {
    animation: rcpSpin 1s linear infinite;
}

@keyframes rcpSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Equalizer Bars */
.rcp-equalizer {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 18px;
}

.rcp-equalizer .bar {
    width: 3px;
    height: 4px;
    background-color: #c6a75e;
    border-radius: 2px;
    transition: height 0.2s ease;
}

.rcp-equalizer.is-playing .bar:nth-child(1) { animation: rcpEq 1.2s infinite ease-in-out alternate; }
.rcp-equalizer.is-playing .bar:nth-child(2) { animation: rcpEq 0.8s infinite ease-in-out alternate 0.2s; }
.rcp-equalizer.is-playing .bar:nth-child(3) { animation: rcpEq 1.4s infinite ease-in-out alternate 0.4s; }
.rcp-equalizer.is-playing .bar:nth-child(4) { animation: rcpEq 1.0s infinite ease-in-out alternate 0.1s; }

@keyframes rcpEq {
    0% { height: 4px; }
    100% { height: 18px; }
}

/* Volume Box */
.rcp-volume-box {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rcp-btn-mute {
    background: transparent;
    border: none;
    color: #a0a0a0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    transition: color 0.2s ease;
}

.rcp-btn-mute:hover {
    color: #ffffff;
}

.rcp-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 80px;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.2);
    outline: none;
    cursor: pointer;
}

.rcp-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #c6a75e;
    cursor: pointer;
    box-shadow: 0 0 8px rgba(198, 167, 94, 0.8);
    transition: transform 0.15s ease;
}

.rcp-slider::-webkit-slider-thumb:hover {
    transform: scale(1.25);
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */

@media (max-width: 640px) {
    .rcp-player-bar {
        bottom: 10px;
        width: 95%;
        padding: 8px 16px;
        border-radius: 40px;
    }

    .rcp-radio-info {
        min-width: auto;
    }

    .rcp-station-slogan {
        display: none;
    }

    .rcp-slider {
        width: 60px;
    }
}
