/* ============================================================
   GospelKingz - Player CSS (v4)
   Matches the exact layout of the dark theme screenshot
   ============================================================ */

/* -- Responsive visibility helpers ---------------------------- */
.desktop-only { display: none !important; }
.mobile-only  { display: flex !important; }
@media (min-width: 768px) {
    .desktop-only { display: flex !important; }
    .mobile-only  { display: none !important; }
}

#gk-player-bar.mode-single .playlist-only { display: none !important; }

:root {
    --gkp-bg:           var(--bg, #0a0a0a);
    --gkp-text:         var(--text, #ffffff);
    --gkp-text-muted:   var(--text-2, rgba(255, 255, 255, 0.5));
    --gkp-primary:      var(--primary, #FF6B00);
    --gkp-accent:       #f5df4d; /* yellow accent from screenshot */
    --gkp-border:       var(--border, rgba(255, 255, 255, 0.05));
}

/* --------------------------------------------
   BOTTOM FLOATING PLAYER BAR
   -------------------------------------------- */
#gk-player-bar { position: fixed; bottom: 62px;
    left: 0;
    width: 100%;
    background: var(--gkp-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 0;
    z-index: 9999;
    padding: 6px 12px;
    box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.5);
    display: none; /* Shown via JS when loaded */
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#gk-player-bar.minimized {
    transform: translateY(150%);
    opacity: 0;
    pointer-events: none;
}

.gkp-restore-btn { position: fixed; bottom: 62px;
    right: 24px;
    width: 44px;
    height: 44px;
    background: var(--gkp-primary);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    z-index: 9998;
    cursor: pointer;
    display: none; /* Hidden by default */
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}
.gkp-restore-btn:active {
    transform: scale(0.9);
}

/* Main Row */
.gkp-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0;
}

/* Cover Art */
.gkp-cover {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    margin-right: 12px;
    cursor: pointer;
}
.gkp-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
    display: block;
}

/* Desktop Play Button */
.gkp-desktop-play {
    flex-shrink: 0;
    margin: 0 20px;
    align-items: center;
    justify-content: center;
}
.gkp-desktop-play .gkp-play-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    color: #111;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.15s;
}
.gkp-desktop-play .gkp-play-btn:hover {
    background: #ddd;
    color: #000;
    transform: scale(1.07);
}
.gkp-desktop-play .gkp-play-btn.playing {
    background: var(--gkp-primary);
    color: #fff;
}
.gkp-desktop-play .gkp-play-btn.playing i {
    animation: none;
}

/* Desktop Waveform row */
.gkp-desktop-progress {
    flex: 1;
    display: flex;
    align-items: center;
    min-width: 0;
    margin: 0 16px;
}
.gkp-waveform-wrapper {
    flex: 1;
    height: 44px;
    position: relative;
    cursor: pointer;
    border-radius: 2px;
    overflow: hidden;
}

/* Zone 1: Info */
.gkp-info {
    flex: 1;
    min-width: 0;
    cursor: pointer;
}
@keyframes marquee {
    0% { transform: translateX(0); }
    15% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}
@keyframes gkpMarqueeRTL {
    0%   { transform: translate3d(0, 0, 0); }
    12%  { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-50%, 0, 0); }
}
.gkp-info-scroll-wrap {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
}
.gkp-info-scroll-content {
    display: block;
    width: 100%;
    overflow: hidden;
}

.gkp-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--gkp-text);
    text-transform: none;
    letter-spacing: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}
.gkp-artist-line {
    font-size: 11px;
    color: var(--gkp-text-muted);
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: clip;
    display: flex;
    align-items: center;
    width: 100%;
}
#gkp-artist {
    display: inline-block;
    white-space: nowrap;
}
#gkp-artist.is-marquee,
#gkp-title.is-marquee,
#gkfp-artist-lg.is-marquee {
    display: inline-flex !important;
    align-items: center;
    width: max-content !important;
    max-width: none !important;
    overflow: visible !important;
    text-overflow: clip !important;
    will-change: transform;
    animation: gkpMarqueeRTL var(--gkp-marquee-dur, 12s) linear infinite !important;
}
.gkp-marquee-seg {
    display: inline-block;
    padding-right: 36px;
    white-space: nowrap;
}
.gkp-context-label {
    font-size: 11px;
    margin-right: 3px;
}

