/* ==========================================================
   ATJ Learning Experience
   Premium Player Modal
   Sprint 3D Part 1
========================================================== */

/* ==========================================================
   Modal
========================================================== */

.atj-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;

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

    opacity: 0;
    visibility: hidden;

    transition:
        opacity .3s ease,
        visibility .3s ease;
}

.atj-modal.active {
    opacity: 1;
    visibility: visible;
}

.atj-modal-overlay {
    position: absolute;
    inset: 0;

    background: rgba(0, 0, 0, .78);

    backdrop-filter: blur(6px);
}

/* ==========================================================
   Window
========================================================== */

.atj-modal-window {

    position: relative;

    width: min(1100px, 94vw);

    border-radius: 22px;

    overflow: hidden;

    background: #000;

    transform: translateY(30px);

    transition: transform .3s ease;

    z-index: 2;

}

.atj-modal.active .atj-modal-window {

    transform: translateY(0);

}

/* ==========================================================
   Close Button
========================================================== */

.atj-modal-close {

    position: absolute;

    top: 18px;
    right: 18px;

    width: 44px;
    height: 44px;

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

    padding: 0;
    margin: 0;

    border: 0;
    border-radius: 50%;

    background: #D8B4A0;

    color: #fff;

    font-size: 30px;
    font-weight: 400;
    line-height: 1;

    cursor: pointer;

    transition:
        background .25s ease,
        transform .25s ease;

    z-index: 100;

}

.atj-modal-close > span {
    position: relative;
    display: block;
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    font-size: 0;
}

.atj-modal-close > span::before,
.atj-modal-close > span::after {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 26px;
    height: 3px;
    border-radius: 999px;
    background: currentColor;
    content: '';
}

.atj-modal-close > span::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.atj-modal-close > span::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.atj-modal-close:hover {

    background: #2E3A3A;

    transform: translateY(2px) scale(.96);

}

.atj-modal-fullscreen {

    position: absolute;

    top: 18px;
    right: 74px;

    width: 44px;
    height: 44px;

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

    padding: 0;

    border: 0;
    border-radius: 50%;

    background: #D8B4A0;
    color: #fff;

    cursor: pointer;

    transition:
        background .25s ease,
        transform .25s ease;

    z-index: 100;

}

.atj-modal-fullscreen svg {

    width: 20px;
    height: 20px;

    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;

}

.atj-modal-fullscreen:hover {

    background: #2E3A3A;

    transform: translateY(2px) scale(.96);

}

.atj-modal-window:fullscreen,
.atj-modal-window:-webkit-full-screen {

    width: 100vw;
    height: 100vh;
    max-width: none;
    max-height: none;
    border-radius: 0;

}

.atj-modal-window:fullscreen .atj-player,
.atj-modal-window:-webkit-full-screen .atj-player {

    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    aspect-ratio: auto;

}

/* ==========================================================
   Player
========================================================== */

.atj-player {

    position: relative;

    width: 100%;

    aspect-ratio: 16 / 9;

    background: #000;

    overflow: hidden;

}

/* ==========================================================
   Shared Player Layers
========================================================== */

.atj-player-thumbnail,
.atj-player-container,
.atj-player-loader,
.atj-player-complete {

    position: absolute;

    inset: 0;

}

/* ==========================================================
   Thumbnail
========================================================== */

.atj-player-thumbnail {

    z-index: 5;

    overflow: hidden;

    background: #000;

}

.atj-player-thumbnail img {

    width: 100%;

    height: 100%;

    display: block;

    object-fit: cover;

    transition: opacity .35s ease;

}

/* ==========================================================
   Vimeo Container
========================================================== */

.atj-player-container {

    z-index: 10;

    background: #000;

}

.atj-player-container iframe {

    width: 100%;
    height: 100%;
    border: 0;

}

.atj-player-container > div {

    width: 100%;
    height: 100%;

}

