/* ================================================================
   SweetAlert2 — Responsive: evita desbordamiento en cualquier
   dispositivo sin romper la posición de toasts ni popups.
   ================================================================ */

/* El contenedor ocupa todo el viewport; padding lateral
   garantiza que el popup nunca toque los bordes. */
.swal2-container {
    padding: 0.5rem !important;
    box-sizing: border-box !important;
}

/* El popup nunca superará el 92% del ancho de la pantalla */
.swal2-popup {
    width: auto !important;
    max-width: min(30em, 92vw) !important;
    box-sizing: border-box !important;
}

/* ── Ajustes extra para pantallas muy pequeñas (< 480 px) ── */
@media (max-width: 480px) {
    .swal2-popup {
        max-width: 92vw !important;
        padding: 1em 0.85em !important;
    }

    .swal2-title {
        font-size: 1.1em !important;
        padding: 0.3em 0 0 !important;
    }

    .swal2-html-container,
    .swal2-content {
        font-size: 0.88em !important;
        line-height: 1.4 !important;
    }

    /* Botones se apilan si no caben en una línea */
    .swal2-actions {
        flex-wrap: wrap !important;
        gap: 0.4rem !important;
        justify-content: center !important;
    }

    .swal2-confirm,
    .swal2-cancel,
    .swal2-deny {
        min-width: 4.5em !important;
        font-size: 0.88em !important;
        padding: 0.5em 1em !important;
    }
}

/* ── Toasts: solo ajuste de margen para que no queden pegados al borde ── */
.swal2-container.swal2-top-end,
.swal2-container.swal2-top-right,
.swal2-container.swal2-bottom-end,
.swal2-container.swal2-bottom-right {
    padding: 0.5rem !important;
}

.swal2-container.swal2-top-end .swal2-popup,
.swal2-container.swal2-top-right .swal2-popup,
.swal2-container.swal2-bottom-end .swal2-popup,
.swal2-container.swal2-bottom-right .swal2-popup {
    max-width: min(24em, 88vw) !important;
}