/* Zone 2: Controls */
.gkp-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 0 16px;
}
.gkp-btn {
    background: none;
    border: none;
    color: var(--gkp-text-muted);
    font-size: 14px;
    cursor: pointer;
    transition: color 0.15s;
    padding: 0;
}
.gkp-btn:hover { color: var(--gkp-text); }
.gkp-play-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #fff;
    color: #000;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, background 0.2s;
    flex-shrink: 0;
}
.gkp-play-btn:hover { background: #ddd; transform: scale(1.05); color: #000; }
.gkp-play-btn:active {
    transform: scale(0.95);
}
@keyframes pulsePlay {
    0% { filter: drop-shadow(0 0 2px rgba(255,107,0,0.5)); transform: scale(1); }
    50% { filter: drop-shadow(0 0 8px rgba(255,107,0,0.8)); transform: scale(1.05); }
    100% { filter: drop-shadow(0 0 2px rgba(255,107,0,0.5)); transform: scale(1); }
}
.gkp-play-btn.playing i {
    animation: pulsePlay 2s infinite;
    color: var(--gkp-primary);
}

/* Zone 3: Actions */
.gkp-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}
.gkp-repeat-btn.active { color: var(--gkp-accent); }
.gkp-shuffle-btn.active { color: var(--gkp-accent); }



/* --------------------------------------------
   FULL SCREEN NOW PLAYING / QUEUE
   -------------------------------------------- */
#gk-full-player {
    position: fixed;
    inset: 0;
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: #181818;
    z-index: 99999;
    display: none;
    flex-direction: column;
    overflow-x: hidden !important;
    box-sizing: border-box;
}
#gk-full-player.gkp-open {
    display: flex;
}

/* Header */
.gkfp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    padding-top: max(20px, env(safe-area-inset-top));
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    flex-shrink: 0;
}
.gkfp-icon-btn {
    background: none;
    border: none;
    color: var(--gkp-text-muted);
    font-size: 18px;
    cursor: pointer;
}

/* Scroll area */
.gkfp-scroll-area {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden !important;
    padding: 0 20px 40px;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Artwork */
.gkfp-artwork-container {
    width: 100%;
    max-width: 320px;
    aspect-ratio: 1/1;
    margin: 10px auto 24px;
    border-radius: 12px;
    overflow: hidden;
    background: #2a2a2a;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    flex-shrink: 0;
}
.gkfp-artwork-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Info Row */
.gkfp-info-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 24px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden !important;
    box-sizing: border-box;
}
.gkfp-info-text {
    flex: 1;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    overflow: hidden !important;
    box-sizing: border-box;
}
#gkfp-title-lg {
    font-size: 20px;
    font-weight: 800;
    color: var(--gkp-text);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    display: block;
    line-height: 1.3;
}
#gkfp-artist-lg {
    font-size: 15px;
    color: var(--gkp-text-muted);
    margin: 4px 0 0 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    display: block;
    line-height: 1.3;
}

/* Progress */
.gkfp-progress-container {
    margin-bottom: 24px;
}
.gkfp-track {
    width: 100%;
    height: 4px;
    background: rgba(255,255,255,0.15);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
}
.gkfp-track-fill {
    height: 100%;
    background: var(--gkp-text);
    border-radius: 2px;
    position: relative;
    transition: width 0.1s linear;
}
.gkfp-track-thumb {
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    display: none;
}
.gkfp-progress-container:hover .gkfp-track-thumb {
    display: block;
}
.gkfp-time-row {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--gkp-text-muted);
    margin-top: 8px;
    font-variant-numeric: tabular-nums;
}

/* Actions Row */
.gkfp-actions-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 0 10px;
}
.gkfp-action-btn {
    background: none;
    border: none;
    color: var(--gkp-text-muted);
    font-size: 20px;
    cursor: pointer;
    transition: color 0.2s;
}
.gkfp-action-btn:hover {
    color: var(--gkp-text);
}
.gkfp-action-btn.active {
    color: var(--gkp-accent);
}