.atj-player-container > .atj-video-consent {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 24px;
    box-sizing: border-box;
    color: #fff;
    text-align: center;
    font-size: clamp(14px, 2.2vw, 18px);
    line-height: 1.5;
}

.atj-video-consent p { max-width: 560px; margin: 0; }
.atj-video-consent button {
    padding: 12px 20px;
    border: 2px solid #fff;
    border-radius: 8px;
    background: #526f62;
    color: #fff;
    cursor: pointer;
}
.atj-video-consent button:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }

/* ==========================================================
   Loader
========================================================== */

.atj-player-loader {

    display: none;

    align-items: center;

    justify-content: center;

    background: rgba(0,0,0,.45);

    z-index: 20;

}

.atj-spinner {

    width: 64px;
    height: 64px;

    border: 6px solid rgba(255,255,255,.25);
    border-top-color: #fff;

    border-radius: 50%;

    animation: atj-spin .8s linear infinite;

}

@keyframes atj-spin {

    to {
        transform: rotate(360deg);
    }

}

/* ==========================================================
   Completion
========================================================== */

.atj-player-complete {

    display: none;

    align-items: center;

    justify-content: center;

    background: rgba(0,0,0,.70);

    z-index: 30;

}

.atj-complete-circle {

    width: 88px;
    height: 88px;

    margin: 0 auto 28px;

    border-radius: 50%;

    background: #6FA3A6;

    color: #fff;

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

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

    box-shadow: 0 12px 28px rgba(111,163,166,.35);

}

@keyframes atj-complete-pop {

    0% {

        transform: scale(.7);

        opacity: 0;

    }

    70% {

        transform: scale(1.08);

    }

    100% {

        transform: scale(1);

        opacity: 1;

    }

}

/* ==========================================================
   Responsive
========================================================== */

@media (max-width: 1024px) {

    .atj-modal-window {

        width: 96vw;

        border-radius: 18px;

    }

}

@media (max-width: 1180px) {

    .atj-modal-fullscreen {

        display: flex;

    }

}

/* ==========================================================
   Body Lock
========================================================== */

body.atj-modal-open {

    overflow: hidden;

}

/* ==========================================================
   Sprint 10A
   Premium Transition Layer
========================================================== */

.atj-player-transition {

    position: absolute;
    inset: 0;

    display: none;

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

    padding: 0;

    background: rgba(0,0,0,.82);

    z-index: 40;

}

.atj-transition-card {

    width:100%;
    height:100%;

    position:relative;

    padding:18px 36px 54px;

    text-align:center;

    background:transparent;

    box-sizing:border-box;

    animation:atjTransitionIn .35s ease;

}

.atj-transition-card .atj-complete-circle {

    width: 76px;
    height: 76px;

    margin: 0 auto 28px;

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

    background: #6FA3A6;

    box-shadow: none;

}

.atj-complete-icon {

    width: 38px;
    height: 38px;

    display: block;

    color: #fff;

    flex-shrink: 0;

}

.atj-transition-heading {

    margin: 0 0 8px;

    color: #F2F2F2;

    font-size: 30px;

    font-weight: 700;

    line-height: 1.25;

}

.atj-transition-status {

    display: none;

}

.atj-transition-progress {

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

    height: 10px;

    margin: 24px auto 18px;

    background: rgba(255,255,255,.12);

    border-radius: 999px;

    overflow: hidden;

}

#atj-transition-progress-bar {

    display: block;

    width: 0%;
    height: 100%;

    background: #D8B4A0;

    border-radius: inherit;

    transition: width .8s ease;

}

.atj-transition-progress-text {

    margin: 0;

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

    color: rgba(255,255,255,.85);

    letter-spacing: .02em;

}

#atj-transition-complete {

    padding-bottom: 0;

    transform: translateY(-24px);

}

.atj-transition-label {

    margin: 0 0 32px;

    color: #6FA3A6;

    font-size: 15px;

    font-weight: 700;

    letter-spacing: .12em;

    text-transform: uppercase;

}

