.t7-video-modal {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 2000;
    width: min(540px, calc(100vw - 40px));
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 12px;
    background: #111;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .3);
}

.t7-video-modal[hidden] {
    display: none;
}

.t7-video-modal.is-centered {
    right: auto;
    bottom: auto;
    top: 50%;
    left: 50%;
    z-index: 2001;
    transform: translate(-50%, -50%);
}

.t7-video-modal__media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.t7-video-modal__media iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    pointer-events: none;
}

.t7-video-modal__link {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 1;
    display: inline-flex;
    cursor: pointer;
}

.t7-video-modal.is-centered .t7-video-modal__link {
    top: auto;
    right: 12px;
    bottom: 12px;
    justify-content: center;
}

.t7-video-modal.is-centered .t7-video-modal__cta {
    flex: 1;
    text-align: center;
}

.t7-video-modal__cta {
    padding: 7px 10px;
    border-radius: 4px;
    background: #f9cd43;
    color: #111;
    font-family: proxima-nova, sans-serif;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
}

.t7-video-modal__sound {
    position: absolute;
    left: 50%;
    bottom: 12px;
    z-index: 2;
    padding: 8px 12px;
    border: 0;
    border-radius: 4px;
    background: rgba(0, 0, 0, .78);
    color: #fff;
    font-family: proxima-nova, sans-serif;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transform: translateX(-50%);
}

.t7-video-modal__sound:focus-visible {
    outline: 3px solid #f9cd43;
    outline-offset: 2px;
}

.t7-video-modal.is-centered .t7-video-modal__sound {
    bottom: 68px;
}

.t7-video-modal__link:focus-visible {
    outline: 3px solid #f9cd43;
    outline-offset: -3px;
}

.t7-video-modal__close {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, .75);
    color: #fff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.t7-video-modal__close:focus-visible {
    outline: 3px solid #f9cd43;
    outline-offset: 2px;
}

@media (hover: hover) and (pointer: fine) {
    .t7-video-modal__close,
    .t7-video-modal__link {
        opacity: 0;
        pointer-events: none;
        transition: opacity .2s ease;
    }

    .t7-video-modal:hover .t7-video-modal__close,
    .t7-video-modal:hover .t7-video-modal__link,
    .t7-video-modal:focus-within .t7-video-modal__close,
    .t7-video-modal:focus-within .t7-video-modal__link {
        opacity: 1;
        pointer-events: auto;
    }
}

@media (max-width: 600px) {
    .t7-video-modal {
        right: 12px;
        bottom: 12px;
        width: min(540px, calc(100vw - 24px));
    }

    .t7-video-modal__close,
    .t7-video-modal__link {
        opacity: 1;
        pointer-events: auto;
    }
}
