/* atlas-lightbox-v1 */
#atlas-lightbox[hidden] {
    display: none !important;
}

#atlas-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, .97);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: zoom-out;
    padding: 12px;
}

#atlas-lightbox img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    pointer-events: none;
}

figure a {
    cursor: zoom-in;
}


/* ATLAS IMAGE VIEWER V2 */
figure > a {
    display: block;
    position: relative;
    cursor: zoom-in;
}

.atlas-zoom-label {
    position: absolute;
    right: 12px;
    bottom: 12px;
    padding: 8px 13px;
    background: rgba(20, 24, 29, .85);
    color: white;
    border-radius: 6px;
    font: 13px Arial, sans-serif;
    pointer-events: none;
}

.atlas-zoom-hint {
    margin-top: 8px;
    text-align: center;
    color: var(--muted);
    font: 13px Arial, sans-serif;
}

html[lang="ru"] .atlas-en { display: none; }
html[lang="en"] .atlas-ru { display: none; }

#atlas-lightbox {
    touch-action: none !important;
    overscroll-behavior: contain;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

#atlas-lightbox img {
    transform-origin: center center;
    will-change: auto;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

#atlas-lightbox.atlas-zoomed {
    cursor: grab;
}

#atlas-lightbox-close {
    position: absolute;
    z-index: 2;
    top: max(12px, env(safe-area-inset-top));
    right: max(12px, env(safe-area-inset-right));
    width: 44px;
    height: 44px;
    min-width: 44px;
    padding: 0;
    border: 1px solid rgba(255,255,255,.35);
    border-radius: 50%;
    background: rgba(0,0,0,.65);
    color: white;
    font: 30px Arial, sans-serif;
    cursor: pointer;
}

/* atlas-viewer-fix-v3 */
.atlas-zoom-label {
    opacity: 1;
    transition: opacity 0.6s ease;
}

.atlas-zoom-label-hidden {
    opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
    .atlas-zoom-label {
        transition: none;
    }
}

/* Zoom hint is only needed on touch devices */
@media (hover: hover) and (pointer: fine) {
    .atlas-zoom-label {
        display: none !important;
    }
}

/* BDRX MINIMAL ZOOM 2026 */
.atlas-zoom-label .atlas-ru,
.atlas-zoom-label .atlas-en {
    display: none !important;
}

@media (hover: hover) and (pointer: fine) {
    figure > a {
        cursor: zoom-in;
    }
    figure > a .atlas-zoom-label {
        display: block !important;
        right: 9px;
        bottom: 9px;
        padding: 3px 7px;
        font-size: 17px;
        line-height: 1.2;
    }
}

@media (hover: none) and (pointer: coarse) {
    figure > a .atlas-zoom-label {
        display: none !important;
    }
}

/* BDRX GALLERY ZOOM CURSOR */
.atlas-material-card,
.atlas-material-card img {
    cursor: zoom-in;
}


/* BDRX shared zoom labels */
.atlas-material-card { cursor: zoom-in; }
.atlas-material-card img { cursor: zoom-in; }
.atlas-material-card > .atlas-image-frame {
    position: relative;
    display: block;
    padding: 0;
}
.atlas-image-frame .atlas-zoom-label {
    position: absolute;
    right: 9px;
    bottom: 9px;
    pointer-events: none;
}
html body .atlas-material-card .atlas-zoom-label {
    display: block !important;
}
@media (hover: hover) and (pointer: fine) {
    html body .atlas-material-card .atlas-zoom-label {
        padding: 3px 7px;
        font-size: 17px;
    }
}
@media (hover: none) and (pointer: coarse) {
    html body figure > a .atlas-zoom-label,
    html body .atlas-material-card .atlas-zoom-label {
        display: block !important;
        padding: 6px 10px;
        font-size: 13px;
    }
    html[lang="ru"] body .atlas-zoom-label .atlas-ru,
    html[lang="en"] body .atlas-zoom-label .atlas-en {
        display: inline !important;
    }
    html[lang="ru"] body .atlas-zoom-label .atlas-en,
    html[lang="en"] body .atlas-zoom-label .atlas-ru {
        display: none !important;
    }
}
html body .atlas-zoom-label-hidden {
    opacity: 0 !important;
}
