/* ============================================================
   UniStudy · SweetAlert2 — Unified, refined, responsive styling
   Scope: every .swal2-container (ltr/rtl, center, backdrop-show,
          toast, modal, validation, inputs, actions, etc.)

   Selectors use `html body .swal2-*` so this theme applies
   site-wide (student front-end, auth, and admin dashboards)
   wherever SweetAlert2 is loaded. It's safe because every
   selector targets SweetAlert2-specific classes that cannot
   collide with unrelated UI.
   ============================================================ */

/* -------- 1) Design tokens -------- */
html body {
    /* Surfaces & borders */
    --uni-sw-surface: #ffffff;
    --uni-sw-surface-soft: #f8fafc;
    --uni-sw-surface-tint: #fbfdff;
    --uni-sw-border: #e6ebf2;
    --uni-sw-border-soft: #eef2f7;
    --uni-sw-divider: #f1f5f9;

    /* Ink (text) */
    --uni-sw-ink: #0f172a;
    --uni-sw-ink-soft: #334155;
    --uni-sw-ink-mute: #475569;
    --uni-sw-ink-faint: #94a3b8;

    /* Brand & status */
    --uni-sw-brand: #2563eb;
    --uni-sw-brand-strong: #1d4ed8;
    --uni-sw-brand-ring: rgba(37, 99, 235, 0.28);
    --uni-sw-accent: #0ea5e9;
    --uni-sw-ok: #059669;
    --uni-sw-warn: #d97706;
    --uni-sw-err: #dc2626;
    --uni-sw-err-strong: #b91c1c;

    /* Legacy aliases kept for backward compatibility with existing rules */
    --swal2-backdrop: rgba(15, 23, 42, 0.58);
    --swal2-width: min(34rem, calc(100vw - 2rem));
    --swal2-padding: 0;
    --swal2-border: 1px solid var(--uni-sw-border);
    --swal2-border-radius: 1rem;
    --swal2-background: var(--uni-sw-surface);
    --swal2-color: var(--uni-sw-ink-soft);
    --swal2-title-padding: 1.35rem 1.5rem 0.35rem;
    --swal2-html-container-padding: 0.5rem 1.5rem 1.35rem;
    --swal2-footer-padding: 0 1.5rem 1.25rem;
    --swal2-input-border: 1px solid #e2e8f0;
    --swal2-input-border-radius: 0.5rem;
    --swal2-outline: 0 0 0 3px var(--uni-sw-brand-ring);

    /* Motion */
    --uni-sw-ease: cubic-bezier(0.22, 0.61, 0.36, 1);

    /* Elevation */
    --uni-sw-shadow-modal:
        0 4px 8px -2px rgba(15, 23, 42, 0.08),
        0 28px 56px -12px rgba(15, 23, 42, 0.28),
        0 0 0 1px rgba(255, 255, 255, 0.55) inset;
    --uni-sw-shadow-toast:
        0 8px 22px -6px rgba(15, 23, 42, 0.18),
        0 0 0 1px rgba(226, 232, 240, 0.8) inset;
}

/* -------- 2) Container & backdrop -------- */
html body .swal2-container {
    padding: 1rem;
    z-index: 20000 !important;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

html body .swal2-container.swal2-backdrop-show {
    background: var(--swal2-backdrop);
    animation: uni-sw-backdrop-in 0.24s var(--uni-sw-ease) both;
}

/* Toast alerts: no full-page dimming or blur */
html body .swal2-container.swal2-backdrop-show:has(.swal2-toast) {
    background: transparent !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    animation: none;
}

html body .swal2-container.swal2-backdrop-hide {
    background: transparent;
    -webkit-backdrop-filter: blur(0);
    backdrop-filter: blur(0);
}

html body .swal2-container.swal2-center {
    align-items: center;
    justify-content: center;
}

html body .swal2-container.swal2-top,
html body .swal2-container.swal2-top-start,
html body .swal2-container.swal2-top-end {
    align-items: flex-start;
}

html body .swal2-container.swal2-bottom,
html body .swal2-container.swal2-bottom-start,
html body .swal2-container.swal2-bottom-end {
    align-items: flex-end;
}

/* -------- 3) Modal / popup -------- */
html body .swal2-popup.swal2-modal {
    position: relative;
    overflow: visible;
    padding: 0;
    margin: 0 auto;
    border-radius: var(--swal2-border-radius);
    border: var(--swal2-border);
    background: var(--swal2-background);
    box-shadow: var(--uni-sw-shadow-modal);
    font-family: inherit;
    max-width: var(--swal2-width);
    width: var(--swal2-width);
    transform-origin: center;
}

/* Gradient accent strip at the top */
html body .swal2-popup.swal2-modal::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    border-radius: var(--swal2-border-radius) var(--swal2-border-radius) 0 0;
    background: linear-gradient(
        90deg,
        var(--uni-sw-brand) 0%,
        #10b981 55%,
        var(--uni-sw-brand) 100%
    );
    opacity: 0.92;
    pointer-events: none;
    z-index: 10;
    overflow: hidden;
}

