/* SweetAlert2 (v5.3) skin for SIPAK. Load after plugins/sweetalert2.min.css.
   Self-contained: the fallbacks let it work on pages that do not load tokens.css (login, register).
   Callers pass confirmButtonColor/cancelButtonColor as inline styles, so the button colours
   are overridden with !important and picked from the dialog type instead. */

.swal2-container.swal2-in {
    background-color: rgba(15, 23, 42, .55);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}

.swal2-modal {
    --sw-accent: var(--brand-600, #4f46e5);
    --sw-accent-dark: var(--brand-700, #4338ca);
    --sw-ink: var(--ink, #0f172a);
    --sw-muted: var(--muted, #475569);
    max-width: calc(100vw - 24px);
    padding: 28px 28px 24px !important;
    font-family: var(--font, 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif);
    color: var(--sw-ink);
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 30px 70px -20px rgba(15, 23, 42, .5);
}

/* Type decides the accent: error red, success green, warning that asks a question = destructive red */
.swal2-modal:has(.swal2-icon.swal2-error[style*="block"]) {
    --sw-accent: #dc2626;
    --sw-accent-dark: #b91c1c;
}

.swal2-modal:has(.swal2-icon.swal2-success[style*="block"]) {
    --sw-accent: #15803d;
    --sw-accent-dark: #166534;
}

.swal2-modal:has(.swal2-icon.swal2-warning[style*="block"]):has(.swal2-cancel[style*="inline"]) {
    --sw-accent: #dc2626;
    --sw-accent-dark: #b91c1c;
}

.swal2-modal:has(.swal2-icon.swal2-warning[style*="block"]):not(:has(.swal2-cancel[style*="inline"])) {
    --sw-accent: #b45309;
    --sw-accent-dark: #92400e;
}

/* ---------- Icons: same animated markup, softer colours + a tinted halo ---------- */
.swal2-icon {
    margin: 12px auto 26px;
    overflow: hidden;
    /* clips the white masks of the success animation to the circle so the halo stays clean */
}

.swal2-icon.swal2-error {
    border-color: #fecaca;
    box-shadow: 0 0 0 10px #fef2f2;
}

.swal2-icon.swal2-error .line {
    background-color: #dc2626;
}

.swal2-icon.swal2-success {
    border-color: #bbf7d0;
    box-shadow: 0 0 0 10px #f0fdf4;
}

.swal2-icon.swal2-success .line {
    background-color: #16a34a;
}

.swal2-icon.swal2-success .placeholder {
    border-color: rgba(187, 247, 208, .6);
}

.swal2-icon.swal2-warning,
.swal2-icon.swal2-info,
.swal2-icon.swal2-question {
    font-family: var(--font, 'Plus Jakarta Sans', sans-serif);
    font-weight: 800;
}

.swal2-icon.swal2-warning {
    color: #d97706;
    border-color: #fde68a;
    box-shadow: 0 0 0 10px #fffbeb;
}

.swal2-icon.swal2-info {
    color: #0284c7;
    border-color: #bae6fd;
    box-shadow: 0 0 0 10px #f0f9ff;
}

.swal2-icon.swal2-question {
    color: var(--brand-600, #4f46e5);
    border-color: var(--brand-200, #c7d2fe);
    box-shadow: 0 0 0 10px var(--brand-50, #eef2ff);
}

/* ---------- Text ---------- */
.swal2-modal h2 {
    margin: 0 0 8px;
    font-size: 21px;
    font-weight: 800;
    line-height: 1.35;
    letter-spacing: -.01em;
    color: var(--sw-ink);
}

.swal2-modal .swal2-content {
    font-size: 14.5px;
    font-weight: 400;
    line-height: 1.6;
    color: var(--sw-muted);
}

.swal2-modal .swal2-content strong,
.swal2-modal .swal2-content b {
    color: var(--sw-ink);
}

.swal2-modal .swal2-spacer {
    margin: 12px 0 !important;
}

.swal2-modal .swal2-close {
    top: 12px;
    right: 12px;
    width: 34px;
    height: 34px;
    font: 400 24px/32px var(--font, sans-serif);
    text-align: center;
    color: #94a3b8;
    border-radius: 50%;
    transition: color .15s ease, background-color .15s ease;
}

.swal2-modal .swal2-close:hover {
    color: var(--sw-ink);
    background: #f1f5f9;
}

/* ---------- Buttons ---------- */
.swal2-modal .swal2-styled:not(.swal2-loading) {
    min-width: 110px;
    min-height: 46px;
    margin: 4px 6px;
    padding: 0 24px;
    font-family: inherit;
    font-size: 14.5px;
    font-weight: 700;
    border-radius: 12px;
    transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.swal2-modal .swal2-confirm.swal2-styled:not(.swal2-loading) {
    color: #fff !important;
    background-color: var(--sw-accent) !important;
}

.swal2-modal .swal2-confirm.swal2-styled:not(.swal2-loading):hover {
    background-color: var(--sw-accent-dark) !important;
}

.swal2-modal .swal2-cancel.swal2-styled:not(.swal2-loading) {
    color: #334155 !important;
    background-color: #fff !important;
    border: 1.5px solid #cbd5e1;
}

.swal2-modal .swal2-cancel.swal2-styled:not(.swal2-loading):hover {
    background-color: #f1f5f9 !important;
    border-color: #94a3b8;
}

.swal2-modal .swal2-styled:focus {
    outline: 0;
    box-shadow: 0 0 0 3px var(--focus, rgba(79, 70, 229, .28)) !important;
}

/* ---------- Inputs (same box as .form-control) ---------- */
.swal2-modal .swal2-input,
.swal2-modal .swal2-textarea,
.swal2-modal .swal2-file {
    border: 1.5px solid var(--field-border, #7b8aa0);
    border-radius: 10px;
    box-shadow: none;
    font-family: inherit;
    font-size: 14.5px;
    color: var(--sw-ink);
}

.swal2-modal .swal2-input {
    height: 46px;
}

.swal2-modal .swal2-input:focus,
.swal2-modal .swal2-textarea:focus,
.swal2-modal .swal2-file:focus {
    border: 1.5px solid var(--brand-600, #4f46e5);
    box-shadow: 0 0 0 3px var(--focus, rgba(79, 70, 229, .28));
}

.swal2-modal .swal2-input::placeholder,
.swal2-modal .swal2-textarea::placeholder {
    color: #94a3b8;
}

.swal2-modal .swal2-validationerror {
    margin: 12px 0 0;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #b91c1c;
    background: #fef2f2;
    border-radius: 10px;
}

.swal2-modal .swal2-validationerror::before {
    background-color: #dc2626;
}

@media (max-width: 480px) {
    .swal2-modal {
        padding: 22px 18px 18px !important;
    }

    .swal2-modal .swal2-styled:not(.swal2-loading) {
        width: 100%;
        margin: 8px 0 0;
    }
}

@media (prefers-reduced-motion: reduce) {

    .swal2-show,
    .swal2-hide {
        animation-duration: .01s;
    }
}
