/* ===== Modal base ===== */
.yt-modal {
    position: fixed;
    inset: 0;
    display: none; /* hidden by default */
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.yt-modal.is-open {
    display: flex;
}

.yt-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .75);
}

/* ===== Dialog ===== */
.yt-dialog {
    position: relative;
    z-index: 1;
    width: min(92vw, 1100px);
    background: #000;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
    overflow: hidden;
}

/* Narrower dialog for portrait video */
.yt-dialog.is-portrait {
    width: min(92vw, 420px);
}
.yt-open {
    cursor:pointer;
}
.yt-close{
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    background: rgba(0,0,0,.5);
    color: #fff;

    font-size: 26px;
    line-height: 1;   /* important */
    cursor: pointer;
}

.yt-close:hover {
    background: var(--cq-orange-500);
}

/* ===== Aspect-ratio box (no bootstrap) ===== */
.yt-box {
    position: relative;
    width: 100%;
    background: #000;
}

/* 16:9 */
.yt-16x9::before {
    content: "";
    display: block;
    padding-top: 56.25%; /* 9/16 = 0.5625 */
}

/* 9:16 */
.yt-9x16::before {
    content: "";
    display: block;
    padding-top: 177.7778%; /* 16/9 = 1.777... */
}

.yt-box iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}