/* ==========================================================================
   MotoGP MP4 Video Player
   ========================================================================== */

.tr-motogp-video {
    width: 100%;
}

.motogp-video-slot {
    width: 100%;
    min-height: 0 !important;
    height: auto !important;

    padding: 36px 0 !important;
    margin: 0;

    overflow: visible !important;

    display: block !important;
    align-items: initial !important;
    justify-content: initial !important;
}

#incontent-banner-1.motogp-video-slot {
    min-height: 0 !important;
    height: auto !important;
    padding: 36px 0 !important;
}

.motogp-video-player {
    position: relative;

    width: 100%;
    max-width: 400px;

    margin: 0 auto;
}

.motogp-video-player__media {
    position: relative;

    width: 100%;
    aspect-ratio: 16 / 9;

    overflow: hidden;

    background: #000;
    border-radius: 6px;
}

.motogp-video-player__video {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;

    background: #000;
}

/* Bottom gradient */

.motogp-video-player__media::after {
    content: "";

    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;

    z-index: 2;

    height: 78px;

    pointer-events: none;

    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.8),
        rgba(0, 0, 0, 0)
    );
}

/* Close */

.motogp-video-player__close {
    position: absolute;
    top: 8px;
    right: 8px;

    z-index: 10;

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

    width: 28px;
    height: 28px;

    padding: 0;

    border: 0;
    border-radius: 50%;

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

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

    cursor: pointer;
}


/* Center play / pause */

.motogp-video-player__center-play {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 6;

    transform: translate(-50%, -50%);

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

    width: 54px;
    height: 54px;
    padding: 0;

    border: 2px solid rgba(255, 255, 255, 0.9);
    border-radius: 50%;

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

    cursor: pointer;

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

.motogp-video-player__center-play:hover {
    background: rgba(0, 0, 0, 0.85);

    transform:
        translate(-50%, -50%)
        scale(1.06);
}

.motogp-video-player__center-play-icon {
    display: block;

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

    color: #fff;
}

.motogp-video-player__center-play:not(.is-pause)
.motogp-video-player__center-play-icon {
    transform: translateX(2px);
}


/* Progress */

.motogp-video-player__progress {
    position: absolute;

    left: 10px;
    right: 10px;
    bottom: 42px;

    z-index: 6;

    height: 4px;

    background: rgba(255, 255, 255, 0.35);

    cursor: pointer;
}

.motogp-video-player__progress-fill {
    width: 0;
    height: 100%;

    background: #fff;

    pointer-events: none;
}

/* Bottom controls */

.motogp-video-player__bottom {
    position: absolute;

    left: 10px;
    right: 10px;
    bottom: 7px;

    z-index: 6;

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

    gap: 10px;
}

.motogp-video-player__controls {
    display: flex;
    align-items: center;

    gap: 10px;
}

.motogp-video-player__play,
.motogp-video-player__mute {
    padding: 0;

    border: 0;

    background: transparent;
    color: #fff;

    font: inherit;
    font-size: 11px;
    font-weight: 700;

    cursor: pointer;
}

.motogp-video-player__play:hover,
.motogp-video-player__mute:hover {
    text-decoration: underline;
}

/* Time */

.motogp-video-player__time {
    color: rgba(255, 255, 255, 0.9);

    font-size: 10px;
    font-weight: 600;

    white-space: nowrap;
}

/* CTA */

.motogp-video-player__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    height: 28px;

    padding: 0 10px;

    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 3px;

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

    font-size: 10px;
    font-weight: 700;

    text-decoration: none;

    white-space: nowrap;
}

.motogp-video-player__cta:hover {
    background: #fff;
    color: #111;
}

/* Accessibility */

.motogp-video-player button:focus-visible,
.motogp-video-player a:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* Mobile */

@media (max-width: 767px) {
    .motogp-video-slot {
        padding: 24px 0 !important;
    }

    #incontent-banner-1.motogp-video-slot {
        padding: 24px 0 !important;
    }

    .motogp-video-player {
        width: calc(100% - 24px);
        max-width: 400px;
    }

    .motogp-video-player__bottom {
        left: 8px;
        right: 8px;
    }

    .motogp-video-player__progress {
        left: 8px;
        right: 8px;
    }

    .motogp-video-player__controls {
        gap: 8px;
    }

    .motogp-video-player__play,
    .motogp-video-player__mute {
        font-size: 10px;
    }

    .motogp-video-player__time {
        font-size: 9px;
    }

    .motogp-video-player__cta {
        padding: 0 8px;
        font-size: 9px;
    }
}

/* ==========================================================================
   Controls visibility
   ========================================================================== */

.motogp-video-player__center-play,
.motogp-video-player__progress,
.motogp-video-player__bottom {
    opacity: 0;

    transition: opacity 0.25s ease;
}

/* Show controls when requested by JS */
.motogp-video-player.controls-visible
.motogp-video-player__center-play,
.motogp-video-player.controls-visible
.motogp-video-player__progress,
.motogp-video-player.controls-visible
.motogp-video-player__bottom {
    opacity: 1;
}

/* Paused video always shows controls */
.motogp-video-player:not(.is-playing)
.motogp-video-player__center-play,
.motogp-video-player:not(.is-playing)
.motogp-video-player__progress,
.motogp-video-player:not(.is-playing)
.motogp-video-player__bottom {
    opacity: 1;
}

