/* Mubarak Music Player - Minimal Sonaar-Style Design */

/* Import Roboto Font */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

/* Player Container */
#mubarak-player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #2e2e2e;
    border-top: 3px solid #5c7b41;
    height: 75px;
    z-index: 999999;
    font-family: 'Roboto', sans-serif;
    color: #ffffff;
    transition: transform 0.3s ease-in-out;
}

#mubarak-player.mubarak-player-hidden {
    transform: translateY(100%);
}

.mubarak-player-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 15px;  /* Reduced from 20px */
    gap: 8px;  /* Reduced from 15px */
    position: relative;
}

/* Left Section: Playlist Menu + Track Info */
.mubarak-left-section {
    display: flex;
    align-items: center;
    gap: 8px;  /* Reduced from 12px */
    flex: 0 0 auto;
    min-width: 140px;  /* Reduced from 180px */
}

.mubarak-track-info {
    font-size: 12px;  /* Reduced from 13px */
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;  /* Reduced from 220px */
    color: rgba(255, 255, 255, 0.9);
}

/* Center Section: Playback Controls */
.mubarak-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;  /* Reduced from 8px */
    flex: 0 0 auto;
}

/* Right Section: Speed, Shuffle, Waveform, Download, Volume */
.mubarak-right-section {
    display: flex;
    align-items: center;
    gap: 8px;  /* Reduced from 12px */
    flex: 1 1 auto;
    justify-content: flex-end;
    min-width: 0;
}

/* Icon Buttons - MINIMAL STYLE (No background boxes!) */
.mubarak-icon-btn {
    background: transparent !important;
    border: none !important;
    color: rgba(255, 255, 255, 0.7) !important;
    cursor: pointer;
    font-size: 16px !important;
    padding: 6px !important;
    transition: color 0.2s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 28px !important;
    min-height: 28px !important;
    box-shadow: none !important;
}

.mubarak-icon-btn:hover {
    color: #5c7b41 !important;
    background: transparent !important;
}

.mubarak-icon-btn.active {
    color: #5c7b41 !important;
    background: transparent !important;
}

/* Skip Labels (15s, 30s) - Smaller and more subtle */
.skip-label {
    position: absolute;
    bottom: 0px;
    right: 0px;
    font-size: 8px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
}

/* Play Button (Circular) - Slightly smaller */
.mubarak-play-btn {
    background: transparent !important;
    border: 2px solid rgba(255, 255, 255, 0.7) !important;
    border-radius: 50% !important;
    color: rgba(255, 255, 255, 0.7) !important;
    cursor: pointer;
    width: 44px !important;
    height: 44px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px !important;
    transition: all 0.2s ease;
    margin: 0 4px;
    box-shadow: none !important;
}

.mubarak-play-btn:hover {
    border-color: #5c7b41 !important;
    color: #5c7b41 !important;
    background: transparent !important;
}

.mubarak-play-btn i {
    margin-left: 2px;
}

.mubarak-play-btn.playing i {
    margin-left: 0;
}

/* Speed Control - Minimal text display */
.mubarak-speed-control {
    position: relative;
}

#mubarak-speed-display {
    font-size: 12px;
    font-weight: 500;
    min-width: 30px;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
}

#mubarak-speed-btn:hover #mubarak-speed-display {
    color: #5c7b41;
}

.mubarak-dropdown-menu {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #3a3a3a;
    border: 1px solid #5c7b41;
    border-radius: 4px;
    padding: 4px 0;
    margin-bottom: 8px;
    display: none;
    flex-direction: column;
    min-width: 70px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
}

.mubarak-dropdown-menu.show {
    display: flex;
}

.mubarak-dropdown-menu button {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    padding: 6px 12px;
    cursor: pointer;
    text-align: center;
    font-size: 12px;
    transition: background 0.2s ease;
}

.mubarak-dropdown-menu button:hover {
    background: rgba(92, 123, 65, 0.3);
}

.mubarak-dropdown-menu button.active {
    background: rgba(92, 123, 65, 0.5);
    font-weight: 600;
}

/* Waveform Wrapper - MAXIMUM PROMINENCE */
.mubarak-waveform-wrapper {
    flex: 1 1 auto;
    max-width: 900px;  /* Increased from 600px for maximum space */
    min-width: 400px;  /* Increased from 300px */
}

#mubarak-waveform {
    height: 35px;
    cursor: pointer;
}

.mubarak-time-display {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 2px;
    font-weight: 400;
}

