html:has(.po-foto-popup[open]) {
    overflow: hidden;
}
dialog.po-foto-popup {
    box-sizing: border-box;
    position: fixed;
    inset: 0;
    margin: auto;
    width: fit-content;
    max-width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
    padding: 50px 8px 8px;
    border: 0;
    border-radius: 8px;
    background: #19211a;
    color: white;
    text-align: center;
}
dialog.po-foto-popup::backdrop {
    background: rgba(12, 18, 13, .88);
}
.po-foto-popup img:not([hidden]) {
    display: block;
    width: auto;
    height: auto;
    max-width: calc(100vw - 40px);
    max-height: calc(100vh - 82px);
    max-height: calc(100dvh - 82px);
    margin: 0 auto;
    object-fit: contain;
}
.po-foto-popup .po-foto-popup-close {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 5px;
    background: #354d26;
    color: white;
    font: 28px/1 system-ui, sans-serif;
    cursor: pointer;
}
.po-foto-popup-close:focus-visible {
    outline: 2px solid white;
    outline-offset: -4px;
}
.po-foto-popup p {
    margin: .5rem 1rem;
    color: inherit;
}
.po-foto-popup [hidden] {
    display: none !important;
}