/* Prevent invisible controls from being clickable */
.motogp-video-player.is-playing:not(.controls-visible)
.motogp-video-player__center-play,
.motogp-video-player.is-playing:not(.controls-visible)
.motogp-video-player__progress,
.motogp-video-player.is-playing:not(.controls-visible)
.motogp-video-player__bottom {
    pointer-events: none;
}

/* ==========================================================================
   Modern controls
   ========================================================================== */

.motogp-video-player__bottom {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;

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

    padding: 18px 14px 10px;

    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.75),
        rgba(0, 0, 0, 0.25) 60%,
        transparent
    );
}

.motogp-video-player__controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Volume */

.motogp-video-player__volume {
    display: flex;
    align-items: center;
    gap: 7px;
}

.motogp-video-player__mute {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 22px;
    height: 22px;
    padding: 0;

    border: 0;
    background: transparent;
    color: #fff;

    cursor: pointer;
}

.motogp-video-player__volume-icon {
    display: block;

    width: 18px;
    height: 18px;

    opacity: 0.9;

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

.motogp-video-player__mute:hover
.motogp-video-player__volume-icon {
    opacity: 1;
    transform: scale(1.08);
}

/* Volume slider */

.motogp-video-player__volume-slider {
    width: 55px;
    height: 3px;

    margin: 0;
    padding: 0;

    border: 0;
    outline: none;
    background: transparent;

    cursor: pointer;

    -webkit-appearance: none;
    appearance: none;
}

.motogp-video-player__volume-slider::-webkit-slider-runnable-track {
    height: 3px;

    border-radius: 999px;

    background: rgba(255, 255, 255, 0.45);
}

.motogp-video-player__volume-slider::-webkit-slider-thumb {
    width: 10px;
    height: 10px;

    margin-top: -3.5px;

    border: 0;
    border-radius: 50%;

    background: #fff;

    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);

    cursor: pointer;

    -webkit-appearance: none;
    appearance: none;
}

/* Firefox */

.motogp-video-player__volume-slider::-moz-range-track {
    height: 3px;

    border: 0;
    border-radius: 999px;

    background: rgba(255, 255, 255, 0.45);
}

.motogp-video-player__volume-slider::-moz-range-thumb {
    width: 10px;
    height: 10px;

    border: 0;
    border-radius: 50%;

    background: #fff;

    cursor: pointer;
}

/* Time */

.motogp-video-player__time {
    color: rgba(255, 255, 255, 0.9);

    font-size: 11px;
    font-weight: 500;
    line-height: 1;

    white-space: nowrap;
}

/* Watch more */

.motogp-video-player__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 28px;
    padding: 0 11px;

    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 999px;

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

    font-size: 10px;
    font-weight: 600;
    line-height: 1;

    text-decoration: none;

    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.motogp-video-player__cta:hover {
    border-color: #fff;

    background: rgba(255, 255, 255, 0.16);
    color: #fff;

    text-decoration: none;

    transform: translateY(-1px);
}

/* Progress */

.motogp-video-player__progress {
    position: absolute;
    right: 14px;
    bottom: 43px;
    left: 14px;

    height: 3px;

    overflow: hidden;

    border-radius: 999px;

    background: rgba(255, 255, 255, 0.35);

    cursor: pointer;

    transition:
        opacity 0.25s ease,
        height 0.15s ease;
}

.motogp-video-player__progress:hover {
    height: 5px;
}

.motogp-video-player__progress-fill {
    width: 0;
    height: 100%;

    border-radius: inherit;

    background: #fff;
}

/* Mobile */

@media (max-width: 767px) {
    .motogp-video-player__bottom {
        padding-right: 10px;
        padding-left: 10px;
    }

    .motogp-video-player__progress {
        right: 10px;
        left: 10px;
    }

    .motogp-video-player__volume-slider {
        width: 42px;
    }

    .motogp-video-player__controls {
        gap: 8px;
    }

    .motogp-video-player__cta {
        padding: 0 9px;
    }
}

/* ==========================================================================
   Floating video player
   ========================================================================== */

/*
 * Stable wrapper.
 * This element always remains in the article.
 */
.motogp-video-player-wrapper {
    width: 100%;
    max-width: 400px;

    margin: 0 auto;
}

/*
 * Desktop floating player
 */
.motogp-video-player.is-floating {
    position: fixed !important;

    top: auto !important;
    right: 24px !important;
    bottom: 24px !important;
    left: auto !important;

    z-index: 99999 !important;

    width: 400px !important;
    max-width: calc(100vw - 48px) !important;

    margin: 0 !important;

    border-radius: 8px;

    box-shadow:
        0 10px 35px
        rgba(0, 0, 0, 0.35);
}

.motogp-video-player.is-floating
.motogp-video-player__media {
    width: 100%;
    aspect-ratio: 16 / 9;

    border-radius: 8px;
}

/* Tablet */

@media (max-width: 1023px) {
    .motogp-video-player.is-floating {
        right: 16px !important;
        bottom: 16px !important;

        width: 360px !important;
        max-width: calc(100vw - 32px) !important;
    }
}

/* Mobile */

@media (max-width: 767px) {
    .motogp-video-player-wrapper {
        width: calc(100% - 24px);
    }

    .motogp-video-player {
        width: 100%;
    }

    .motogp-video-player.is-floating {
        right: 12px !important;
        bottom: 12px !important;

        width: 280px !important;
        max-width: calc(100vw - 24px) !important;
    }
}

/* Small mobile */

@media (max-width: 480px) {
    .motogp-video-player.is-floating {
        width: 260px !important;
    }
}