.image-lightbox-root {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0, 16, 24, 0.72);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    cursor: pointer;
    box-sizing: border-box;
}

@media (prefers-reduced-motion: no-preference) {
    .image-lightbox-root {
        animation: image-lightbox-fade-in 0.2s ease-out;
    }
}

@keyframes image-lightbox-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.image-lightbox-panel {
    position: relative;
    max-width: min(96vw, 1400px);
    max-height: min(92vh, 1200px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    cursor: default;
}

/* Quadrado (avatar): usa o menor entre largura e altura da viewport para crescer de verdade */
.image-lightbox-img {
    max-width: min(92vw, 88vh, 1200px);
    max-height: min(92vw, 88vh, 1200px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
    background: rgba(255, 255, 255, 0.06);
}

.image-lightbox-caption {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--ark-branco, #fff);
    text-align: center;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    max-width: 100%;
    word-break: break-word;
}

.image-lightbox-close {
    position: absolute;
    top: -8px;
    right: -8px;
    z-index: 1;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    color: var(--ark-primaria, #001018);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
    transition: background 0.15s ease, transform 0.15s ease;
}

.image-lightbox-close:hover {
    background: #fff;
    transform: scale(1.05);
}

.image-lightbox-close:focus-visible {
    outline: 2px solid var(--ark-branco, #fff);
    outline-offset: 2px;
}

@media (max-width: 768px) {
    .image-lightbox-root {
        padding: 16px;
    }

    .image-lightbox-close {
        top: -4px;
        right: -4px;
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
}
