/* ==========================================================================
   Sleek Player Overhaul Master CSS (Normal & Fullscreen View)
   ========================================================================== */

.sleek-player-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
}

/* 1. Base Theme Configuration Variables (Normal & Fullscreen Views) */
.sleek-player-wrapper .plyr,
.plyr:fullscreen,
.plyr--fullscreen-fallback {
    --plyr-color-main: #ff3b00 !important; 
    --plyr-video-control-background-hover: rgba(255, 255, 255, 0.12) !important;
    --plyr-video-control-color: #ffffff !important;
}

/* 2. Control Bar Structure (Flushed to bottom with dark alpha-gradient backdrop) */
.sleek-player-wrapper .plyr__controls,
.plyr:fullscreen .plyr__controls,
.plyr--fullscreen-fallback .plyr__controls {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.5) 75%, rgba(0,0,0,0) 100%) !important;
    padding: 14px 15px 12px 15px !important;
    border-radius: 0 !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    display: flex !important;
    align-items: center !important;
}

/* 3. Timeline Layout Rules (Locks progress bar horizontally above buttons) */
.sleek-player-wrapper .plyr__progress,
.plyr:fullscreen .plyr__progress,
.plyr--fullscreen-fallback .plyr__progress {
    position: absolute !important;
    bottom: 48px !important; 
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    z-index: 99 !important;
}

/* Track Sizing Metrics */
.sleek-player-wrapper .plyr__progress input[type=range],
.plyr:fullscreen .plyr__progress input[type=range] {
    height: 4px !important;
    padding: 0 !important;
    cursor: pointer;
}
.sleek-player-wrapper .plyr__progress input[type=range]::-webkit-slider-runnable-track,
.plyr:fullscreen .plyr__progress input[type=range]::-webkit-slider-runnable-track {
    height: 4px !important;
}

/* Timeline Seeker Node Scrubber (Flat White Circular Disc) */
.sleek-player-wrapper .plyr__progress input[type=range]::-webkit-slider-thumb,
.plyr:fullscreen .plyr__progress input[type=range]::-webkit-slider-thumb {
    width: 12px !important;
    height: 12px !important;
    background: #ffffff !important;
    border: none !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.6) !important;
    margin-top: -4px !important;
}

/* 4. Timestamp Typography System ("00:00 / 04:57") */
.sleek-player-wrapper .plyr__time {
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #ffffff !important;
    padding: 0 2px !important;
}
.sleek-player-wrapper .plyr__time + .plyr__time::before {
    content: "/" !important;
    color: rgba(255, 255, 255, 0.5) !important;
    margin-right: 6px !important;
}

/* 5. Flex Alignment Rules (Right-aligns utility options tightly) */
.sleek-player-wrapper .plyr__controls .plyr__progress ~ button,
.sleek-player-wrapper .plyr__controls .plyr__progress ~ div,
.sleek-player-wrapper .plyr__controls .custom-camera-btn,
.sleek-player-wrapper .plyr__controls .custom-toggle-wrapper {
    margin-left: auto;
}
.sleek-player-wrapper .plyr__controls .custom-toggle-wrapper ~ *,
.sleek-player-wrapper .plyr__controls .custom-camera-btn ~ *,
.sleek-player-wrapper .plyr__controls [data-plyr="settings"] ~ * {
    margin-left: 3px !important;
}

/* Inline Volume Bar Slider Sizing */
.sleek-player-wrapper .plyr__volume {
    max-width: 65px !important;
}

/* 6. Custom Geometrical Icon Rules (Matches ppppp.PNG & pppppp.PNG) */
.sleek-player-wrapper [data-plyr="download"],
.sleek-player-wrapper [data-plyr="pip"],
.sleek-player-wrapper [data-plyr="fullscreen"],
.plyr:fullscreen [data-plyr="download"],
.plyr:fullscreen [data-plyr="pip"],
.plyr:fullscreen [data-plyr="fullscreen"] {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    background: transparent !important; /* Forces background to stay clear */
    color: #ffffff !important;          /* Sets fallback color system */
}

/* Thick Stroke Outlines for Picture-in-Picture and Fullscreen (ppppp.PNG) */
.sleek-player-wrapper [data-plyr="pip"] svg,
.sleek-player-wrapper [data-plyr="fullscreen"] svg,
.plyr:fullscreen [data-plyr="pip"] svg,
.plyr:fullscreen [data-plyr="fullscreen"] svg {
    width: 18px !important;
    height: 18px !important;
    stroke: #ffffff !important;       /* Forces the line borders to be solid white */
    stroke-width: 3.5px !important;   /* Matches requested look */
    fill: transparent !important;     /* Ensures inside of the box is transparent */
}

/* Solid, Bold, Flat-White Fill for the Download Button (pppppp.PNG) */
.sleek-player-wrapper [data-plyr="download"] svg,
.plyr:fullscreen [data-plyr="download"] svg {
    width: 20px !important;
    height: 20px !important;
    fill: #ffffff !important;
    stroke: none !important;
}

/* 7. Extra Custom Injected UI Utilities */

/* Snapshot Frame Grabber Button */
.sleek-player-wrapper .custom-camera-btn {
    background: transparent !important;
    border: none !important;
    color: #ffffff !important;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 8px !important;
    opacity: 0.85;
    transition: opacity 0.2s ease;
}
.sleek-player-wrapper .custom-camera-btn:hover {
    opacity: 1;
}

/* Toggle Pill Configuration Wrapper */
.custom-toggle-wrapper {
    display: inline-flex;
    align-items: center;
    padding: 0 6px;
}
.custom-switch {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 18px;
}
.custom-switch input { 
    opacity: 0; width: 0; height: 0;
}
.custom-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(255, 255, 255, 0.25);
    transition: 0.2s;
    border-radius: 20px;
}
.custom-slider:before {
    position: absolute;
    content: "";
    height: 12px;
    width: 12px;
    left: 3px;
    bottom: 3px;
    background-color: #ffffff;
    transition: 0.2s;
    border-radius: 50%;
}
input:checked + .custom-slider {
    background-color: rgba(255, 255, 255, 0.5);
}
input:checked + .custom-slider:before {
    transform: translateX(20px);
}

/* High-Definition Accent Badge over Settings Engine */
.sleek-player-wrapper [data-plyr="settings"] {
    position: relative !important;
}
.sleek-player-wrapper [data-plyr="settings"]::after {
    content: "HD";
    position: absolute;
    top: 1px;
    right: -2px;
    background: #ff3b00;
    color: #ffffff;
    font-size: 7px;
    font-weight: 900;
    padding: 1px 2px;
    border-radius: 2px;
    line-height: 1;
    pointer-events: none;
}

/* 8. Big Center Screen Play/Pause Target Badge */
.sleek-player-wrapper .plyr__control--overlaid {
    background: rgba(255, 255, 255, 0.95) !important;
    color: #000000 !important;
    width: 65px !important;
    height: 65px !important;
}
.sleek-player-wrapper .plyr__control--overlaid svg {
    width: 24px !important;
    height: 24px !important;
    transform: translateX(2px);
}