/* Volume Control */
.mubarak-volume-control {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
}

.mubarak-volume-slider-container {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #3a3a3a;
    border: 1px solid #5c7b41;
    border-radius: 4px;
    padding: 8px;
    margin-bottom: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
}

.mubarak-volume-slider-container.show {
    display: block;
}

#mubarak-volume-slider {
    width: 90px;
    height: 3px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.2);
    outline: none;
    border-radius: 2px;
}

#mubarak-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    background: #5c7b41;
    cursor: pointer;
    border-radius: 50%;
}

#mubarak-volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: #5c7b41;
    cursor: pointer;
    border-radius: 50%;
    border: none;
}

/* Playlist Panel */
#mubarak-playlist-panel {
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    background: #2e2e2e;
    border-top: 1px solid rgba(92, 123, 65, 0.3);
    max-height: 350px;
    overflow-y: auto;
    transition: transform 0.3s ease-in-out;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.5);
}

#mubarak-playlist-panel.mubarak-playlist-hidden {
    transform: translateY(100%);
    display: none;
}

.mubarak-playlist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mubarak-playlist-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

.mubarak-playlist-tracks {
    padding: 8px 0;
}

.mubarak-playlist-track {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    cursor: pointer;
    transition: background 0.2s ease;
    gap: 12px;
}

.mubarak-playlist-track:hover {
    background: rgba(92, 123, 65, 0.15);
}

.mubarak-playlist-track.active {
    background: rgba(92, 123, 65, 0.25);
    border-left: 3px solid #5c7b41;
}

.mubarak-playlist-track-number {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    min-width: 25px;
    font-weight: 400;
}

.mubarak-playlist-track-info {
    flex: 1;
}

.mubarak-playlist-track-title {
    font-size: 13px;
    font-weight: 400;
    margin-bottom: 2px;
    color: rgba(255, 255, 255, 0.9);
}

.mubarak-playlist-track-duration {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
}

/* Progress Bar (Hidden - using waveform instead) */
.mubarak-progress-container {
    display: none;
}

/* Responsive Design */
@media (max-width: 1024px) {
    #mubarak-player {
        height: 70px;
    }

    .mubarak-player-container {
        padding: 0 12px;
        gap: 8px;
    }

    .mubarak-waveform-wrapper {
        max-width: 550px;  /* Increased from 400px */
        min-width: 280px;  /* Increased from 200px */
    }

    .mubarak-track-info {
        max-width: 140px;
        font-size: 12px;
    }

    .mubarak-icon-btn {
        font-size: 15px;
        padding: 5px;
    }

    .mubarak-play-btn {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    .mubarak-player-container {
        flex-wrap: wrap;
        height: auto;
        padding: 8px;
        gap: 8px;
    }

    .mubarak-left-section {
        order: 1;
        width: 100%;
        justify-content: space-between;
    }

    .mubarak-controls {
        order: 3;
        width: 100%;
        justify-content: center;
        margin-top: 4px;
    }

    .mubarak-right-section {
        order: 2;
        width: 100%;
        justify-content: space-between;
        margin-top: 4px;
    }

    .mubarak-waveform-wrapper {
        max-width: 100%;
        flex: 1;
    }

    #mubarak-player {
        height: auto;
        min-height: 130px;
    }

    /* Hide skip buttons on mobile */
    #mubarak-rewind,
    #mubarak-forward {
        display: none;
    }
}

@media (max-width: 480px) {
    .mubarak-icon-btn {
        font-size: 14px;
        padding: 4px;
    }

    .mubarak-play-btn {
        width: 38px;
        height: 38px;
        font-size: 13px;
    }

    /* Hide speed control and download on very small screens */
    .mubarak-speed-control,
    #mubarak-download {
        display: none;
    }

    .mubarak-track-info {
        font-size: 11px;
    }
}

/* Scrollbar Styling for Playlist */
.mubarak-playlist-tracks::-webkit-scrollbar {
    width: 6px;
}

.mubarak-playlist-tracks::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.mubarak-playlist-tracks::-webkit-scrollbar-thumb {
    background: rgba(92, 123, 65, 0.5);
    border-radius: 3px;
}

.mubarak-playlist-tracks::-webkit-scrollbar-thumb:hover {
    background: rgba(92, 123, 65, 0.7);
}

/* Ensure icons are properly sized */
.mubarak-icon-btn i,
.mubarak-play-btn i {
    display: inline-block;
    line-height: 1;
}
