/* Image stage shared by options A and B. */
.main {
    position: relative;
    height: 100%;
    width: 100%;
}

.image__container {
    display: none;
    z-index: 5;
    width: calc(100% - var(--offset) * 2);
    height: calc(100% - var(--offset) * 2);
    border-radius: var(--radius-lg);

    background-color: var(--color-white-transparent);
    backdrop-filter: var(--blur-soft);
    border: var(--border-md);
    padding: 16px;
}

.image__container canvas {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: inherit;
    overflow: hidden;
}

.image__container--visible {
    display: flex;
    justify-content: center;
    align-items: center;
}

/*
 * Placeholder while an image is being decoded and analysed: a slow shimmer
 * across the empty stage, so the wait reads as work rather than a dead page.
 */
.image__container--loading {
    background-image: linear-gradient(
        100deg,
        transparent 30%,
        var(--color-white) 50%,
        transparent 70%
    );
    background-size: 220% 100%;
    animation: stage-shimmer 1.8s linear infinite;
}

@keyframes stage-shimmer {
    from {
        background-position: 180% 0;
    }
    to {
        background-position: -80% 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .image__container--loading {
        animation: none;
    }
}
