:root {
    --sj-alert-glass: rgba(255, 255, 255, .86);
    --sj-alert-border: rgba(255, 255, 255, .8);
    --sj-alert-ink: #202634;
    --sj-alert-muted: #747d8e;
    --sj-alert-primary: #a71930;
}

.swal2-container.sj-alert-container {
    padding: 22px;
    background: rgba(20, 24, 34, .36) !important;
    backdrop-filter: blur(15px) saturate(145%);
    -webkit-backdrop-filter: blur(15px) saturate(145%);
}

.swal2-popup.sj-alert-popup {
    width: min(92vw, 440px);
    padding: 31px 30px 27px;
    overflow: hidden;
    color: var(--sj-alert-ink);
    background:
        radial-gradient(circle at 50% -12%, rgba(167, 25, 48, .11), transparent 38%),
        linear-gradient(145deg, rgba(255, 255, 255, .95), var(--sj-alert-glass));
    border: 1px solid var(--sj-alert-border);
    border-radius: 30px;
    box-shadow: 0 30px 90px rgba(22, 27, 39, .22), 0 8px 26px rgba(22, 27, 39, .09), inset 0 1px 0 rgba(255, 255, 255, .95);
    font-family: inherit;
    -webkit-font-smoothing: antialiased;
}

.swal2-popup.sj-alert-popup::before {
    position: absolute;
    inset: 0;
    content: '';
    background: linear-gradient(125deg, rgba(255, 255, 255, .4), transparent 34%);
    pointer-events: none;
}

.sj-alert-popup .sj-alert-title {
    position: relative;
    padding: 0;
    color: var(--sj-alert-ink);
    font-size: clamp(20px, 4.4vw, 24px);
    font-weight: 850;
    line-height: 1.35;
    letter-spacing: -.35px;
}

.sj-alert-popup .sj-alert-content {
    position: relative;
    margin: 8px 0 0;
    padding: 0;
    color: var(--sj-alert-muted);
    font-size: 15px;
    line-height: 1.7;
}