/* Icon-aware accent variants */
html body .swal2-popup:has(.swal2-icon.swal2-warning)::before {
    background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%);
}
html body .swal2-popup:has(.swal2-icon.swal2-error)::before {
    background: linear-gradient(90deg, #ef4444 0%, var(--uni-sw-err-strong) 100%);
}
html body .swal2-popup:has(.swal2-icon.swal2-success)::before {
    background: linear-gradient(90deg, #10b981 0%, var(--uni-sw-ok) 100%);
}
html body .swal2-popup:has(.swal2-icon.swal2-question)::before {
    background: linear-gradient(90deg, #64748b 0%, #334155 100%);
}

/* Subtle sheen below the accent stripe */
html body .swal2-popup.swal2-modal::after {
    content: "";
    position: absolute;
    inset: 4px 0 auto 0;
    height: 56px;
    background: linear-gradient(
        180deg,
        rgba(37, 99, 235, 0.035) 0%,
        rgba(37, 99, 235, 0) 100%
    );
    pointer-events: none;
    z-index: 0;
}

/* -------- 4) Show / hide animations -------- */
html body .swal2-popup.swal2-show {
    animation: uni-sw-pop-in 0.28s var(--uni-sw-ease) both;
}
html body .swal2-popup.swal2-hide {
    animation: uni-sw-pop-out 0.18s ease-in both;
}

@keyframes uni-sw-pop-in {
    0%   { opacity: 0; transform: translateY(6px) scale(0.96); }
    100% { opacity: 1; transform: translateY(0)   scale(1); }
}
@keyframes uni-sw-pop-out {
    0%   { opacity: 1; transform: translateY(0)   scale(1); }
    100% { opacity: 0; transform: translateY(4px) scale(0.98); }
}
@keyframes uni-sw-backdrop-in {
    0%   { background: rgba(15, 23, 42, 0); }
    100% { background: var(--swal2-backdrop); }
}

/* -------- 5) Title & html body -------- */
html body .swal2-title {
    font-size: clamp(1.05rem, 2.3vw, 1.3rem);
    font-weight: 800;
    color: var(--uni-sw-ink);
    letter-spacing: -0.01em;
    line-height: 1.4;
    padding: var(--swal2-title-padding);
    margin: 0;
    position: relative;
    z-index: 2;
}

html body .swal2-html-container {
    font-size: 0.9375rem;
    line-height: 1.75;
    color: var(--uni-sw-ink-mute);
    text-align: start;
    word-break: break-word;
    padding: var(--swal2-html-container-padding);
    margin: 0;
    position: relative;
    z-index: 2;
}

html body .swal2-html-container a {
    color: var(--uni-sw-brand);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 0.14em;
    text-decoration-thickness: 1px;
    transition: color 0.18s ease;
}

html body .swal2-html-container a:hover {
    color: var(--uni-sw-brand-strong);
}

html body .swal2-html-container ul,
html body .swal2-html-container ol {
    margin: 0.5rem 0;
    padding-inline-start: 1.25rem;
}

/* -------- 6) RTL handling -------- */
html body .swal2-rtl {
    direction: rtl;
}

html body .swal2-rtl .swal2-title,
html body .swal2-rtl .swal2-html-container {
    text-align: right;
}

html body .swal2-rtl .swal2-actions {
    flex-direction: row-reverse;
}

html body .swal2-rtl .swal2-close {
    right: auto;
    left: 0.35rem;
}

html body .swal2-rtl .swal2-popup.swal2-modal::before {
    background: linear-gradient(
        270deg,
        var(--uni-sw-brand) 0%,
        #10b981 55%,
        var(--uni-sw-brand) 100%
    );
}

/* -------- 7) Actions / buttons -------- */
html body .swal2-actions {
    margin: 0;
    padding: 0.15rem 1.35rem 1.35rem;
    gap: 0.65rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    position: relative;
    z-index: 2;
}

html body .swal2-actions:not(.swal2-loading) .swal2-styled {
    margin: 0;
}

html body .swal2-confirm,
html body .swal2-cancel,
html body .swal2-deny {
    border-radius: 0.7rem !important;
    font-weight: 700 !important;
    font-size: 0.9rem !important;
    padding: 0.6rem 1.35rem !important;
    min-height: 2.6rem;
    letter-spacing: 0.01em;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
    transition:
        transform 0.14s var(--uni-sw-ease),
        box-shadow 0.18s ease,
        filter 0.18s ease,
        background 0.2s ease;
}

html body .swal2-confirm {
    border: none !important;
    background: linear-gradient(165deg, var(--uni-sw-brand) 0%, var(--uni-sw-brand-strong) 100%) !important;
    color: #fff !important;
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.32) !important;
}

html body .swal2-confirm:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
}

html body .swal2-confirm:active {
    transform: translateY(0);
    filter: brightness(0.98);
}

html body .swal2-confirm:focus,
html body .swal2-confirm:focus-visible {
    outline: none !important;
    box-shadow:
        0 6px 16px rgba(37, 99, 235, 0.32),
        0 0 0 3px var(--uni-sw-brand-ring) !important;
}

html body .swal2-cancel {
    border: 1px solid #e2e8f0 !important;
    background: var(--uni-sw-surface-soft) !important;
    color: var(--uni-sw-ink-mute) !important;
}

html body .swal2-cancel:hover {
    background: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
    transform: translateY(-1px);
}

html body .swal2-cancel:focus,
html body .swal2-cancel:focus-visible {
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.3) !important;
}

