/* Click-to-zoom for images inside post content. */

.article-entry img {
    cursor: zoom-in;
}

.lightbox[hidden] {
    display: none;
}

.lightbox {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0, 0, 0, 0.85);
    opacity: 0;
    transition: opacity 0.18s ease;
}

.lightbox.is-open {
    opacity: 1;
}

.lightbox img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    cursor: zoom-out;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: 8px;
    right: 16px;
    padding: 0 8px;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 40px;
    line-height: 1.2;
    cursor: pointer;
    opacity: 0.7;
}

.lightbox-close:hover,
.lightbox-close:focus {
    opacity: 1;
}

@media (max-width: 600px) {
    .lightbox {
        padding: 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .lightbox {
        transition: none;
    }
}
