/* VISUALIZADOR-PALCO: início */
.sv-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: grid;
    place-items: center;
    padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right))
        max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
    background: rgba(11, 29, 58, 0.62);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .36s cubic-bezier(.22, .75, .25, 1), visibility 0s linear .36s;
}

.sv-overlay[hidden] {
    display: none;
}

.sv-overlay.sv-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity .36s cubic-bezier(.22, .75, .25, 1), visibility 0s;
}

.sv-overlay.sv-closing {
    opacity: 0;
    visibility: visible;
    pointer-events: none;
}

.sv-frame {
    position: relative;
    display: inline-grid;
    width: fit-content;
    height: fit-content;
    max-width: 90vw;
    max-height: 68vh;
    place-items: center;
    overflow: visible;
    border: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
    transform: scale(.92);
    transition: transform .35s cubic-bezier(.22, .75, .25, 1);
    will-change: transform;
}

.sv-foto {
    display: block;
    width: auto;
    height: auto;
    max-width: min(90vw, 760px);
    max-height: min(68vh, 640px);
    overflow: hidden;
    border: 1px solid rgba(231, 220, 207, .35);
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
    object-fit: contain;
}

.sv-open .sv-frame {
    transform: scale(1);
}

.sv-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 1;
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border: 1px solid rgba(231, 220, 207, .65);
    border-radius: 50%;
    background: rgba(11, 29, 58, .7);
    color: #F4EEE8;
    cursor: pointer;
    font: 300 1.8rem/1 'DM Sans', sans-serif;
    transition: transform .25s cubic-bezier(.22, .75, .25, 1);
}

.sv-close:focus-visible {
    outline: 2px solid rgba(231, 220, 207, .95);
    outline-offset: 3px;
}

@media (hover: hover) and (pointer: fine) {
    .sv-close:hover {
        transform: scale(1.05);
        background: rgba(11, 29, 58, .9);
    }
}

@media (max-width: 768px) {
    .sv-frame,
    .sv-foto {
        max-width: 88vw;
        max-height: 66vh;
    }

    .sv-close {
        top: 12px;
        right: 12px;
        width: 48px;
        height: 48px;
    }
}

@supports (height: 100dvh) {
    .sv-frame,
    .sv-foto {
        max-height: min(68dvh, 640px);
    }

    @media (max-width: 768px) {
        .sv-frame,
        .sv-foto {
            max-height: min(66dvh, calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 24px));
        }
    }
}

@media (prefers-reduced-motion: reduce) {
    .sv-overlay,
    .sv-frame,
    .sv-close {
        transition-duration: .12s;
    }

    .sv-frame {
        transform: none;
        will-change: auto;
    }

    .sv-open .sv-frame {
        transform: none;
    }
}
/* VISUALIZADOR-PALCO: fim */
