/* Scoped styles: no changes to the active WordPress theme. */
.leos-ip-overlay[hidden] { display: none !important; }
.leos-ip-overlay {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    display: grid;
    place-items: center;
    padding: 16px;
    padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
    box-sizing: border-box;
    background: rgba(0,0,0,var(--leos-ip-backdrop-alpha, .70));
    -webkit-overflow-scrolling: touch;
    overflow-y: auto;
    isolation: isolate;
}
.leos-ip-overlay *, .leos-ip-overlay *::before, .leos-ip-overlay *::after { box-sizing: border-box; }
.leos-ip-dialog {
    position: relative;
    display: block;
    width: min(var(--leos-ip-desktop-width, 650px), 100%);
    max-width: 100%;
    margin: auto;
    border-radius: var(--leos-ip-radius, 12px);
    background: #fff;
    box-shadow: 0 18px 65px rgba(0,0,0,.35);
    opacity: 1;
    overflow: visible;
    animation: leos-ip-appear .2s ease-out both;
}
.leos-ip-clickarea {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: var(--leos-ip-desktop-height, auto);
    max-height: calc(100dvh - 36px);
    overflow: hidden;
    border-radius: inherit;
    background: #fff;
    cursor: pointer;
    text-decoration: none;
    outline-offset: 4px;
}
.leos-ip-image {
    display: block;
    flex: 0 0 auto;
    width: 100%;
    height: auto;
    max-height: calc(100vh - 36px);
    max-height: calc(100dvh - 36px);
    object-fit: contain;
    border: 0;
    margin: 0;
    padding: 0;
    border-radius: inherit;
}
.leos-ip-clickarea[style*="height"] .leos-ip-image { object-fit: contain; }
.leos-ip-dialog.leos-ip-desktop-fixed .leos-ip-image { height: 100%; }
.leos-ip-close {
    position: absolute;
    top: 9px;
    right: 9px;
    z-index: 2;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0,0,0,.12);
    border-radius: 999px;
    color: #171717;
    background: rgba(255,255,255,.96);
    box-shadow: 0 2px 12px rgba(0,0,0,.22);
    cursor: pointer;
    font-family: inherit;
    font-size: 32px;
    font-weight: 400;
    line-height: 1;
    padding: 0 0 4px;
    text-decoration: none;
    transition: background .15s ease, transform .15s ease;
    -webkit-appearance: none;
    appearance: none;
}
.leos-ip-close:hover { background: #fff; transform: scale(1.04); }
.leos-ip-close:focus-visible { outline: 3px solid #1473e6; outline-offset: 3px; }
body.leos-ip-body-lock { overflow: hidden !important; }
@media (max-width: 767px) {
    .leos-ip-dialog { width: min(var(--leos-ip-mobile-width, 340px), 100%); }
    .leos-ip-clickarea { height: var(--leos-ip-mobile-height, auto); }
    .leos-ip-dialog.leos-ip-desktop-fixed .leos-ip-image { height: auto; }
    .leos-ip-dialog.leos-ip-mobile-fixed .leos-ip-image { height: 100%; }
    .leos-ip-close { width: 40px; height: 40px; top: 7px; right: 7px; }
}
@keyframes leos-ip-appear { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@media (prefers-reduced-motion: reduce) { .leos-ip-dialog { animation: none; } .leos-ip-close { transition: none; } }
