/**
 * Front-end styles.
 *
 * Keep z-index overrides in CSS. Some BRV site popups use extremely high z-index values.
 * Player height comes from aspect-ratio, not an admin height field.
 */

.bypp-overlay {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.9);
    opacity: 0;
    transition: opacity 200ms ease;
    z-index: 2000000000 !important;
}

.bypp-content {
    position: relative;
    aspect-ratio: 16 / 9;
    max-width: calc(100vw - 40px);
    background: #000;
    z-index: 2000000001 !important;
}

.bypp-content.bypp-size-full {
    width: min(calc(100vw - 48px), calc((100vh - 96px) * 16 / 9)) !important;
    max-width: calc(100vw - 48px);
}

.bypp-iframe-container {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.bypp-iframe-container iframe {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    border: 0;
}

.bypp-close {
    position: absolute;
    top: -1.5rem;
    right: -1.5rem;
    width: 2.5rem;
    height: 2.5rem;
    background: #fff;
    color: #000;
    font-size: 1.5rem;
    line-height: 2.5rem;
    text-align: center;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 2000000002 !important;
}

.bypp-close:focus,
.bypp-close:hover {
    outline: 2px solid #698fb1;
    outline-offset: 2px;
}

@media (max-width: 640px) {
    .bypp-content,
    .bypp-content.bypp-size-full {
        width: calc(100vw - 32px) !important;
        max-width: calc(100vw - 32px);
    }

    .bypp-close {
        top: -3rem;
        right: 0;
    }
}
