/* ============================================================================
   media-popup - the video / picture popup (Magnific Popup) on every page of
   every theme, front and back end. Linked once from application/views/base_css.php.
   (owner, 2026-12-01: the close button was a square blue block and the page
   behind went almost black.)
   - The page behind is dimmed, not blacked out, and softly blurred.
   - The close button is a round white button with a dark cross, the same on
     every theme (a theme's button colour no longer paints it).
   ============================================================================ */
.mfp-bg,
.mfp-bg.mfp-ready,
.mfp-bg.mfp-fade.mfp-ready {
    background: rgba(15, 20, 30, .62) !important;
    opacity: 1 !important;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}
.mfp-bg.mfp-removing { opacity: 0 !important; }

.mfp-iframe-holder .mfp-content,
.mfp-image-holder .mfp-content { border-radius: 14px; }
.mfp-iframe-scaler {
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .6);
}
.mfp-iframe-scaler iframe { border-radius: 14px; box-shadow: none; background: #000; }
/* the in-article video rule (partials/media_gallery_style.php) caps every YouTube embed at 760px;
   inside the popup the player fills its box, so there is no pale frame around a smaller video */
.mfp-iframe-scaler iframe.mfp-iframe {
    width: 100% !important;
    max-width: none !important;
    height: 100% !important;
    aspect-ratio: auto;
    border-radius: 14px;
}
.mfp-figure:after { border-radius: 14px; }
.mfp-img { border-radius: 14px; }

html body .mfp-close,
html body button.mfp-close,
html body .mfp-iframe-holder .mfp-close,
html body .mfp-image-holder .mfp-close {
    width: 42px !important;
    height: 42px !important;
    min-width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    border: 0 !important;
    border-radius: 50% !important;
    background: #fff !important;
    color: #1b1f27 !important;
    font-family: Arial, sans-serif !important;
    font-size: 28px !important;
    font-weight: 400 !important;
    line-height: 1 !important;
    text-align: center !important;
    opacity: 1 !important;
    box-shadow: 0 6px 18px -6px rgba(0, 0, 0, .55) !important;
    cursor: pointer;
    transition: transform .2s ease, background .2s ease;
}
html body .mfp-iframe-holder .mfp-close,
html body .mfp-image-holder .mfp-close { top: -52px !important; right: 0 !important; }
html body .mfp-close:hover,
html body .mfp-close:focus { background: #f1f3f6 !important; transform: scale(1.06); outline: none; }
html body .mfp-close:active { top: -52px !important; }
@media (max-width: 767px) {
    html body .mfp-iframe-holder .mfp-close,
    html body .mfp-image-holder .mfp-close { top: -50px !important; right: 4px !important; }
}