.sj-alert-message { display: block; }
.sj-validation-summary { text-align: left; }
.sj-validation-summary > p { margin: 0 0 12px; color: #555e6e; text-align: center; font-size: 15px; }
.sj-validation-summary > p strong { color: #a71930; }
.sj-validation-summary ul { display: grid; max-height: min(38vh, 270px); gap: 7px; margin: 0; padding: 4px 2px; overflow-y: auto; list-style: none; }
.sj-validation-summary li { position: relative; padding: 11px 12px 11px 36px; border: 1px solid rgba(195,62,85,.1); border-radius: 13px; color: #5c4d52; background: rgba(195,62,85,.045); font-size: 14px; line-height: 1.55; }
.sj-validation-summary li::before { position: absolute; top: 11px; left: 13px; color: #c33e55; content: '!'; font-weight: 850; }
.sj-validation-summary > small { display: block; margin-top: 13px; color: #747d8e; text-align: center; font-size: 12px; line-height: 1.55; }
.sj-alert-note {
    display: inline-flex;
    margin-top: 17px;
    align-items: center;
    gap: 7px;
    padding: 8px 12px;
    color: #6e7583;
    background: rgba(239, 241, 245, .8);
    border: 1px solid rgba(224, 227, 233, .75);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 650;
}
.sj-alert-note i { color: #c08324; font-size: 12px; }

.sj-alert-popup .sj-alert-icon {
    position: relative;
    width: 5em;
    height: 5em;
    margin: 0 auto 19px;
    border-width: .25em;
    font-size: 13.2px;
    line-height: 5em;
    filter: drop-shadow(0 12px 18px rgba(34, 40, 53, .1));
}

.sj-alert-popup .swal2-success { color: #299064; border-color: rgba(41, 144, 100, .28); background: rgba(41, 144, 100, .08); }
.sj-alert-popup .swal2-error { color: #c33e55; border-color: rgba(195, 62, 85, .3); background: rgba(195, 62, 85, .07); }
.sj-alert-popup .swal2-question { color: #a77727; border-color: rgba(167, 119, 39, .3); background: rgba(167, 119, 39, .07); }

.sj-alert-popup .sj-alert-loader {
    width: 58px;
    height: 58px;
    margin: 4px auto 24px;
    border: 4px solid rgba(167, 25, 48, .12);
    border-top-color: var(--sj-alert-primary);
    border-right-color: #d6ad6d;
    filter: drop-shadow(0 10px 15px rgba(167, 25, 48, .12));
}

.sj-alert-popup .sj-alert-actions { position: relative; margin: 23px 0 0; gap: 9px; }
.sj-alert-popup .sj-alert-confirm,
.sj-alert-popup .sj-alert-cancel {
    min-width: 112px;
    min-height: 44px;
    padding: 10px 18px;
    border: 0;
    border-radius: 14px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 780;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.sj-alert-popup .sj-alert-confirm { color: white; background: linear-gradient(135deg, #901329, #b8223c); box-shadow: 0 10px 22px rgba(167, 25, 48, .2); }
.sj-alert-popup .sj-alert-cancel { color: #5f6878; background: rgba(235, 237, 241, .9); }
.sj-alert-popup .sj-alert-confirm:hover,
.sj-alert-popup .sj-alert-cancel:hover { transform: translateY(-2px); }
.sj-alert-popup .sj-alert-confirm:focus-visible,
.sj-alert-popup .sj-alert-cancel:focus-visible { outline: 0; box-shadow: 0 0 0 4px rgba(167, 25, 48, .13); }

.sj-alert-popup .sj-alert-timer { height: 3px; background: linear-gradient(90deg, #299064, #72c69f); }
.sj-alert-show { animation: sj-alert-bounce-in .5s cubic-bezier(.2, .9, .25, 1.18) both !important; }
.sj-alert-hide { animation: sj-alert-fade-out .2s ease both !important; }

.swal2-popup.sj-alert-image-popup {
    width: auto;
    max-width: calc(100vw - 28px);
    padding: 10px;
    overflow: visible;
    border-radius: 24px;
    background: rgba(255,255,255,.9);
}
.sj-alert-image-popup .swal2-image.sj-alert-image {
    display: block;
    width: auto;
    height: auto;
    max-width: min(92vw, 1200px);
    max-height: calc(100dvh - 54px);
    margin: 0;
    border-radius: 17px;
    object-fit: contain;
    box-shadow: 0 18px 55px rgba(20,24,34,.18);
}
.sj-alert-image-popup .sj-alert-image-close {
    top: -12px;
    right: -12px;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(255,255,255,.85);
    border-radius: 50%;
    color: #fff;
    background: rgba(30,34,43,.74);
    box-shadow: 0 8px 22px rgba(20,24,34,.24);
    backdrop-filter: blur(12px);
}
.sj-alert-image-popup .sj-alert-image-close:hover { color: #fff; background: rgba(167,25,48,.88); }

@keyframes sj-alert-bounce-in {
    0% { opacity: 0; transform: translateY(18px) scale(.92); }
    58% { opacity: 1; transform: translateY(-3px) scale(1.015); }
    100% { transform: translateY(0) scale(1); }
}
@keyframes sj-alert-fade-out { to { opacity: 0; transform: translateY(7px) scale(.98); } }

@media (max-width: 480px) {
    .swal2-popup.sj-alert-popup { padding: 28px 21px 23px; border-radius: 26px; }
    .sj-alert-popup .sj-alert-actions { width: 100%; }
    .sj-alert-popup .sj-alert-confirm,
    .sj-alert-popup .sj-alert-cancel { flex: 1; min-width: 0; }
    .swal2-popup.sj-alert-image-popup { padding: 7px; border-radius: 19px; }
    .sj-alert-image-popup .swal2-image.sj-alert-image { max-width: calc(100vw - 28px); max-height: calc(100dvh - 42px); border-radius: 13px; }
}

@media (prefers-reduced-motion: reduce) {
    .sj-alert-show, .sj-alert-hide { animation-duration: .01ms !important; }
    .sj-alert-popup .sj-alert-confirm,
    .sj-alert-popup .sj-alert-cancel { transition: none; }
}
