/* ==========================================================
   modal.css  |  Ventana emergente (formularios dentro de la página)
   La crea modal.js al tocar un enlace con el atributo [data-modal].
   Si el navegador no soporta <dialog>, el enlace abre en otra pestaña.
   ========================================================== */
.sa-modal {
    width: min(92vw, 560px);
    max-width: none;
    max-height: 94vh;
    margin: auto;
    padding: 0;
    overflow: auto;
    border: 0;
    border-radius: var(--sa-radius-lg);
    background: var(--sa-paper);
    color: var(--sa-text);
    box-shadow: 0 30px 80px rgb(var(--sa-deep-rgb) / .5);
}
.sa-modal::backdrop {
    background: rgb(var(--sa-deep-rgb) / .65);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.sa-modal__bar {
    display: flex;
    justify-content: flex-end;
    padding: 10px 12px 2px;
}
.sa-modal__close {
    position: relative;
    width: 40px;
    height: 40px;
    margin: 0;
    padding: 0;
    background: var(--sa-ink);
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    transition: background .25s var(--sa-ease);
}
.sa-modal__close::before,
.sa-modal__close::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 2px;
    margin: -1px 0 0 -8px;
    background: var(--sa-on-dark-strong);
    border-radius: 2px;
}
.sa-modal__close::before { transform: rotate(45deg); }
.sa-modal__close::after { transform: rotate(-45deg); }
.sa-modal__close:hover { background: var(--sa-bronze); }

.sa-modal__body iframe {
    display: block;
    width: 100%;
    border: 0;
}

/* Mientras la ventana está abierta, la página de fondo no se desplaza */
.sa-modal-open { overflow: hidden !important; }

@media (prefers-reduced-motion: reduce) {
    .sa-modal__close { transition: none; }
}