/* Shared SweetAlert theme for every application layout. */
.swal2-container {
    --alert-accent: var(--primary, #1362fc);
    --alert-soft: #eef4ff;
    font-family: inherit;
}

.swal2-container.swal2-backdrop-show {
    background: rgba(15, 23, 42, .3);
}

.swal2-container .swal2-popup:not(.swal2-toast) {
    width: 340px;
    min-width: min(300px, calc(100vw - 32px));
    max-width: calc(100vw - 32px);
    padding: 22px 20px 20px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, .22);
    border-radius: 14px;
    background: #fff;
    color: #17243b;
    box-shadow: 0 10px 32px rgba(15, 23, 42, .14);
    font-family: inherit;
}

.swal2-popup:has(.swal2-success) { --alert-accent: #15803d; --alert-soft: #effaf3; }
.swal2-popup:has(.swal2-error) { --alert-accent: #dc2626; --alert-soft: #fff1f2; }
.swal2-popup:has(.swal2-warning) { --alert-accent: #b45309; --alert-soft: #fffbeb; }
.swal2-popup:has(.swal2-info),
.swal2-popup:has(.swal2-question) { --alert-accent: #1362fc; --alert-soft: #eef4ff; }

.swal2-container .swal2-popup:not(.swal2-toast) .swal2-icon {
    margin: 0 auto 16px;
    font-size: 10px;
    box-shadow: none;
}

.swal2-container .swal2-popup:not(.swal2-toast) .swal2-title {
    margin: 0;
    padding: 0 8px;
    color: #17243b;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.35;
    letter-spacing: normal;
    overflow-wrap: anywhere;
}

.swal2-container .swal2-popup:not(.swal2-toast) .swal2-html-container,
.swal2-container .swal2-popup:not(.swal2-toast) .swal2-content {
    margin: 10px 0 0;
    padding: 0;
    color: #64748b;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.swal2-container .swal2-popup:not(.swal2-toast) .swal2-actions {
    width: 100%;
    gap: 8px;
    margin: 18px auto 0;
    padding: 0;
}

/* Override inline library colors and the legacy Bootstrap button classes. */
.swal2-container .swal2-popup:not(.swal2-toast) .swal2-actions button:not(.swal2-loader) {
    min-height: 38px;
    min-width: 82px;
    margin: 0;
    padding: 9px 18px;
    border: 1px solid transparent !important;
    border-radius: 8px;
    background-image: none !important;
    font-family: inherit;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.4;
    transition: filter .15s ease;
}

.swal2-container .swal2-popup:not(.swal2-toast) button.swal2-confirm {
    background: var(--alert-accent) !important;
    color: #fff !important;
    box-shadow: none;
}

.swal2-container .swal2-popup:not(.swal2-toast) button.swal2-cancel,
.swal2-container .swal2-popup:not(.swal2-toast) button.swal2-deny {
    border-color: #e2e8f0 !important;
    background: #f1f5f9 !important;
    color: #475569 !important;
    box-shadow: none;
}

.swal2-container .swal2-actions button:not(:disabled):hover {
    filter: brightness(.96);
}

.swal2-container .swal2-popup:not(.swal2-toast) button.swal2-cancel:not(:disabled):hover,
.swal2-container .swal2-popup:not(.swal2-toast) button.swal2-deny:not(:disabled):hover {
    background: #475569 !important;
    color: #fff !important;
}

.swal2-container .swal2-popup .swal2-actions button:focus-visible,
.swal2-container .swal2-popup .swal2-close:focus-visible {
    outline: 3px solid var(--alert-accent);
    outline-offset: 4px;
}

.swal2-container .swal2-actions button:disabled { opacity: .55; cursor: wait; }
.swal2-container .swal2-close { color: #94a3b8; border-radius: 8px; }
.swal2-container .swal2-close:hover { color: #17243b; }
.swal2-container .swal2-footer { border-color: #e2e8f0; color: #64748b; font-size: 13px; }
.swal2-container .swal2-loader { border-color: var(--alert-accent) transparent; }

.swal2-container .swal2-input,
.swal2-container .swal2-textarea,
.swal2-container .swal2-select {
    max-width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    box-shadow: none;
    font-size: 14px;
}

.swal2-container .swal2-input:focus,
.swal2-container .swal2-textarea:focus,
.swal2-container .swal2-select:focus {
    border-color: var(--alert-accent);
    outline: 3px solid var(--alert-soft);
    box-shadow: none;
}

.swal2-container .swal2-popup.swal2-toast {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(15, 23, 42, .1);
    font-family: inherit;
}

@media (max-width: 480px) {
    .swal2-container .swal2-popup:not(.swal2-toast) { padding: 20px 18px 18px; border-radius: 14px; }
    .swal2-container .swal2-popup:not(.swal2-toast) .swal2-title { font-size: 16px; }
    .swal2-container .swal2-popup:not(.swal2-toast) .swal2-actions button:not(.swal2-loader) { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
    .swal2-container .swal2-popup,
    .swal2-container .swal2-icon,
    .swal2-container .swal2-icon *,
    .swal2-container .swal2-actions button {
        animation: none !important;
        transition: none !important;
    }
    .swal2-container .swal2-actions button:not(:disabled):hover { transform: none; }
}
