/* ==========================================================================
   Graphix Audio Player - Frontend Layout Structural Styles
   ========================================================================== */

:root {
    --gap-player-height: 80px;
}

/* Main Container Frame - Glued to bottom of viewport */
#gap-sticky-audio-player {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: var(--gap-player-height);
    z-index: 999999;
    box-shadow: 0 -3px 20px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    box-sizing: border-box;
    overflow: hidden;
    transition: background-color 0.3s ease;
}

/* Ensure spacing fallback at absolute bottom of page layouts so content isn't clipped */
body {
    margin-bottom: var(--gap-player-height) !important;
}

/* Left Action Workspace Layout Control Alignment Groups */
.gap-player-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0; /* Prevents flex children from blowing past bounds */
}

/* Control Button Blueprints */
.gap-player-left button,
.gap-player-right button {
    background: transparent;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
}

.gap-player-left button:hover,
.gap-player-right button:hover {
    transform: scale(1.08);
}

.gap-main-play-toggle .dashicons {
    font-size: 32px;
    width: 32px;
    height: 32px;
}

.gap-ctrl-btn .dashicons,
.gap-mute-toggle .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* Album Graphic Wrapping Rules */
.gap-album-art-wrap {
    width: 52px;
    height: 52px;
    border-radius: 6px;
    overflow: hidden;
    background-color: #222;
    flex-shrink: 0;
}

.gap-album-art {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Marquee Engine Masking Layout Boundaries */
.gap-metadata-marquee-box {
    overflow: hidden;
    position: relative;
    white-space: nowrap;
    flex: 1;
    max-width: 450px;
    mask-image: linear-gradient(to right, transparent 0%, #000 4%, #000 96%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 4%, #000 96%, transparent 100%);
}

.gap-marquee-content-inner {
    display: inline-block;
    padding-left: 10px;
}

/* Hardware Accelerated Fluid CSS Marquee Animation Rule */
.gap-marquee-active {
    animation: gap-marquee-loop 12s linear infinite;
}

@keyframes gap-marquee-loop {
    0% { transform: translate3d(0, 0, 0); }
    15% { transform: translate3d(0, 0, 0); }
    85% { transform: translate3d(-50%, 0, 0); }
    100% { transform: translate3d(-50%, 0, 0); }
}

.gap-track-title-text {
    display: inline-block;
    font-weight: 500;
}

/* Right Section Volume Control Architecture Modules */
.gap-player-right {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 180px;
    justify-content: flex-end;
}

.gap-volume-slider-container {
    position: relative;
    width: 100px;
    height: 4px;
    border-radius: 2px;
    cursor: pointer;
}

.gap-volume-slider-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    border-radius: 2px;
    pointer-events: none;
}

.gap-volume-slider-knob {
    position: absolute;
    right: -6px;
    top: -4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    pointer-events: none;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

/* Invisible overlay native slider engine slider for smooth scrubbing */
.gap-volume-native-input {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
    margin: 0;
    padding: 0;
}

/* Responsive Grid Adjustments */
@media (max-width: 768px) {
    .gap-desktop-only {
        display: none !important;
    }
    #gap-sticky-audio-player {
        height: 70px;
        padding: 0 12px;
    }
    :root {
        --gap-player-height: 70px;
    }
}