/* MusicBox - Media Player Styles */

#music-player-container {
    position: fixed;
    bottom: 0;
    left: 280px;
    right: 280px;
    background: var(--bs-dark);
    padding: 1rem;
    z-index: 1000;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease-in-out;
}

@media (max-width: 991.98px) {
    #music-player-container {
        left: 0;
        right: 0;
    }
}

#music-player-container.player-hidden {
    transform: translateY(100%);
}

.player-toggle-btn {
    position: absolute;
    top: -30px;
    right: 20px;
    background: var(--bs-dark);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    padding: 5px 10px;
    color: var(--bs-light);
    cursor: pointer;
}

#music-player-container.hidden {
    transform: translateY(100%);
}

#player-track-cover {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
}

#player-track-info {
    margin-left: 15px;
    overflow: hidden;
}

#player-track-title {
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0;
}

#player-track-artist {
    font-size: 0.9rem;
    color: #999;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0;
}

#player-controls {
    display: flex;
    align-items: center;
}

#player-play-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #1DB954;
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

#player-play-btn i {
    font-size: 1.5rem;
}

#player-progress-container {
    flex-grow: 1;
    margin: 0 15px;
    display: flex;
    flex-direction: column;
    position: relative;
}

#waveform-canvas {
    display: none;
}

#player-progress {
    width: 100%;
    height: 5px;
    -webkit-appearance: none;
    appearance: none;
    background: #333;
    border-radius: 5px;
    outline: none;
    cursor: pointer;
    position: relative;
}

#player-time-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    margin-top: 5px;
    color: #999;
}

#player-progress::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    background: #1DB954;
    border-radius: 50%;
    cursor: pointer;
}

#player-progress::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: #1DB954;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

#player-volume-container {
    display: flex;
    align-items: center;
    width: 120px;
}

#player-volume-btn {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 0 10px 0 0;
}

#player-volume {
    width: 80px;
    height: 5px;
    -webkit-appearance: none;
    appearance: none;
    background: #333;
    border-radius: 5px;
    outline: none;
    cursor: pointer;
}

#player-volume::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 10px;
    height: 10px;
    background: #1DB954;
    border-radius: 50%;
    cursor: pointer;
}

#player-volume::-moz-range-thumb {
    width: 10px;
    height: 10px;
    background: #1DB954;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

/* Progress bar fill color */
#player-progress::-webkit-slider-runnable-track {
    background: linear-gradient(to right, #1DB954 var(--progress-percent, 0%), #333 var(--progress-percent, 0%));
    border-radius: 5px;
    height: 5px;
    border: none;
}

#player-progress::-moz-range-track {
    background: linear-gradient(to right, #1DB954 var(--progress-percent, 0%), #eee var(--progress-percent, 0%));
    border-radius: 5px;
    height: 5px;
    border: none;
}

/* Volume bar fill color */
#player-volume::-webkit-slider-runnable-track {
    background: linear-gradient(to right, #1DB954 var(--volume-percent, 0%), #333 var(--volume-percent, 0%));
    border-radius: 5px;
    height: 5px;
    border: none;
}

#player-volume::-moz-range-track {
    background: linear-gradient(to right, #1DB954 var(--volume-percent, 0%), #eee var(--volume-percent, 0%));
    border-radius: 5px;
    height: 5px;
    border: none;
}

/* Adjust body padding to prevent content from being hidden behind the player */
body {
    padding-bottom: 80px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #player-volume-container {
        width: auto;
    }
    
    #player-volume {
        display: none;
    }
    
    #player-track-info {
        max-width: 150px;
    }
}

@media (max-width: 576px) {
    #player-track-info {
        max-width: 100px;
    }
    
    #player-time-info {
        font-size: 0.7rem;
    }
}
