/**
 * Frontend SweetAlert2 (desktop + mobile).
 * Admin panel uses public/admin/admin-modals.css instead — scoped with :not(.admin-body).
 */

body:not(.admin-body) .swal2-container {
    z-index: 10050 !important;
}

body:not(.admin-body) .swal2-container.swal2-backdrop-show {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

body:not(.admin-body) .swal2-popup {
    font-family: 'Quicksand', 'Plus Jakarta Sans', system-ui, sans-serif;
}

body:not(.admin-body) .swal2-actions {
    flex-wrap: wrap;
    gap: 0.5rem;
}

@media (max-width: 575.98px) {
    body:not(.admin-body) .swal2-container {
        padding: 0.75rem;
        padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
    }

    body:not(.admin-body) .swal2-popup {
        width: calc(100vw - 1.5rem) !important;
        max-width: 100% !important;
        margin: 0 auto !important;
    }

    body:not(.admin-body) .swal2-styled {
        min-height: 44px;
        flex: 1 1 auto;
    }

    body:not(.admin-body) .swal2-actions:not(.swal2-loading) {
        width: 100%;
        flex-direction: column-reverse;
    }

    body:not(.admin-body) .swal2-actions:not(.swal2-loading) .swal2-styled {
        width: 100% !important;
        margin: 0 !important;
    }
}

@media (max-width: 991.98px) {
    body:not(.admin-body) .swal2-container {
        padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
    }
}

/* Dark mode — replaces legacy .sweet-alert rules from SWAL v1 */
html[data-bs-theme="dark"] body:not(.admin-body) .swal2-popup {
    background: #2f2f2f !important;
    color: #fff !important;
}

html[data-bs-theme="dark"] body:not(.admin-body) .swal2-title {
    color: #fff !important;
}

html[data-bs-theme="dark"] body:not(.admin-body) .swal2-html-container {
    color: rgba(255, 255, 255, 0.88) !important;
}

html[data-bs-theme="dark"] body:not(.admin-body) .swal2-icon.swal2-success .swal2-success-fix,
html[data-bs-theme="dark"] body:not(.admin-body) .swal2-icon.swal2-success [class^='swal2-success-circular-line'] {
    background-color: #2f2f2f !important;
}

html[data-bs-theme="dark"] body:not(.admin-body) .swal2-input,
html[data-bs-theme="dark"] body:not(.admin-body) .swal2-textarea,
html[data-bs-theme="dark"] body:not(.admin-body) .swal2-select {
    background: #303030 !important;
    color: #fff !important;
    border-color: #444 !important;
}