#atj-transition-thumbnail {

    width: min(620px, 64%);

    margin: 0 auto 24px;

    display: block;

    aspect-ratio: 16 / 9;

    object-fit: cover;

    border: 2px solid rgba(255,255,255,.85);

    border-radius: 16px;

    box-sizing: border-box;

    background: #fff;

}

#atj-transition-title {

    margin: 0 0 10px;

    color: #D6D6D6;

    font-size: 34px;

    font-weight: 700;

    line-height: 1.2;

}

.atj-transition-countdown {

    margin: 0;

    color: #D8B4A0;

    font-size: 24px;

    font-weight: 700;

}

@keyframes atjTransitionIn {

    from {

        opacity: 0;

        transform: translateY(18px) scale(.96);

    }

    to {

        opacity: 1;

        transform: translateY(0) scale(1);

    }

}

/* ==========================================================
   Sprint 12B
   Transition Animations
========================================================== */

@keyframes atjSlideOutLeft {

    from {

        opacity: 1;

        transform: translateX(0);

    }

    to {

        opacity: 0;

        transform: translateX(-40px);

    }

}

@keyframes atjSlideInRight {

    from {

        opacity: 0;

        transform: translateX(40px);

    }

    to {

        opacity: 1;

        transform: translateX(0);

    }

}

@keyframes atjFadeOut {

    from {

        opacity: 1;

    }

    to {

        opacity: 0;

    }

}

/* ==========================================================
   Sprint 10B
   Transition Panels
========================================================== */

.atj-transition-panel {

    position: absolute;
    inset: 0;

    display: none;

    align-items: center;
    justify-content: center;
    flex-direction: column;

    text-align: center;

    padding: 20px 28px;

    opacity: 0;

    transform: translateY(12px);

    transition:
        opacity .30s ease,
        transform .30s ease;

}

.atj-transition-panel.active {

    display: flex;

    opacity: 1;

    transform: translateY(0);

}

/* ==========================================================
   Sprint 12B
   Animation Helpers
========================================================== */

.atj-slide-out {

    animation: atjSlideOutLeft .30s ease forwards;

}

.atj-slide-in {

    animation: atjSlideInRight .35s ease forwards;

}

.atj-fade-out {

    animation: atjFadeOut .25s ease forwards;

}

@media (max-width: 768px) {

    .atj-modal-window {

    width:100vw;

    aspect-ratio:auto;

    }

    #atj-transition-complete {

    justify-content: center;

    padding-top: 52px;

}

    .atj-transition-panel {

    justify-content: flex-start;

    padding-top: 24px;

}

    .atj-transition-progress-text {

    font-size: 15px;

    line-height: 1.3;

}

    .atj-player-transition {

    padding: 0;

    background: rgba(0,0,0,.82);

    }

    .atj-modal-close {

        top: 14px;
        right: 14px;

        width: 36px;
        height: 36px;

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

        padding: 0;

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

    }

    .atj-modal-fullscreen {

        top: 14px;
        right: 60px;

        width: 36px;
        height: 36px;

    }

    @media (orientation: portrait) {

        .atj-modal-close,
        .atj-modal-fullscreen {

            right: 12px;

            width: 34px;
            height: 34px;

        }

        .atj-modal-close {

            top: 12px;

        }

        .atj-modal-fullscreen {

            top: 54px;

        }

        .atj-modal-close > span {

            width: 20px;
            height: 20px;
            flex-basis: 20px;

        }

        .atj-modal-close > span::before,
        .atj-modal-close > span::after {

            width: 20px;
            height: 2px;

        }

        .atj-modal-fullscreen svg {

            width: 20px;
            height: 20px;

        }

    }

    /* Hide progress text on mobile */

    .atj-transition-status {

        display: none !important;

    }

    /* Transition card */

    .atj-transition-card {

    width:100%;
    height:100%;

    position:relative;

    padding:18px 36px 54px;

    text-align:center;

    background:transparent;

    box-sizing:border-box;

    animation:atjTransitionIn .35s ease;

}

    /* Completion icon */

    .atj-transition-card .atj-complete-circle {

    width: 52px;
    height: 52px;

    margin: 0 auto 18px;

}

    .atj-complete-icon {

    width: 28px;
    height: 28px;

}

    /* Welcome title */

    .atj-transition-heading {

    font-size: 21px;

    line-height: 1.2;

    margin: 0 0 14px;

} 

    /* Progress bar */

    .atj-transition-progress {

    max-width: 260px;

    height: 7px;

    margin: 6px auto 16px;

}

    /* Coming Up */

    .atj-transition-label {

    display: none;

    }

    /* Thumbnail */

   #atj-transition-thumbnail {

    width: 68%;

    max-width: 250px;

    margin: 0 auto 12px;

    border-radius: 12px;

}

    /* Video title */

    #atj-transition-title {

    font-size: 20px;

    line-height: 1.2;

    margin: 0 0 2px;

}

    /* Countdown */

    .atj-transition-countdown {

    font-size: 16px;

    margin-top: -4px;

}

}

