/*
|--------------------------------------------------------------------------
| UBEXMedia Unified Video Player
|--------------------------------------------------------------------------
*/
html, body {
    background-color: #000;
}
:root {
    --ubex-cyan: #2EC5F0;
    --ubex-navy: #1B3665;
    --ubex-black: #000000;
    --ubex-white: #FFFFFF;
}


/*
|--------------------------------------------------------------------------
| Player shell
|--------------------------------------------------------------------------
*/

.ubex-video-host {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--ubex-black);
    overflow: hidden;
}

.ubex-player-shell {
    position: relative;
    background: #000;
}
button.lightbox-close {
    display:none;
}

/*
|--------------------------------------------------------------------------
| Plyr sizing
|--------------------------------------------------------------------------
*/

.ubex-player-shell .plyr {
    width: 100%;
    height: 100%;

    --plyr-color-main: var(--ubex-cyan);
    --plyr-video-background: #000;
    --plyr-video-control-color: #fff;
    --plyr-video-control-color-hover: #fff;
    --plyr-video-control-background-hover:
        var(--ubex-navy);
    --plyr-range-fill-background:
        var(--ubex-cyan);
    --plyr-range-thumb-background:
        #fff;
    --plyr-menu-background:
        rgba(15, 20, 30, 0.96);
    --plyr-menu-color:
        #fff;
    --plyr-control-radius:
        50%;
    --plyr-control-spacing:
        12px;
}


.ubex-player-shell .plyr__video-wrapper,
.ubex-player-shell .plyr__video-embed {
    width: 100%;
    height: 100%;
}


.ubex-player-shell video,
.ubex-player-shell iframe {
    width: 100%;
    height: 100%;
}


/*
|--------------------------------------------------------------------------
| UBEX lower-third gradient
|--------------------------------------------------------------------------
*/

.ubex-player-gradient {
    position: absolute;

    left: 0;
    right: 0;
    bottom: 0;

    height: 38%;

    background:
        linear-gradient(
            to top,
            rgba(0, 0, 0, 0.92) 0%,
            rgba(0, 0, 0, 0.60) 35%,
            rgba(0, 0, 0, 0.20) 70%,
            rgba(0, 0, 0, 0) 100%
        );

    pointer-events: none;

    z-index: 2;
}


/*
|--------------------------------------------------------------------------
| Logo
|--------------------------------------------------------------------------
*/

.ubex-player-logo {
    position: absolute;

    top: 22px;
    left: 24px;

    width: clamp(
        110px,
        14vw,
        190px
    );

    height: auto;

    z-index: 5;

    pointer-events: none;

    opacity: 0.95;

    filter:
        drop-shadow(
            0 2px 5px
            rgba(0, 0, 0, 0.55)
        );
}


/*
|--------------------------------------------------------------------------
| Plyr controls above gradient
|--------------------------------------------------------------------------
*/

.ubex-player-shell .plyr__controls {
    z-index: 4;
}


/*
|--------------------------------------------------------------------------
| Large center play button
|--------------------------------------------------------------------------
*/

.ubex-player-shell
.plyr__control--overlaid {

    width: 78px;
    height: 78px;

    display: flex;

    align-items: center;
    justify-content: center;

    background: rgba(27, 54, 101, 0.96);

    border:
        2px solid
        var(--ubex-cyan);

    box-shadow:
        0 8px 28px
        rgba(0, 0, 0, 0.45);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}


.ubex-player-shell
.plyr__control--overlaid:hover {

    /*transform:
        scale(1.08);*/

    background:
        var(--ubex-cyan);

    box-shadow:
        0 10px 34px
        rgba(46, 197, 240, 0.30);
}



/* Center the large Plyr play icon */
.ubex-player-shell .plyr__control--overlaid {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
}

.ubex-player-shell .plyr__control--overlaid svg {
    position: relative !important;
    top: 0 !important;
    left: 0 !important;
    margin: 0 !important;
    transform: translateX(4px);
}
/*
|--------------------------------------------------------------------------
| Control buttons
|--------------------------------------------------------------------------
*/

.ubex-player-shell
.plyr__controls
.plyr__control {

    color: #fff;

    transition:
        background 0.2s ease,
        color 0.2s ease;
}


.ubex-player-shell
.plyr__controls
.plyr__control:hover {

    background:
        rgba(46, 197, 240, 0.22);

    color:
        var(--ubex-cyan);
}


/*
|--------------------------------------------------------------------------
| Progress + volume
|--------------------------------------------------------------------------
*/

.ubex-player-shell
.plyr--full-ui
input[type="range"] {

    color:
        var(--ubex-cyan);
}


/*
|--------------------------------------------------------------------------
| Popup modal
|--------------------------------------------------------------------------
*/

.ubex-video-lightbox {

    position: fixed;

    inset: 0;

    width: 100vw;
    height: 100vh;

    display: none;

    align-items: center;
    justify-content: center;

    padding: 40px;

    box-sizing: border-box;

    background:
        rgba(0, 0, 0, 0.94);

    backdrop-filter:
        blur(5px);

    z-index: 999999;
}


