/* ══════════════════════════════════════════════
   UkayImageViewer — fullscreen zoomable image viewer
   Extends the generic UkayDialog (css/dialog.css)
   via the .ukay-image-viewer class.
   ══════════════════════════════════════════════ */

/* Make the dialog truly fullscreen and black for the viewer. */
.ukay-image-viewer {
    padding: 0;
}

.ukay-image-viewer .ukay-dialog__panel {
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
    background: #0b0b0b;
    padding: 0;
    overflow: hidden;
    box-shadow: none;
}

.ukay-image-viewer .ukay-dialog__body {
    width: 100%;
    height: 100%;
}

.ukay-image-viewer .ukay-dialog__close {
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    font-size: 1.7rem;
    background: rgba(0, 0, 0, 0.45);
}

/* Viewer layout */
.uiv {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.uiv__stage {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    touch-action: none;          /* we handle pinch/pan/swipe ourselves */
    cursor: grab;
}

.uiv__img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transform-origin: center center;
    will-change: transform;
    user-select: none;
    -webkit-user-drag: none;
}

.uiv__img.is-zoomed {
    cursor: grab;
}

.uiv__img.is-loading {
    opacity: 0.4;
}

/* Play button — shown only on the video slide */
.uiv__play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 76px;
    height: 76px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 1.8rem;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
    transition: background 0.2s ease, transform 0.1s ease;
}

.uiv__play i { margin-left: 4px; }
.uiv__play:hover { background: rgba(0, 0, 0, 0.72); }
.uiv__play:active { transform: translate(-50%, -50%) scale(0.92); }

.uiv--video-slide .uiv__play {
    display: flex;
}

/* Dim the poster a touch behind the play button. */
.uiv--video-slide .uiv__img {
    filter: brightness(0.82);
}

/* Prev / next — modern dark translucent controls for the dark backdrop */
.uiv__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 3;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
    transition: background 0.2s ease, transform 0.1s ease;
}

.uiv__nav:hover { background: rgba(0, 0, 0, 0.68); }
.uiv__nav:active { transform: translateY(-50%) scale(0.9); }
.uiv__nav--prev { left: 18px; }
.uiv__nav--next { right: 18px; }

/* Counter pill — bottom-right rounded chip (like the screenshot) */
.uiv__counter {
    position: absolute;
    right: 18px;
    bottom: 20px;
    z-index: 3;
    padding: 7px 16px;
    border-radius: 999px;
    background: rgba(60, 60, 60, 0.8);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

@media (max-width: 575.98px) {
    .uiv__nav {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    .uiv__nav--prev { left: 10px; }
    .uiv__nav--next { right: 10px; }
    .uiv__counter {
        right: 14px;
        bottom: 16px;
        font-size: 0.85rem;
        padding: 6px 14px;
    }
}