html body .swal2-deny {
    border: none !important;
    background: linear-gradient(165deg, var(--uni-sw-err) 0%, var(--uni-sw-err-strong) 100%) !important;
    color: #fff !important;
    box-shadow: 0 6px 16px rgba(220, 38, 38, 0.28) !important;
}

html body .swal2-deny:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
}

/* Loading spinner (showLoaderOnConfirm) */
html body .swal2-loader {
    border-color: var(--uni-sw-brand) transparent var(--uni-sw-brand) transparent;
    width: 2.1rem;
    height: 2.1rem;
}

/* -------- 8) Icons (warning/error/success/info/question) -------- */
html body .swal2-icon {
    margin: 1.35rem auto 0.75rem;
    border-width: 0;          /* each icon variant handles its own ring via box-shadow */
    border-style: solid;
    border-color: transparent;
    position: relative;
    z-index: 2;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

/* No custom animation — let SweetAlert2 handle its own icon animations */

/* ── Warning icon ── */
html body .swal2-icon.swal2-warning {
    border-color: transparent;
    background: radial-gradient(circle, rgba(245,158,11,0.08) 60%, transparent 100%);
    box-shadow: 0 0 0 6px rgba(245,158,11,0.1), 0 0 0 12px rgba(245,158,11,0.05);
    color: var(--uni-sw-warn);
    width: 5rem;
    height: 5rem;
}
html body .swal2-icon.swal2-warning .swal2-icon-content {
    font-size: 2.75rem;
    font-weight: 900;
    line-height: 1;
    color: var(--uni-sw-warn);
}

/* ── Success icon — Font Awesome (RTL-safe; no CSS-drawn checkmark) ── */
html body .swal2-icon.uni-swal-fa-success {
    border: none;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.08) 60%, transparent 100%);
    box-shadow:
        0 0 0 6px rgba(16, 185, 129, 0.1),
        0 0 0 12px rgba(16, 185, 129, 0.05);
    color: var(--uni-sw-ok);
    width: 5rem;
    height: 5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    position: relative;
    overflow: visible;
    transition: none;
}

