:root {
    --plyr-color-main: #E85D04;
    --plyr-font-family: 'btbf-font', sans-serif;
}

.plyr {
    width: 100%;
    height: 100%;
}
.plyr__video-wrapper {
    height: 100%;
}

/* Hide controls until first play */
.plyr--video:not(.plyr--has-played) .plyr__controls {
    display: none !important;
}

/* Controls bar layout */
.plyr--video .plyr__controls {
    flex-wrap: nowrap;
    padding: var(--plyr-control-spacing, 10px);
    padding-top: calc(var(--plyr-control-spacing, 10px) * 3.5);
}

/* Progress bar above controls */
.plyr__progress__container {
    position: absolute;
    top: 14px;
    left: 10px;
    width: calc(100% - 24px);
}

/* Spacer below progress bar (desktop only) */
.plyr__spacer {
    width: 100%;
}

/* Big play button (center overlay) */
.plyr--video .plyr__control.plyr__control--overlaid {
    background-color: var(--plyr-color-main);
    border: 1px solid var(--plyr-color-main);
    box-shadow: 0 0 20px var(--plyr-color-main);
    width: 84px !important;
    height: 84px !important;
    opacity: 1;
    transition: all 0.2s ease;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.plyr--video .plyr__control.plyr__control--overlaid svg {
    height: 24px !important;
    width: 24px !important;
    margin: 0 auto !important;
    display: block !important;
    position: relative !important;
    left: 2px !important;
    top: auto !important;
    transform: none !important;
}

.plyr--video .plyr__control.plyr__control--overlaid:hover {
    transform: translate(-50%, -50%) scale(1.1) !important;
    box-shadow: 0 0 35px var(--plyr-color-main);
    background-color: var(--plyr-color-main);
    border-color: var(--plyr-color-main);
    opacity: 0.9;
}

.plyr--video .plyr__control.plyr__control--overlaid:active {
    transform: translate(-50%, -50%) scale(0.95) !important;
    box-shadow: 0 0 15px var(--plyr-color-main);
    opacity: 1;
}

/* Show overlay pause button when controls are visible during playback */
.plyr--video.plyr--playing .plyr__control.plyr__control--overlaid {
    display: flex !important;
    opacity: 0;
    pointer-events: none;
    background-color: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
    transition: opacity 0.3s ease;
}
.plyr--video.plyr--playing:not(.plyr--hide-controls) .plyr__control.plyr__control--overlaid {
    opacity: 1;
    pointer-events: auto;
    visibility: visible !important;
    transition: opacity 0.3s ease;
}
.plyr--video.plyr--playing .plyr__control.plyr__control--overlaid svg {
    left: 0 !important;
    height: 32px !important;
    width: 32px !important;
}

.plyr__controls__item[data-plyr="rewind"], .plyr__controls__item[data-plyr="fast-forward"] {
    padding: 4px;
}
/* Rewind / Fast-forward icon sizes */
.plyr__controls__item[data-plyr="rewind"] svg,
.plyr__controls__item[data-plyr="fast-forward"] svg {
    height: var(--plyr-control-icon-size, 24px);
    pointer-events: none;
    width: var(--plyr-control-icon-size, 24px);
}

@media (min-width: 1280px) {
    .plyr__control svg {
        height: 21px;
        width: 21px;
    }
}

/* Force custom cursor everywhere (prevent Plyr from overriding with pointer/none) */
.plyr,
.plyr *,
.plyr__control,
.plyr__progress input[type="range"],
.plyr__volume input[type="range"] {
    cursor: inherit !important;
}

/* Button hover */
.plyr__control:hover {
    background-color: var(--plyr-color-main) !important;
}

/* Responsive mobile */
@media (max-width: 500px) {
    .plyr--video .plyr__controls {
        flex-wrap: wrap;
        padding: 5px !important;
        padding-top: 5px !important;
    }
    .plyr--video .plyr__control.plyr__control--overlaid {
        width: 72px !important;
        height: 72px !important;
    }

    .plyr__time.plyr__time--current {
        display: none !important;
    }

    .hide_mobile.plyr__spacer {
        display: none;
    }
    .plyr__progress__container {
        top: -14px !important;
    }
}

.plyr__time {
    font-weight: 700;
}

/* HLS spinner overlay */
.hls-spinner {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    pointer-events: none;
}
.hls-spinner.hidden {
    display: none;
}
.hls-spinner__ring {
    width: 56px;
    height: 56px;
    border-radius: 999px;
    border: 6px solid rgba(255, 255, 255, 0.25);
    border-top-color: rgba(255, 255, 255, 0.95);
    animation: hls-spin 0.9s linear infinite;
    filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.35));
}
@keyframes hls-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
