.wppmf-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    padding: clamp(42px, 5vw, 56px) clamp(12px, 3vw, 28px) clamp(22px, 4vw, 36px);
    background: rgba(15, 23, 42, 0.22);
    backdrop-filter: blur(1.5px);
    -webkit-backdrop-filter: blur(1.5px);
    box-sizing: border-box;
}
.wppmf-overlay.is-visible { display: flex; }
.wppmf-box {
    width: min(var(--wppmf-width), 100%);
    max-height: 92vh;
    overflow: hidden;
    position: relative;
    background: var(--wppmf-bg);
    color: var(--wppmf-text);
    border-radius: 22px;
    box-shadow: 0 18px 58px rgba(15, 23, 42, 0.18);
    box-sizing: border-box;
    opacity: 0;
    transform: translateY(14px) scale(.985);
    transition: opacity .24s ease, transform .24s ease;
}
.wppmf-overlay.is-visible .wppmf-box { opacity: 1; transform: translateY(0) scale(1); }
.wppmf-pos-center { margin: auto; }
.wppmf-pos-bottom_right { margin: auto 0 0 auto; }
.wppmf-pos-bottom_left { margin: auto auto 0 0; }
.wppmf-anim-zoom { transform: scale(.96); }
.wppmf-overlay.is-visible .wppmf-anim-zoom { transform: scale(1); }
.wppmf-anim-slide { transform: translateY(34px); }
.wppmf-overlay.is-visible .wppmf-anim-slide { transform: translateY(0); }
.wppmf-close {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 10;
    width: 22px;
    height: 22px;
    border: 0;
    border-radius: 6px;
    background: rgba(15, 23, 42, .22);
    color: #fff;
    font-size: 17px;
    line-height: 20px;
    cursor: pointer;
    box-shadow: none;
    text-shadow: 0 1px 3px rgba(0,0,0,.45);
    transition: background .18s ease, transform .18s ease, opacity .18s ease;
    padding: 0;
}
.wppmf-close:hover { background: rgba(15,23,42,.48); transform: scale(1.03); }
.wppmf-image { display: block; width: 100%; height: auto; border: 0; }
.wppmf-body { padding: 28px; }
.wppmf-title { margin: 0 0 12px; color: inherit; font-size: clamp(22px, 3vw, 30px); line-height: 1.25; }
.wppmf-content { font-size: 16px; line-height: 1.65; }
.wppmf-content p:first-child { margin-top: 0; }
.wppmf-content p:last-child { margin-bottom: 0; }
.wppmf-content img { max-width: 100%; height: auto; border-radius: 12px; }
.wppmf-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    margin-top: 20px;
    padding: 0 22px;
    border-radius: 999px;
    background: var(--wppmf-btn-bg);
    color: var(--wppmf-btn-text) !important;
    text-decoration: none !important;
    font-weight: 700;
}
.wppmf-has-gallery { overflow: visible; }
.wppmf-image-only {
    width: auto;
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 32px);
    overflow: visible;
    background: transparent !important;
    box-shadow: none;
    border-radius: 0;
}
.wppmf-image-only .wppmf-close {
    top: -32px;
    right: 0;
}
.wppmf-gallery {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: transparent;
    border-radius: 14px;
    box-shadow: 0 12px 36px rgba(2, 6, 23, 0.14);
}
.wppmf-image-only .wppmf-gallery {
    width: auto;
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 32px);
    border-radius: 14px;
    line-height: 0;
}
.wppmf-slide {
    display: block;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    position: absolute;
    inset: 0;
    transition: opacity .34s ease, visibility .34s ease;
}
.wppmf-slide.is-active {
    opacity: 1;
    visibility: visible;
    position: relative;
}
.wppmf-image-link { display: block; text-decoration: none !important; line-height: 0; }
.wppmf-image-mode-contain .wppmf-image {
    width: 100%;
    height: auto;
    max-height: min(86vh, 820px);
    object-fit: contain;
    background: transparent;
}
.wppmf-image-only.wppmf-image-mode-contain .wppmf-image {
    width: auto;
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 32px);
    object-fit: contain;
    border-radius: 14px;
}
.wppmf-image-mode-cover .wppmf-image {
    width: 100%;
    height: min(78vh, 760px);
    object-fit: cover;
}
.wppmf-image-only.wppmf-image-mode-cover .wppmf-image {
    width: min(var(--wppmf-width), calc(100vw - 32px));
    height: min(78vh, 760px);
    object-fit: cover;
    border-radius: 18px;
}
.wppmf-nav {
    position: absolute;
    top: 50%;
    z-index: 6;
    width: 30px;
    height: 54px;
    transform: translateY(-50%);
    border: 0;
    border-radius: 0;
    background: transparent;
    color: rgba(255,255,255,.82);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    box-shadow: none;
    opacity: 0;
    text-shadow: 0 1px 4px rgba(0,0,0,.35);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    transition: background .18s ease, transform .18s ease, opacity .18s ease;
    padding: 0 0 2px;
}
.wppmf-gallery:hover .wppmf-nav { opacity: .45; }
.wppmf-nav:hover { background: rgba(15,23,42,.08); transform: translateY(-50%) scale(1.02); opacity: .75; }
.wppmf-prev { left: 0; }
.wppmf-next { right: 0; }
.wppmf-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -16px;
    z-index: 6;
    display: flex;
    justify-content: center;
    gap: 6px;
    pointer-events: none;
}
.wppmf-image-only .wppmf-dots { bottom: -16px; }
.wppmf-dot {
    width: 6px;
    height: 6px;
    border: 0;
    border-radius: 999px;
    background: rgba(255,255,255,.50);
    cursor: pointer;
    padding: 0;
    pointer-events: auto;
    transition: width .2s ease, background .2s ease;
}
.wppmf-dot.is-active { width: 15px; background: rgba(255,255,255,.86); }
.wppmf-has-gallery .wppmf-body:empty { display: none; }
@media (max-width: 600px) {
    .wppmf-overlay { padding: 42px 14px 24px; }
    .wppmf-body { padding: 22px 18px; }
    .wppmf-pos-bottom_right,
    .wppmf-pos-bottom_left { margin: auto auto 0; }
    .wppmf-close,
    .wppmf-image-only .wppmf-close {
        width: 22px;
        height: 22px;
        top: -30px;
        right: 0;
        font-size: 15px;
        line-height: 20px;
        background: rgba(15,23,42,.30);
        color: #fff;
    }
    .wppmf-nav { display: none; }
    .wppmf-image-mode-contain .wppmf-image { max-height: 82vh; }
    .wppmf-image-mode-cover .wppmf-image { height: 74vh; }
    .wppmf-image-only.wppmf-image-mode-contain .wppmf-image,
    .wppmf-image-only .wppmf-gallery {
        max-width: calc(100vw - 28px);
        max-height: calc(100vh - 56px);
        border-radius: 12px;
    }
    .wppmf-image-only.wppmf-image-mode-cover .wppmf-image {
        width: calc(100vw - 28px);
        height: auto;
        max-height: calc(100vh - 56px);
        border-radius: 12px;
    }
    .wppmf-gallery { border-radius: 12px; }
    .wppmf-image-only .wppmf-dots,
    .wppmf-dots { bottom: -15px; }
    .wppmf-dot { width: 5px; height: 5px; }
    .wppmf-dot.is-active { width: 14px; }
}
