/* ========================================
   VEGENERGY MUSIC PLAYER STYLES
   Version: 1.0
   ======================================== */

/* ========================================
   DESKTOP SONG BUTTON (im Header)
   ======================================== */
.btn-song {
    height: var(--icon-size);
    padding: var(--icon-padding) 24px;
    background-color: #ffffff;
    color: var(--vegaenergy-dark);
    font-family: 'Mukta', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    border-radius: var(--border-radius-small);
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    gap: 8px;
    transition: all var(--transition-fast);
}

.btn-song:hover {
    background-color: var(--vegaenergy-dark);
    color: #fff;
    transform: scale(1.05);
}

.btn-song:hover .icon-song {
    color: #fff;
}

.btn-song:active {
    transform: scale(0.98);
}

.icon-song {
    width: 18px;
    height: 18px;
    transition: color var(--transition-fast);
}


/* ========================================
   MUSIC PLAYER PANEL (Slide-Up)
   ======================================== */
.music-player-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    pointer-events: none;
    visibility: hidden;
}

.music-player-panel.active {
    pointer-events: all;
    visibility: visible;
}

/* Overlay */
.music-player-overlay {
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    background-color: rgba(0, 0, 0, 0.6);
    opacity: 0;
    cursor: pointer;
}

/* Container */
.music-player-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    background-color: #1a1a1a;
    border-radius: 20px 20px 0 0;
    padding: 25px 30px 35px;
    margin: 0;
    margin-bottom: -2px;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 -5px 40px rgba(0, 0, 0, 0.5);
    z-index: 2;
    will-change: transform;
    /* Ensure flush bottom on mobile */
    padding-bottom: max(35px, env(safe-area-inset-bottom, 0px));
}

.music-player-container.slide-in {
    transform: translateY(0) !important;
}

/* ========================================
   PLAYER HEADER
   ======================================== */
.music-player-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
}

.music-player-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.music-note-icon {
    width: 24px;
    height: 24px;
    color: var(--vegaenergy-dark, #27963c);
    flex-shrink: 0;
    transition: none;
    pointer-events: none;
}

.music-note-icon:hover {
    color: var(--vegaenergy-dark, #27963c);
    background-color: transparent;
    transform: none;
}

.music-player-title h3 {
    color: #ffffff;
    font-family: 'Mukta', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}

.music-player-title p {
    color: #aaaaaa;
    font-family: 'Mukta', sans-serif;
    font-size: 0.85rem;
    font-weight: 400;
    margin: 0;
    line-height: 1.3;
}

/* Close Button */
button.music-player-close {
    background: transparent !important;
    background-color: transparent !important;
    border: none;
    color: #888888;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease, transform 0.2s ease;
}

button.music-player-close:hover {
    background: transparent !important;
    background-color: transparent !important;
    color: #ffffff;
    transform: scale(1.1);
}

.music-player-close svg {
    width: 20px;
    height: 20px;
}

.music-player-close svg:hover {
    background-color: transparent !important;
    color: #ffffff;
    transform: scale(1.1);
}

/* Reset global svg:hover background for all music player SVGs */
.music-player-container svg:hover {
    background-color: transparent !important;
}

/* ========================================
   PLAYER CONTROLS
   ======================================== */
.music-player-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
}

.mp-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    border-radius: 50%;
    position: relative;
}

.mp-btn svg {
    transition: all 0.2s ease;
}

/* Skip Buttons */
.mp-btn-skip {
    color: #cccccc;
    padding: 10px;
}

.mp-btn-skip:hover {
    color: #ffffff;
    transform: scale(1.1);
}

.mp-btn-skip svg {
    width: 28px;
    height: 28px;
}

.skip-label {
    position: absolute;
    font-family: 'Mukta', sans-serif;
    font-size: 0.55rem;
    font-weight: 700;
    bottom: -2px;
    color: #cccccc;
    pointer-events: none;
}

.mp-btn-skip:hover .skip-label {
    color: #ffffff;
}

/* Play/Pause Button */
.mp-btn-play {
    background-color: var(--vegaenergy-dark, #27963c) !important;
    color: #ffffff !important;
    width: 60px;
    height: 60px;
    padding: 0;
    box-shadow: 0 4px 15px rgba(39, 150, 60, 0.4);
}

.mp-btn-play:hover {
    background-color: var(--vegaenergy-bright, #80cc28) !important;
    color: #ffffff !important;
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(39, 150, 60, 0.5);
}

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

.mp-btn-play svg {
    width: 26px;
    height: 26px;
}

/* ========================================
   PROGRESS BAR
   ======================================== */
.music-player-progress {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.mp-time {
    font-family: 'Mukta', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    color: #888888;
    min-width: 38px;
    text-align: center;
    user-select: none;
}

.mp-progress-bar {
    flex: 1;
    height: 6px;
    background-color: #333333;
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    transition: height 0.15s ease;
}

.mp-progress-bar:hover {
    height: 8px;
}

.mp-progress-fill {
    height: 100%;
    background-color: var(--vegaenergy-dark, #27963c);
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s linear;
    position: relative;
}

.mp-progress-bar:hover .mp-progress-fill {
    background-color: var(--vegaenergy-bright, #80cc28);
}

.mp-progress-thumb {
    position: absolute;
    top: 50%;
    left: 0%;
    width: 14px;
    height: 14px;
    background-color: #ffffff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.15s ease, left 0.1s linear;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    pointer-events: none;
}

.mp-progress-bar:hover .mp-progress-thumb {
    opacity: 1;
}

/* ========================================
   DOWNLOAD BUTTON
   ======================================== */
.music-player-extra {
    display: flex;
    justify-content: center;
    padding-top: 5px;
}

.mp-btn-download {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background-color: rgba(255, 255, 255, 0.08);
    color: #cccccc;
    font-family: 'Mukta', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: all 0.2s ease;
}

.mp-btn-download svg {
    width: 18px;
    height: 18px;
}

.mp-btn-download:hover {
    background-color: var(--vegaenergy-dark, #27963c);
    color: #ffffff;
    border-color: var(--vegaenergy-dark, #27963c);
    transform: scale(1.03);
}

.mp-btn-download:active {
    transform: scale(0.97);
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media screen and (max-width: 850px) {
    .btn-song {
        display: none;
    }

    .music-player-container {
        max-width: 100%;
        border-radius: 20px 20px 0 0;
        padding: 20px 20px 30px;
        margin: 0;
        padding-bottom: max(30px, env(safe-area-inset-bottom, 0px));
    }

    .music-player-panel {
        align-items: flex-end;
    }

    .music-player-panel.active .music-player-container {
        transform: translateY(0);
    }

    .music-player-title h3 {
        font-size: 1rem;
    }

    .music-player-title p {
        font-size: 0.8rem;
    }

    .mp-btn-play {
        width: 54px;
        height: 54px;
    }

    .mp-btn-play svg {
        width: 24px;
        height: 24px;
    }

    .music-player-controls {
        gap: 25px;
    }
}

@media screen and (max-width: 450px) {
    .music-player-container {
        padding: 18px 16px 25px;
        margin: 0;
        padding-bottom: max(25px, env(safe-area-inset-bottom, 0px));
    }

    .music-player-controls {
        gap: 20px;
    }

    .mp-btn-skip svg {
        width: 24px;
        height: 24px;
    }

    .mp-btn-play {
        width: 48px;
        height: 48px;
    }

    .mp-btn-play svg {
        width: 22px;
        height: 22px;
    }

    .mp-btn-download {
        padding: 8px 20px;
        font-size: 0.85rem;
    }
}