/* Animated ring (like default SweetAlert2 success border) */
html body .swal2-icon.uni-swal-fa-success::before {
    content: "";
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 3px solid rgba(16, 185, 129, 0.45);
    box-sizing: border-box;
    pointer-events: none;
}

html body .swal2-icon.uni-swal-fa-success.swal2-icon-show,
html body .swal2-popup.swal2-show .swal2-icon.uni-swal-fa-success {
    animation: uni-swal-fa-success-ring 0.55s var(--uni-sw-ease, cubic-bezier(0.22, 0.61, 0.36, 1)) both;
}

html body .swal2-icon.uni-swal-fa-success.swal2-icon-show::before,
html body .swal2-popup.swal2-show .swal2-icon.uni-swal-fa-success::before {
    animation: uni-swal-fa-success-border 0.65s var(--uni-sw-ease, cubic-bezier(0.22, 0.61, 0.36, 1)) both;
}

html body .swal2-icon.uni-swal-fa-success .uni-swal-fa-success__check {
    font-size: 2.35rem;
    color: var(--uni-sw-ok);
    line-height: 1;
    display: inline-block;
    transform-origin: center;
}

html body .swal2-icon.uni-swal-fa-success.swal2-icon-show .uni-swal-fa-success__check,
html body .swal2-popup.swal2-show .swal2-icon.uni-swal-fa-success .uni-swal-fa-success__check {
    animation: uni-swal-fa-success-check 0.5s 0.2s var(--uni-sw-ease, cubic-bezier(0.22, 0.61, 0.36, 1)) both;
}

