/**
 * OM Starter — Lightbox Styling
 *
 * @package OM_Starter
 * @since 1.0.0
 */

/* ──────────────────────────────────────────────
   Overlay
   ────────────────────────────────────────────── */

.om-lb {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.92);
    opacity: 0;
    transition: opacity 0.25s ease;
    user-select: none;
    -webkit-user-select: none;
}

.om-lb.is-visible {
    opacity: 1;
}

/* ──────────────────────────────────────────────
   Image
   ────────────────────────────────────────────── */

.om-lb__img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
    transition: opacity 0.2s ease;
}

/* ──────────────────────────────────────────────
   Close button
   ────────────────────────────────────────────── */

.om-lb__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
    transition: background-color 0.2s;
}

.om-lb__close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.om-lb__close:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* ──────────────────────────────────────────────
   Navigation arrows
   ────────────────────────────────────────────── */

.om-lb__nav {
    position: absolute;
    top: 50%;
    z-index: 2;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
    transition: background-color 0.2s;
}

.om-lb__nav:hover {
    background: rgba(255, 255, 255, 0.2);
}

.om-lb__nav:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.om-lb__nav--prev {
    left: 1rem;
}

.om-lb__nav--next {
    right: 1rem;
}

/* ──────────────────────────────────────────────
   Counter
   ────────────────────────────────────────────── */

.om-lb__counter {
    position: absolute;
    bottom: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    background: rgba(0, 0, 0, 0.5);
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    letter-spacing: 0.5px;
    pointer-events: none;
}

/* ──────────────────────────────────────────────
   Responsive
   ────────────────────────────────────────────── */

@media (max-width: 600px) {
    .om-lb__img {
        max-width: 96vw;
        max-height: 80vh;
    }

    .om-lb__nav {
        width: 40px;
        height: 40px;
    }

    .om-lb__nav--prev {
        left: 0.5rem;
    }

    .om-lb__nav--next {
        right: 0.5rem;
    }
}

/* ──────────────────────────────────────────────
   Reduced motion
   ────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
    .om-lb,
    .om-lb__img {
        transition: none;
    }
}