/* Controls Row */
.gkfp-controls-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    margin-bottom: 40px;
}
.gkfp-control-btn {
    background: none;
    border: none;
    color: var(--gkp-text);
    font-size: 32px;
    cursor: pointer;
    transition: transform 0.1s;
}
.gkfp-control-btn:active {
    transform: scale(0.9);
}
.gkfp-play-btn {
    font-size: 64px;
}

/* Context Row */
.gkfp-context-row {
    text-align: center;
    margin-bottom: 40px;
}
.gkfp-context-text {
    font-size: 13px;
    font-weight: 700;
    color: var(--gkp-text);
    margin-bottom: 4px;
}
.gkfp-device-status {
    font-size: 12px;
    color: var(--gkp-primary);
}

/* Queue List */
.gkfp-queue-section {
    background: rgba(255,255,255,0.05);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 20px;
}
.gkfp-queue-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.gkfp-queue-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--gkp-text);
}
.gkfp-queue-list {
    padding: 0;
}
.gkqp-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    cursor: pointer;
}
.gkqp-item-info {
    flex: 1;
    min-width: 0;
}
.gkqp-item-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--gkp-text);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.gkqp-item-artist {
    font-size: 12px;
    color: var(--gkp-text-muted);
    margin-top: 2px;
}
.gkqp-item-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--gkp-text-muted);
}
.gkqp-vol {
    color: var(--gkp-accent);
    font-size: 12px;
}
.gkqp-heart {
    font-size: 14px;
}
.gkqp-dots {
    font-size: 14px;
}

/* Desktop sizing tweaks */
@media (min-width: 768px) {
    #gk-player-bar {
        padding: 0 24px;
        bottom: 0;
        left: 0;
        width: 100%;
        border-radius: 0;
        height: 72px;
        border-top: 1px solid var(--gkp-border);
        background: var(--gkp-bg);
        transition: transform 0.3s ease, opacity 0.3s ease;
    }
    #gk-player-bar.minimized {
        transform: translateY(100%);
        opacity: 0;
        pointer-events: none;
    }
    .gkp-bar-inner {
        height: 72px;
    }
    .gkp-cover {
        width: 56px;
        height: 56px;
        margin-right: 16px;
    }
    .gkp-info {
        flex: 0 0 auto;
        min-width: 150px;
        max-width: 250px;
    }
    .gkp-title {
        font-size: 14px;
        text-transform: none;
    }
    .gkp-artist-line {
        font-size: 11px;
    }
    .gkp-restore-btn {
        bottom: 24px;
    }
    .gkfp-artwork-container {
        width: 320px;
        height: 320px;
    }
    .gkqp-item {
        padding: 16px 0;
    }
    /* make waveform visible and sized */
    .gkp-desktop-progress {
        flex: 1;
        min-width: 0;
        display: flex;
        align-items: center;
        padding: 0 20px;
    }
    #gkpWaveformWrapper {
        flex: 1;
        height: 44px;
        position: relative;
        cursor: pointer;
        min-width: 0;
    }
    #gkpWaveformCanvas {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        display: block;
    }
    .gkp-timestamp {
        font-size: 11px;
        font-weight: bold;
        color: #fff;
        white-space: nowrap;
        margin: 0 15px;
    }
}


/* ============================================================
   Push entire page content up so footer clears the fixed player
   Homepage uses body scroll - target footer
   All other pages use .ms_content_wrapper scroll - target that
   ============================================================ */

/* Homepage: body scrolls, pad the footer */
body.player-active footer { padding-bottom: 140px !important; }
@media (min-width: 768px) {
    body.player-active footer { padding-bottom: 90px !important; }
}

/* All other pages: .ms_content_wrapper or .main-content-column is the scroll container */
body.player-active .ms_content_wrapper,
body.player-active .main-content-column {
    /* padding-bottom: 140px !important; Disabled per user request - causing huge white spaces */
}
@media (min-width: 768px) {
    body.player-active .ms_content_wrapper,
    body.player-active .main-content-column {
        /* padding-bottom: 90px !important; Disabled per user request */
    }
}



