/* ============================================================
   Rhino Thai Boxing Gym — Gallery Lightbox
   Full-screen image viewer for WordPress gallery blocks.
   Dark overlay with navigation arrows, counter, and close button.
   ============================================================ */

/* Lock scroll when lightbox is open */
body.rhino-lightbox-open {
    overflow: hidden;
}

/* === Lightbox container === */
.rhino-lightbox {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 250ms ease, visibility 250ms ease;
}

.rhino-lightbox.is-open {
    opacity: 1;
    visibility: visible;
}

/* === Backdrop === */
.rhino-lightbox__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(6px);
    cursor: pointer;
}

/* === Image wrapper === */
.rhino-lightbox__img-wrap {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 90vw;
    max-height: 85vh;
    padding: 20px;
}

.rhino-lightbox__img {
    max-width: 100%;
    max-height: 82vh;
    border-radius: 8px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.6);
    object-fit: contain;
    transition: opacity 200ms ease;
    user-select: none;
    -webkit-user-drag: none;
}

/* === Close button === */
.rhino-lightbox__close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 10;
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 200ms, transform 200ms;
}

.rhino-lightbox__close:hover {
    background: var(--brand, #E59744);
    color: #000;
    transform: scale(1.08);
}

/* === Navigation arrows === */
.rhino-lightbox__prev,
.rhino-lightbox__next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 52px;
    height: 52px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 200ms, transform 200ms;
}

.rhino-lightbox__prev { left: 16px; }
.rhino-lightbox__next { right: 16px; }

.rhino-lightbox__prev:hover,
.rhino-lightbox__next:hover {
    background: var(--brand, #E59744);
    color: #000;
    transform: translateY(-50%) scale(1.08);
}

/* === Counter === */
.rhino-lightbox__counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.06em;
    background: rgba(0, 0, 0, 0.5);
    padding: 6px 16px;
    border-radius: 20px;
}

/* === Gallery images: hint they are clickable === */
.wp-block-gallery img,
.gallery img,
.blocks-gallery-grid img {
    transition: transform 200ms ease, box-shadow 200ms ease;
}

.wp-block-gallery img:hover,
.gallery img:hover,
.blocks-gallery-grid img:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 16px rgba(229, 151, 68, 0.3);
}

/* === Mobile adjustments === */
@media (max-width: 767px) {
    .rhino-lightbox__img-wrap {
        max-width: 96vw;
        max-height: 80vh;
        padding: 10px;
    }

    .rhino-lightbox__img {
        max-height: 75vh;
        border-radius: 4px;
    }

    .rhino-lightbox__prev,
    .rhino-lightbox__next {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .rhino-lightbox__prev { left: 8px; }
    .rhino-lightbox__next { right: 8px; }

    .rhino-lightbox__close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 24px;
    }
}
