.sesaab-video-player {
    &.podcast {
        border-radius: 16px;

        video {
            border-radius: inherit;
        }

        .vjs-control-bar {
            background-color: rgba(255, 30, 30, 0.5) !important;
            border-bottom-left-radius: inherit;
            border-bottom-right-radius: inherit;
        }

        .vjs-big-play-button,
        .vjs-big-play-centered .vjs-big-play-button {
            left: auto !important;
            top: auto !important;
            right: 12px !important;
            bottom: 55px !important;
            margin-left: 0 !important;
            margin-top: 0 !important;
            transform: none !important;
            background-color: #ff1e1e !important;
        }

        .vjs-poster {
            img {
                border-radius: 16px;
            }
        }

    }

    &.tv {

        .vjs-live-button {

            display: flex;
            align-items: center;
            color: #fff;
            font-weight: 600;
            text-transform: uppercase;
            margin-left: 10px;
            border-radius: 4px;
            transition: background 0.2s ease;
            font-size: 13px;
        }

        .vjs-live-button.at-live {
            cursor: default;
            background: none;
        }

        .vjs-live-button:not(.at-live) .live-dot {
            background-color: #888;
            animation: none;
        }

        .vjs-live-button:not(.at-live) {
            background: none;
            cursor: pointer;
        }

        .vjs-live-button:not(.at-live):hover {
            background: rgba(255, 255, 255, 0.4);
        }

        .vjs-live-button .live-dot {
            display: inline-block;
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background-color: #ff1e1e;
            margin-right: 6px;
            animation: livePulse 1.4s infinite;
        }

        @keyframes livePulse {
            0% {
                transform: scale(1);
                opacity: 1;
            }
            50% {
                transform: scale(1.6);
                opacity: 0.5;
            }
            100% {
                transform: scale(1);
                opacity: 1;
            }
        }

        .vjs-big-play-button,
        .vjs-control-bar {
            background-color: color-mix(in srgb, var(--primary-color) 40%, transparent) !important;
        }
    }

    .vjs-big-play-button {
        background-color: color-mix(in srgb, var(--primary-color) 40%, transparent) !important;
        border-radius: 100% !important;
        margin-left: -25px !important;
        padding: 0 !important;
        width: 50px !important;
    }

    .vjs-control-bar {
        background-color: color-mix(in srgb, var(--primary-color) 40%, transparent) !important;
        height: 40px !important;
        padding-top: 5px;
    }

    &.video-js {
        &.vjs-paused .vjs-big-play-button {
            display: block !important;
        }
    }

    .vjs-title-bar {
        font-weight: bold;
        z-index: 20; /* sopra poster e controlli */
        pointer-events: none;
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;

        .video-details {
            padding: 20px;
            background: linear-gradient(180deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0) 100%);
        }

        h1 {
            font-size: 1.5rem;
            margin: 0;
            color: #fff;
        }

        .time {
            font-size: 20px;
            font-family: 'Noto, sans-serif' !important;
            color: #fff;
        }
    }

    &.vjs-playing,
    &.vjs-ad-playing,
    &.vjs-has-started {
        .vjs-title-bar {
            display: none;
        }
    }


    &.vjs-fluid:not(.vjs-audio-only-mode) {
        padding-top: 0 !important;
        height: 100% !important;
    }
    &.tv.vjs-fluid:not(.vjs-audio-only-mode) {
        padding-top: 56.25%!important;
    }

    /* Fix for IMA Ad container sizing in fluid mode */

    .ima-ad-container {
        width: 100% !important;
        height: 100% !important;

        /* Ensure the iframe/ad elements inside also scale */

        iframe {
            width: 100% !important;
            height: 100% !important;
        }

        /* We keep the inner div relative to the container,
           but we let JS calculate the exact pixels when possible.
           We remove the hard 100% on all DIVs to avoid breaking
           elements that IMA might want to position specifically. */

        div {
            max-width: 100% !important;
            max-height: 100% !important;
        }
    }

    &.vjs-sticky {
        position: fixed !important;
        bottom: 0 !important;
        right: 0 !important;
        width: 350px !important;
        height: 250px !important;
        aspect-ratio: 16 / 9 !important;
        z-index: 9999 !important;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);

        &.vjs-fluid:not(.vjs-audio-only-mode) {
            height: 250px !important;
            padding-top: 0 !important;
        }

        video {
            object-fit: contain;
        }

        .vjs-title-bar {
            display: none !important;
        }

        .vjs-sticky-close {
            display: block;
        }
    }

    .vjs-sticky-close {
        display: none;
        position: absolute;
        top: -10px;
        left: -10px;
        background: #000;
        color: #fff;
        border-radius: 50%;
        width: 24px;
        height: 24px;
        text-align: center;
        line-height: 20px;
        cursor: pointer;
        z-index: 10001;
        border: 2px solid #fff;
        font-size: 14px;
        font-weight: bold;
    }
}