@keyframes uni-swal-fa-success-ring {
    0%   { transform: scale(0.35); opacity: 0; }
    55%  { transform: scale(1.06); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes uni-swal-fa-success-border {
    0%   { transform: scale(0.75); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes uni-swal-fa-success-check {
    0%   { transform: scale(0) rotate(-14deg); opacity: 0; }
    65%  { transform: scale(1.12) rotate(0deg); opacity: 1; }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

/* Hide leftover SWAL2 line elements if any */
html body .swal2-icon.uni-swal-fa-success .swal2-success-line-tip,
html body .swal2-icon.uni-swal-fa-success .swal2-success-line-long,
html body .swal2-icon.uni-swal-fa-success [class^="swal2-success-circular-line"],
html body .swal2-icon.uni-swal-fa-success .swal2-success-fix,
html body .swal2-icon.uni-swal-fa-success .swal2-success-ring {
    display: none !important;
}

/* ── Error icon ── */
html body .swal2-icon.swal2-error {
    border-color: transparent;
    background: radial-gradient(circle, rgba(239,68,68,0.08) 60%, transparent 100%);
    box-shadow: 0 0 0 6px rgba(239,68,68,0.1), 0 0 0 12px rgba(239,68,68,0.05);
    color: var(--uni-sw-err);
    width: 5rem;
    height: 5rem;
}
html body .swal2-icon.swal2-error [class^="swal2-x-mark-line"] {
    background: linear-gradient(135deg, #ef4444, var(--uni-sw-err-strong));
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(239,68,68,0.3);
}

/* ── Info icon ── */
html body .swal2-icon.swal2-info {
    border-color: transparent;
    background: radial-gradient(circle, rgba(37,99,235,0.08) 60%, transparent 100%);
    box-shadow: 0 0 0 6px rgba(37,99,235,0.1), 0 0 0 12px rgba(37,99,235,0.05);
    color: var(--uni-sw-brand);
    width: 5rem;
    height: 5rem;
}
html body .swal2-icon.swal2-info .swal2-icon-content {
    font-size: 2.6rem;
    font-weight: 900;
    color: var(--uni-sw-brand);
}

/* ── Question icon ── */
html body .swal2-icon.swal2-question {
    border-color: transparent;
    background: radial-gradient(circle, rgba(100,116,139,0.08) 60%, transparent 100%);
    box-shadow: 0 0 0 6px rgba(100,116,139,0.1), 0 0 0 12px rgba(100,116,139,0.05);
    color: #475569;
    width: 5rem;
    height: 5rem;
}
html body .swal2-icon.swal2-question .swal2-icon-content {
    font-size: 2.6rem;
    font-weight: 900;
    color: #475569;
}

/* -------- 9) Close button -------- */
html body .swal2-close {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 999px;
    font-size: 1.5rem;
    line-height: 2.25rem;
    color: var(--uni-sw-ink-faint);
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 3;
}

html body .swal2-close:hover {
    color: var(--uni-sw-ink);
    background: rgba(241, 245, 249, 0.95);
    transform: rotate(90deg);
}

html body .swal2-close:focus,
html body .swal2-close:focus-visible {
    outline: none !important;
    box-shadow: 0 0 0 3px var(--uni-sw-brand-ring) !important;
}

/* -------- 10) Inputs, select, textarea -------- */
html body .swal2-input,
html body .swal2-textarea,
html body .swal2-select,
html body .swal2-file {
    border: var(--swal2-input-border) !important;
    border-radius: var(--swal2-input-border-radius) !important;
    box-shadow: none !important;
    font-size: 0.95rem !important;
    color: var(--uni-sw-ink) !important;
    background: #fff !important;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

html body .swal2-input:focus,
html body .swal2-textarea:focus,
html body .swal2-select:focus,
html body .swal2-file:focus {
    outline: none !important;
    border-color: var(--uni-sw-brand) !important;
    box-shadow: var(--swal2-outline) !important;
}

/* -------- 11) Footer / validation / timer -------- */
html body .swal2-footer {
    border-top: 1px solid var(--uni-sw-divider);
    color: var(--uni-sw-ink-mute);
    font-size: 0.8125rem;
    padding: var(--swal2-footer-padding);
    position: relative;
    z-index: 2;
}

html body .swal2-validation-message {
    border-radius: 0.5rem;
    background: #fef2f2;
    color: var(--uni-sw-err-strong);
    border: 1px solid rgba(220, 38, 38, 0.22);
    margin: 0 1.25rem 1rem;
    padding: 0.5rem 0.75rem;
}

html body .swal2-timer-progress-bar {
    background: linear-gradient(90deg, var(--uni-sw-brand), #10b981);
    height: 3px;
}

/* Legacy compat — old swal() text wrapper */
html body .swal-text {
    text-align: center;
    font-size: inherit;
    line-height: inherit;
    color: inherit;
}

/* -------- 12) Toast variant -------- */
html body .swal2-popup.swal2-toast {
    padding: 0.75rem 1rem;
    border-radius: 0.8rem;
    border: 1px solid var(--uni-sw-border);
    background: #fff;
    box-shadow: var(--uni-sw-shadow-toast);
    min-width: 18rem;
    max-width: min(26rem, calc(100vw - 1.5rem));
    font-family: inherit;
}

html body .swal2-popup.swal2-toast::before {
    display: none;
}

html body .swal2-popup.swal2-toast .swal2-title {
    font-size: 0.95rem;
    font-weight: 700;
    padding: 0;
}

html body .swal2-popup.swal2-toast .swal2-html-container {
    font-size: 0.875rem;
    padding: 0.15rem 0 0;
}

html body .swal2-popup.swal2-toast .swal2-icon {
    margin: 0 0.6rem 0 0;
    width: 1.8rem;
    min-width: 1.8rem;
    height: 1.8rem;
    border-width: 0;
    box-shadow: none;
    background: none;
    font-size: 1rem;
}

html body .swal2-rtl .swal2-popup.swal2-toast .swal2-icon {
    margin: 0 0 0 0.6rem;
}

html body .swal2-popup.swal2-toast .swal2-timer-progress-bar-container {
    height: 3px;
}

/* -------- 13) Responsive -------- */
@media (max-width: 767.98px) {
    html body .swal2-container {
        padding: 0.85rem;
    }

    html body .swal2-popup.swal2-modal {
        border-radius: 0.95rem;
    }

    html body .swal2-title {
        padding: 1.2rem 1.2rem 0.3rem;
        font-size: 1.08rem;
    }

    html body .swal2-html-container {
        padding: 0.4rem 1.2rem 1.15rem;
        font-size: 0.9rem;
    }

    html body .swal2-actions {
        padding: 0.1rem 1.1rem 1.2rem;
    }
}

@media (max-width: 575.98px) {
    html body .swal2-container {
        padding: 0.65rem;
    }

    html body .swal2-popup.swal2-modal {
        border-radius: 0.85rem;
        width: 100%;
        max-width: 100%;
    }

    html body .swal2-title {
        padding: 1.1rem 1.1rem 0.25rem;
        font-size: 1.02rem;
    }

    html body .swal2-html-container {
        padding: 0.3rem 1.1rem 1.05rem !important;
    }

    html body .swal2-actions {
        flex-direction: column-reverse;
        width: 100%;
        padding: 0 1rem 1.1rem;
    }

    html body .swal2-rtl .swal2-actions {
        flex-direction: column-reverse;
    }

    html body .swal2-confirm,
    html body .swal2-cancel,
    html body .swal2-deny {
        width: 100% !important;
    }

    html body .swal2-icon {
        margin: 1rem auto 0.5rem;
        width: 4rem;
        height: 4rem;
    }

    html body .swal2-close {
        top: 0.3rem;
        right: 0.3rem;
        width: 2rem;
        height: 2rem;
        line-height: 2rem;
        font-size: 1.35rem;
    }

    html body .swal2-rtl .swal2-close {
        left: 0.3rem;
    }

    html body .swal2-popup.swal2-toast {
        min-width: 0;
        width: calc(100vw - 1.3rem);
    }
}

/* -------- 14) Rating pending-approval popup -------- */
.uni-swal-pending-popup {
    padding: 2.5rem 2rem 2rem !important;
    border-radius: 20px !important;
    max-width: 420px !important;
}

/* Hourglass icon wrapper */
.uni-swal-pending-icon {
    width: 88px;
    height: 88px;
    margin: 0 auto 1.25rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, rgba(16,185,129,0.12) 55%, transparent 100%);
    box-shadow:
        0 0 0 8px rgba(16,185,129,0.08),
        0 0 0 18px rgba(16,185,129,0.04),
        0 8px 24px rgba(16,185,129,0.18);
    animation: uni-swal-pulse 2s ease-in-out infinite;
}
.uni-swal-pending-icon i {
    font-size: 2.4rem;
    color: #10b981;
    animation: uni-swal-spin 2.4s ease-in-out infinite;
}

@keyframes uni-swal-pulse {
    0%, 100% { box-shadow: 0 0 0 8px rgba(16,185,129,0.08), 0 0 0 18px rgba(16,185,129,0.04), 0 8px 24px rgba(16,185,129,0.18); }
    50%       { box-shadow: 0 0 0 12px rgba(16,185,129,0.12), 0 0 0 24px rgba(16,185,129,0.06), 0 12px 32px rgba(16,185,129,0.24); }
}
@keyframes uni-swal-spin {
    0%   { transform: rotate(0deg)   scale(1); }
    45%  { transform: rotate(180deg) scale(1.05); }
    55%  { transform: rotate(180deg) scale(1.05); }
    100% { transform: rotate(360deg) scale(1); }
}

/* Title */
.uni-swal-pending-title {
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    background: linear-gradient(135deg, #10b981, #059669);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 0.65rem !important;
    line-height: 1.4;
}

/* Sub-text */
.uni-swal-pending-sub {
    font-size: 0.88rem !important;
    color: #64748b !important;
    line-height: 1.65 !important;
    margin: 0 !important;
    padding: 0.65rem 0.5rem 0;
    border-top: 1px solid rgba(16,185,129,0.15);
}

/* Confirm button */
.uni-swal-pending-btn {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 0.55rem 2rem !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 14px rgba(16,185,129,0.35) !important;
    transition: transform 0.15s, box-shadow 0.15s !important;
    margin-top: 1rem !important;
}
.uni-swal-pending-btn:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 18px rgba(16,185,129,0.45) !important;
}

/* -------- 14) Reduced motion -------- */
@media (prefers-reduced-motion: reduce) {
    html body .swal2-container,
    html body .swal2-popup,
    html body .swal2-confirm,
    html body .swal2-cancel,
    html body .swal2-deny,
    html body .swal2-close,
    html body .swal2-icon.uni-swal-fa-success,
    html body .swal2-icon.uni-swal-fa-success::before,
    html body .swal2-icon.uni-swal-fa-success .uni-swal-fa-success__check {
        transition: none !important;
        animation: none !important;
    }
}
