/* =====================================================
   VIDEO MODAL
===================================================== */

.video-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;

    opacity: 0;
    visibility: hidden;

    pointer-events: none;

    transition:
        opacity 0.3s ease,
        visibility 0.3s ease;
}


/* =====================================================
   MODAL ACTIVE
===================================================== */

.video-modal.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}


/* =====================================================
   OVERLAY
===================================================== */

.video-modal-overlay {
    position: absolute;
    inset: 0;

    background: rgba(0, 0, 0, 0.82);

    backdrop-filter: blur(5px);
}


/* =====================================================
   MODAL CONTENT
===================================================== */

.video-modal-content {
    position: relative;
    z-index: 2;

    width: min(900px, 100%);

    background: #111;

    border-radius: 16px;

    overflow: hidden;

    box-shadow:
        0 25px 70px rgba(0, 0, 0, 0.45);

    transform: translateY(20px) scale(0.97);

    transition:
        transform 0.3s ease;
}


.video-modal.active
.video-modal-content {
    transform:
        translateY(0)
        scale(1);
}


/* =====================================================
   CLOSE BUTTON
===================================================== */

.video-modal-close {
    position: absolute;

    top: 12px;
    right: 12px;

    z-index: 5;

    width: 40px;
    height: 40px;

    border: none;
    border-radius: 50%;

    background: rgba(0, 0, 0, 0.65);

    color: #fff;

    font-size: 28px;
    line-height: 1;

    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}


.video-modal-close:hover {
    background: rgba(0, 0, 0, 0.9);

    transform: rotate(90deg);
}


/* =====================================================
   TITLE
===================================================== */

.video-modal-title {
    padding: 18px 55px 18px 20px;

    color: #fff;

    font-size: 18px;
    font-weight: 600;

    background: #171717;
}


/* =====================================================
   VIDEO WRAPPER
===================================================== */

.video-modal-player-wrapper {
    width: 100%;

    background: #000;

    aspect-ratio: 16 / 9;
}


/* =====================================================
   VIDEO PLAYER
===================================================== */

.video-modal-player {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: contain;

    background: #000;
}


/* =====================================================
   BODY LOCK
===================================================== */

body.video-modal-open {
    overflow: hidden;
}


/* =====================================================
   MOBILE
===================================================== */

@media (max-width: 767px) {

    .video-modal {
        padding: 12px;
    }


    .video-modal-content {
        width: 100%;

        border-radius: 12px;
    }


    .video-modal-title {
        padding: 15px 50px 15px 15px;

        font-size: 16px;
    }


    .video-modal-close {
        width: 36px;
        height: 36px;

        top: 9px;
        right: 9px;

        font-size: 24px;
    }

}