/* ── Shared lightbox (dialog) styles ─────────── */
.lightbox {
    border: none;
    background: transparent;
    padding: 0;
    max-width: none;
    max-height: none;
    width: 100vw;
    height: 100vh;
    cursor: zoom-out;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.lightbox[open] {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}
.lightbox::backdrop {
    background: rgba(0, 0, 0, 0.88);
}
.lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
    transform: scale(0.95);
    transition:
        transform 0.2s ease,
        opacity 0.3s ease;
    cursor: default;
}
.lightbox[open] img {
    transform: scale(1);
}
.lightbox-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
    line-height: 1;
    z-index: 1;
}
.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
}
.lightbox-spinner {
    position: absolute;
    width: 36px;
    height: 36px;
    border: 3px solid rgba(255, 255, 255, 0.15);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