.ubex-video-lightbox.active {
    display: flex;
}


.ubex-video-lightbox-dialog {

    position: relative;

    width: min(
        92vw,
        1400px
    );
}


.ubex-video-popup-host {

    width: 100%;

    aspect-ratio:
        16 / 9;

    background:
        #000;

    box-shadow:
        0 24px 80px
        rgba(0, 0, 0, 0.75);
}


/*
|--------------------------------------------------------------------------
| Popup close button
|--------------------------------------------------------------------------
*/

.ubex-video-lightbox-close {

    position: absolute;

    top: -30px;
    right: 0;

    width: 42px;
    height: 42px;

    padding: 0;

    border: 0;

    background:
        transparent;

    color:
        #fff;

    font-size:
        42px;

    line-height:
        42px;

    cursor:
        pointer;

    z-index:
        20;

    transition:
        color 0.2s ease,
        transform 0.2s ease;
}


.ubex-video-lightbox-close:hover {

    color:
        var(--ubex-cyan);

    transform:
        scale(1.08);
}


/*
|--------------------------------------------------------------------------
| Prevent page scrolling while modal open
|--------------------------------------------------------------------------
*/

body.ubex-video-modal-open {
    overflow: hidden;
}


/*
|--------------------------------------------------------------------------
| Errors
|--------------------------------------------------------------------------
*/

.ubex-video-error {

    position: absolute;

    inset: 0;

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 30px;

    color: #fff;

    background: #000;

    text-align: center;
}


/*
|--------------------------------------------------------------------------
| Mobile
|--------------------------------------------------------------------------
*/

@media
(max-width: 767px) {

    .ubex-video-lightbox {
        padding: 15px;
    }

    .ubex-video-lightbox-dialog {
        width: 100%;
    }

    .ubex-player-logo {

        top: 14px;
        left: 14px;

        width: 105px;
    }

    .ubex-player-shell
    .plyr__control--overlaid {

        width: 60px;
        height: 60px;
    }
}

/*
|--------------------------------------------------------------------------
| Poster / Thumbnail Play Button
|--------------------------------------------------------------------------
*/

.video-play-btn,
.ubex-video-trigger.video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    width: 78px;
    height: 78px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    border: 2px solid var(--ubex-cyan);
    border-radius: 50%;

    background:
        linear-gradient(
            135deg,
            rgba(27, 54, 101, 0.95),
            rgba(46, 197, 240, 0.90)
        );

    cursor: pointer;

    z-index: 10;

    box-shadow:
        0 8px 30px
        rgba(0, 0, 0, 0.55);

    transition:
        transform 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}

.video-play-btn:hover {
    transform:
        translate(-50%, -50%)
        scale(1.08);

    background:
        var(--ubex-cyan);

    box-shadow:
        0 10px 36px
        rgba(46, 197, 240, 0.35);
}


/*
 * CSS play triangle
 */
.video-play-btn .play-icon {
    display: block;

    width: 0;
    height: 0;

    margin-left: 6px;

    border-top: 13px solid transparent;
    border-bottom: 13px solid transparent;
    border-left: 20px solid #fff;
}


/*
|--------------------------------------------------------------------------
| Advertising Mode
|--------------------------------------------------------------------------
*/

.ubex-player-shell {
    position: relative;
}


/*
 * Hide normal UBEX/Plyr controls during pre-roll.
 */

.ubex-player-shell.ubex-ad-playing .plyr__controls,
.ubex-player-shell.ubex-ad-playing .plyr__control--overlaid {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}


/*
 * Hide UBEX content branding during commercials.
 */

.ubex-player-shell.ubex-ad-playing .ubex-player-gradient,
.ubex-player-shell.ubex-ad-playing .ubex-player-logo {
    opacity: 0 !important;
    visibility: hidden !important;
}


/*
|--------------------------------------------------------------------------
| UBEX Ad Status
|--------------------------------------------------------------------------
*/

.ubex-ad-status {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 100;

    display: flex;
    align-items: center;
    gap: 8px;

    padding: 7px 10px;

    background: rgba(0, 0, 0, 0.75);
    color: #fff;

    font-size: 13px;
    line-height: 1;

    border-radius: 4px;

    pointer-events: auto;
}

.ubex-ad-status[hidden] {
    display: none !important;
}

.ubex-ad-label {
    font-weight: 600;
}

.ubex-ad-time {
    opacity: 0.85;
}

.ubex-ad-pause {
    border: 1px solid rgba(255, 255, 255, 0.65);
    background: transparent;
    color: #fff;

    padding: 5px 8px;

    font-size: 12px;

    border-radius: 3px;

    cursor: pointer;
}

.ubex-ad-pause:hover,
.ubex-ad-pause:focus {
    background: rgba(255, 255, 255, 1);
}


/*
 * Make sure popup close remains available.
 */

.ubex-video-lightbox-close {
    z-index: 200;
}

