/* =========================================================
   SHARED VIDEO MODAL
   ========================================================= */

#videoModal{
    padding:0!important;
}

#videoModal .modal-dialog{
    display:flex;
    width:min(1120px,calc(100% - 32px));
    max-width:1120px;
    height:calc(100vh - 32px);
    height:calc(100dvh - 32px);
    align-items:center;
    margin:16px auto;
}

/* =========================================================
   MODAL CONTAINER
   ========================================================= */

.campus-video-modal{
    display:flex;
    width:100%;
    max-height:100%;
    overflow:hidden;
    flex-direction:column;
    border:0;
    border-radius:16px;
    background:#111225;
    box-shadow:0 25px 70px rgba(0,0,0,.32);
}

/* =========================================================
   MODAL HEADER
   ========================================================= */

.campus-video-modal .modal-header{
    flex:0 0 auto;
    min-height:62px;
    padding:15px clamp(18px,3vw,28px);
    border-bottom:1px solid rgba(255,255,255,.12);
    background:linear-gradient(
        135deg,
        var(--plum),
        #42358b
    );
    color:#fff;
}

.campus-video-modal .modal-title{
    margin:0;
    padding-right:18px;
    color:#fff;
    font-size:clamp(1rem,2vw,1.3rem);
    font-weight:800;
    line-height:1.35;
}

.campus-video-modal .btn-close{
    flex:0 0 auto;
    margin:0;
    filter:invert(1);
    opacity:.9;
}

.campus-video-modal .btn-close:hover{
    opacity:1;
}

/* =========================================================
   MODAL BODY
   ========================================================= */

.campus-video-modal .modal-body{
    position:relative;
    display:flex;
    width:100%;
    min-height:0;
    align-items:center;
    justify-content:center;
    padding:0;
    overflow:hidden;
    background:#111225;
}

/* =========================================================
   VIDEO FRAME
   ========================================================= */

.campus-video-frame{
    position:relative;
    width:100%;
    max-height:calc(100vh - 94px);
    max-height:calc(100dvh - 94px);
    margin:auto;
    overflow:hidden;
    aspect-ratio:16/9;
    background:#111225;
}

.campus-video-frame iframe{
    position:absolute;
    inset:0;
    display:block;
    width:100%;
    height:100%;
    border:0;
    background:#111225;
}

/* =========================================================
   MOBILE
   ========================================================= */

@media(max-width:767px){

    #videoModal .modal-dialog{
        width:calc(100% - 14px);
        height:calc(100vh - 14px);
        height:calc(100dvh - 14px);
        margin:7px auto;
    }

    .campus-video-modal{
        border-radius:12px;
    }

    .campus-video-modal .modal-header{
        min-height:56px;
        padding:13px 16px;
    }

    .campus-video-modal .modal-title{
        font-size:1rem;
    }

    .campus-video-frame{
        max-height:calc(100vh - 70px);
        max-height:calc(100dvh - 70px);
    }

}

/* =========================================================
   SHORT LANDSCAPE SCREENS
   ========================================================= */

@media(max-height:550px){

    #videoModal .modal-dialog{
        width:calc(100% - 14px);
        height:calc(100vh - 14px);
        height:calc(100dvh - 14px);
        margin:7px auto;
    }

    .campus-video-modal{
        height:100%;
        border-radius:10px;
    }

    .campus-video-modal .modal-header{
        min-height:48px;
        padding:9px 16px;
    }

    .campus-video-modal .modal-title{
        font-size:.95rem;
    }

    .campus-video-modal .modal-body{
        flex:1 1 auto;
    }

    .campus-video-frame{
        height:100%;
        max-height:100%;
        aspect-ratio:auto;
    }

}

/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media(prefers-reduced-motion:reduce){

    #videoModal{
        scroll-behavior:auto;
    }

}