/**
 * Lightbox styles for single CPT media previews.
 */

.fe-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.88);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
    overflow: hidden;
    touch-action: none;
}
.fe-lightbox img {
    max-width: 92vw;
    max-height: 92vh;
    object-fit: contain;
    border-radius: var(--fe-radius-xs);
    box-shadow: 0 8px 40px rgba(0,0,0,.6);
    cursor: grab;
    transform-origin: center center;
    transition: none;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}
.fe-lightbox img.fe-lb-zoomed {
    max-width: none;
    max-height: none;
    cursor: grab;
}
.fe-lightbox img.fe-lb-dragging {
    cursor: grabbing;
}
.fe-lightbox__close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,.15);
    border: 0;
    border-radius: var(--fe-radius-pill);
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    transition: background 0.2s;
}
.fe-lightbox__close:hover { background: rgba(255,255,255,.3); }
.fe-lightbox__hint {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,.6);
    color: rgba(255,255,255,.7);
    font-size: 12px;
    padding: 6px 14px;
    border-radius: 999px;
    pointer-events: none;
    z-index: 10001;
    transition: opacity 0.3s;
}

.fe-lightbox__close svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
}

.fe-lightbox__close:focus-visible {
    outline: var(--fe-focus-ring-width) solid var(--fe-text-on-accent);
    outline-offset: var(--fe-focus-ring-offset);
}

.fe-lightbox__hint {
    max-width: min(90vw, 520px);
    text-align: center;
    font-weight: 600;
}

@media (max-width: 640px) {
    .fe-lightbox__close {
        top: 10px;
        right: 10px;
        width: 36px;
        height: 36px;
    }

    .fe-lightbox__hint {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .fe-lightbox__close {
        transition: none !important;
    }
}
