/* Post body image lightbox — shared across all themes */

.article-text img:not(.post-image) {
    cursor: zoom-in;
}

.article-popup-image {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.92);
    cursor: zoom-out;
    -webkit-tap-highlight-color: transparent;
}

.article-popup-image.is-open {
    display: flex;
}

.article-popup-image-img {
    max-width: min(92vw, 1200px);
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.45);
    cursor: default;
    user-select: none;
}

.article-popup-image-close {
    position: absolute;
    top: 0.75rem;
    inset-inline-end: 0.75rem;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
}

.article-popup-image-close:hover,
.article-popup-image-close:focus-visible {
    background: rgba(255, 255, 255, 0.22);
    outline: none;
}

.article-popup-image-prev,
.article-popup-image-next {
    position: absolute;
    top: 50%;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
}

.article-popup-image-prev {
    inset-inline-start: 0.75rem;
}

.article-popup-image-next {
    inset-inline-end: 0.75rem;
}

.article-popup-image-prev:hover,
.article-popup-image-next:hover,
.article-popup-image-prev:focus-visible,
.article-popup-image-next:focus-visible {
    background: rgba(255, 255, 255, 0.22);
    outline: none;
}

.article-popup-image-counter {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.45);
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
    letter-spacing: 0.02em;
    pointer-events: none;
    user-select: none;
}

@media (max-width: 575px) {
    .article-popup-image {
        padding: 0.75rem;
    }

    .article-popup-image-prev,
    .article-popup-image-next {
        width: 2.4rem;
        height: 2.4rem;
        font-size: 1.1rem;
    }
}
