/* Video popup styles in their own file (new URL = not stuck in the Cloudflare/browser cache of reskin.min.css).
   Loaded after reskin.min.css in layouts/app.blade.php. */

/* Video popup (SweetAlert2, opened by $scope.setIframe in app-script.blade.php) ----
   Replaces the old Bootstrap #video_mdl look: rounded card, brand-coloured border,
   soft shadow, a 16:9 player and a round close button. */

.swal2-container:has(.pt-video-swal) {
    padding: 16px;
    background: rgba(31, 26, 25, .72);
}

.pt-video-swal.swal2-popup {
    overflow: hidden;
    border: 3px solid var(--rs-card);
    border-radius: var(--rs-radius-lg);
    background: var(--rs-ink);
    box-shadow: var(--rs-shadow-3), 0 0 0 1px var(--rs-brand-deep);
}

.pt-video-swal .pt-video-swal__body.swal2-html-container {
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.pt-video-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--rs-ink);
}

.pt-video-frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.pt-video-swal .pt-video-swal__close.swal2-close {
    top: 10px;
    right: 10px;
    z-index: 2;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--rs-card);
    color: var(--rs-ink);
    font-size: 26px;
    line-height: 36px;
    box-shadow: var(--rs-shadow-2);
}

.pt-video-swal .pt-video-swal__close.swal2-close:hover {
    background: var(--rs-brand-deep);
    color: var(--rs-on-brand);
}

@media (max-width: 575.98px) {
    .pt-video-swal.swal2-popup {
        border-width: 2px;
        border-radius: var(--rs-radius-md);
    }
}

/* A site-wide `button { border-radius: 0 !important }` rule squares the SweetAlert close button;
   beat it with a more specific selector so the video popup's X stays round. */
div.swal2-container .pt-video-swal.swal2-popup .pt-video-swal__close.swal2-close {
    border-radius: 50% !important;
}
