.ch-lightbox-figure {
    position: relative;
}

.ch-lightbox-figure::after {
    content: "Click to enlarge";
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.01em;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.18s ease, transform 0.18s ease;
    pointer-events: none;
}

.ch-lightbox-figure:hover::after,
.ch-lightbox-figure:focus-within::after {
    opacity: 1;
    transform: translateY(0);
}

.ch-lightbox-trigger {
    cursor: zoom-in;
}

.ch-lightbox-trigger:focus-visible {
    outline: 3px solid #2563eb;
    outline-offset: 3px;
}

.ch-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 32px;
    background: rgba(15, 23, 42, 0.78);
    backdrop-filter: blur(10px);
}

.ch-lightbox.is-open {
    display: flex;
}

.ch-lightbox__panel {
    position: relative;
    max-width: min(1180px, 96vw);
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ch-lightbox__image {
    max-width: 100%;
    max-height: calc(92vh - 88px);
    object-fit: contain;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

.ch-lightbox__caption {
    max-width: 980px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 14px;
    line-height: 1.5;
}

.ch-lightbox__close {
    position: absolute;
    top: -18px;
    right: -18px;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 999px;
    background: #fff;
    color: #0f172a;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
}

.ch-lightbox__close:focus-visible {
    outline: 3px solid #93c5fd;
    outline-offset: 3px;
}

body.ch-lightbox-open {
    overflow: hidden;
}

@media (max-width: 640px) {
    .ch-lightbox {
        padding: 16px;
    }

    .ch-lightbox__panel {
        max-width: 100%;
        max-height: 94vh;
    }

    .ch-lightbox__image {
        max-height: calc(94vh - 96px);
        border-radius: 10px;
    }

    .ch-lightbox__close {
        top: 8px;
        right: 8px;
    }

    .ch-lightbox-figure::after {
        opacity: 1;
        transform: none;
        top: 8px;
        right: 8px;
        font-size: 11px;
    }
}
