/**
 * Radio Station Player Styles
 */

.radio-station-player {
    max-width: 600px;
    margin: 20px auto;
    padding: 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.radio-station-header {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.radio-station-name {
    margin: 0 0 10px 0;
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.radio-station-description {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
}

.radio-station-controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Play/Pause Button */
.radio-play-pause-btn {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: none;
    background: #ffffff;
    color: #667eea;
    font-size: 32px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.radio-play-pause-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.radio-play-pause-btn:active {
    transform: scale(0.95);
}

/* Track Info */
.radio-track-info {
    text-align: center;
}

.radio-current-track {
    margin-bottom: 15px;
}

.track-label {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 5px;
}

.track-name {
    display: block;
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
}

/* Progress Bar */
.radio-track-progress {
    margin-top: 15px;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    cursor: pointer;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: #ffffff;
    border-radius: 3px;
    transition: width 0.1s linear;
}

.time-display {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
}

/* Additional Controls */
.radio-additional-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.radio-prev-btn,
.radio-next-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.5);
    background: transparent;
    color: #ffffff;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.radio-prev-btn:hover,
.radio-next-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: #ffffff;
    transform: scale(1.1);
}

/* Volume Control */
.radio-volume-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.volume-icon {
    font-size: 20px;
}

.volume-slider {
    width: 100px;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: #ffffff;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.volume-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #ffffff;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Playlist */
.radio-playlist {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 2px solid rgba(255, 255, 255, 0.2);
}

.radio-playlist h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.9);
}

.playlist-items {
    list-style: none;
    margin: 0 0 15px 0;
    padding: 0;
    max-height: 300px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 10px;
}

.playlist-item {
    padding: 12px 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.playlist-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.playlist-item.active {
    background: rgba(255, 255, 255, 0.2);
    font-weight: 600;
}

.track-number {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    min-width: 30px;
}

.track-title {
    flex: 1;
    font-size: 14px;
    color: #ffffff;
}

.toggle-playlist-btn {
    width: 100%;
    padding: 12px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    background: transparent;
    color: #ffffff;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.toggle-playlist-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #ffffff;
}

/* Scrollbar Styling */
.playlist-items::-webkit-scrollbar {
    width: 8px;
}

.playlist-items::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

.playlist-items::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

.playlist-items::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Responsive Design */
@media (max-width: 640px) {
    .radio-station-player {
        padding: 20px;
        margin: 10px;
    }
    
    .radio-station-name {
        font-size: 24px;
    }
    
    .radio-play-pause-btn {
        width: 70px;
        height: 70px;
        font-size: 28px;
    }
    
    .radio-additional-controls {
        flex-wrap: wrap;
    }
    
    .radio-volume-control {
        width: 100%;
        justify-content: center;
    }
}

/* Audio element (hidden) */
.radio-audio-element {
    display: none;
}

/* Sticky Mobile Footer Styles */
@media (max-width: 768px) {
    .radio-station-player.sticky-mobile {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 9999;
        margin: 0;
        max-width: 100%;
        border-radius: 15px 15px 0 0;
        padding: 15px;
        box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.3);
        transition: transform 0.3s ease-in-out;
    }

    .radio-station-player.sticky-mobile.minimized {
        transform: translateY(calc(100% - 60px));
    }

    .radio-station-player.sticky-mobile .radio-station-header {
        margin-bottom: 10px;
        padding-bottom: 10px;
    }

    .radio-station-player.sticky-mobile .radio-station-name {
        font-size: 18px;
    }

    .radio-station-player.sticky-mobile .radio-station-description {
        display: none;
    }

    .radio-station-player.sticky-mobile .radio-play-pause-btn {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }

    .radio-station-player.sticky-mobile .radio-playlist {
        max-height: 200px;
        overflow-y: auto;
    }
    
    /* Add a toggle button for minimized state */
    .radio-station-player.sticky-mobile .minimize-toggle {
        position: absolute;
        top: -30px;
        right: 20px;
        background: #764ba2;
        color: white;
        border: none;
        border-radius: 10px 10px 0 0;
        padding: 5px 15px;
        font-size: 12px;
        cursor: pointer;
        display: block;
    }
}

@media (min-width: 769px) {
    .radio-station-player .minimize-toggle {
        display: none;
    }
}