/*==================================================
Sprint 16A
Responsive Cinema Mode
==================================================*/

@media (orientation: landscape) and (max-width:1180px){

    body.atj-landscape-player .atj-modal{

        padding:0;

    }

    body.atj-landscape-player .atj-modal-window{

        position:fixed;
        inset:0;

        width:100vw;
        height:100vh;

        max-width:none;
        max-height:none;

        margin:0;

        border-radius:0;

        transform:none;

        box-shadow:none;

    }

    body.atj-landscape-player .atj-modal.active .atj-modal-window{

        transform:none;

    }

    body.atj-landscape-player .atj-player{

        position:absolute;
        inset:0;

        width:100%;
        height:100%;

        aspect-ratio:auto;

        overflow:hidden;

    }

    body.atj-landscape-player .atj-player-container{

        border-radius:0;

    }

    body.atj-landscape-player .atj-modal-close{

        top:12px;
        right:12px;

        width:40px;
        height:40px;

        display:flex;

        z-index:101;

    }

    body.atj-landscape-player .atj-modal-fullscreen{

        top:12px;
        right:64px;

        width:40px;
        height:40px;

        display:flex;

        z-index:101;

    }

    body.atj-landscape-player .atj-player-transition{

        position:absolute;
        inset:0;

    }

    /*--------------------------------------------------
    Landscape Transition Layout
    --------------------------------------------------*/

    body.atj-landscape-player #atj-transition-next{

    justify-content:center;

    padding:12px 20px;

    gap:8px;

}

    body.atj-landscape-player .atj-transition-label{

        margin:0 0 16px;

    }

    body.atj-landscape-player #atj-transition-thumbnail{

    width:min(420px,46%);

    margin:0;

}

    body.atj-landscape-player #atj-transition-title{

        font-size:26px;

        margin:0;

    }

    body.atj-landscape-player .atj-transition-countdown{

        font-size:20px;

        margin-top:0;

    }

}

/* Keep the welcome ending balanced inside narrow 16:9 phone players. */
@media (max-width: 480px) {
    #atj-transition-complete {
        box-sizing: border-box;
        padding: 16px 20px;
        transform: none;
        justify-content: center;
    }
    #atj-transition-complete .atj-complete-circle {
        width: 40px;
        height: 40px;
        flex: 0 0 40px;
        margin: 0 0 12px;
    }
    #atj-transition-complete .atj-transition-heading {
        font-size: 18px;
        line-height: 1.3;
        margin: 0 0 12px;
    }
    #atj-transition-complete .atj-transition-progress {
        width: min(260px, 100%);
        height: 7px;
        flex-shrink: 0;
        margin: 0;
    }
}
