/* EMIS SweetAlert2 toast theme — matches app brand tokens in custom.css */

.emis-swal-toast-container {
    z-index: 10900 !important;
    padding: 0.75rem 1rem 0.75rem 0.5rem;
}

.emis-swal-toast {
    font-family: inherit;
    font-size: 0.9rem;
    line-height: 1.45;
    color: var(--emis-ink, #172033);
    background: var(--emis-surface, #fff) !important;
    border: 1px solid rgba(var(--emis-primary-rgb, 71, 59, 123), 0.12);
    border-radius: var(--emis-radius, 12px) !important;
    box-shadow: var(--emis-shadow-sm, 0 6px 18px rgba(15, 23, 42, 0.06)),
        0 16px 36px rgba(var(--emis-primary-rgb, 71, 59, 123), 0.14);
    padding: 0.85rem 1rem 0.85rem 0.75rem !important;
    min-width: 18rem;
    max-width: min(24rem, calc(100vw - 2rem));
    overflow: hidden;
}

.emis-swal-toast::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    border-radius: var(--emis-radius, 12px) 0 0 var(--emis-radius, 12px);
    background: var(--emis-toast-accent, var(--emis-primary, #473b7b));
}

.emis-swal-toast__title {
    font-size: 0.92rem !important;
    font-weight: 600 !important;
    color: var(--emis-ink, #172033) !important;
    margin: 0 !important;
    padding: 0 0.25rem 0 0.35rem !important;
}

.emis-swal-toast__message {
    font-size: 0.84rem;
    color: var(--emis-muted, #64748b);
    margin-top: 0.2rem;
}

.emis-swal-toast__icon {
    transform: scale(0.82);
    margin: 0 0.35rem 0 0.15rem !important;
    border-width: 2px !important;
}

.emis-swal-toast__close {
    color: var(--emis-muted, #64748b) !important;
    transition: color 0.15s ease, transform 0.15s ease;
}

.emis-swal-toast__close:hover {
    color: var(--emis-primary, #473b7b) !important;
    transform: scale(1.08);
}

.emis-swal-toast__progress {
    background: rgba(var(--emis-primary-rgb, 71, 59, 123), 0.18) !important;
}

.emis-swal-toast__progress.swal2-timer-progress-bar {
    background: var(--emis-toast-accent, var(--emis-accent, #30d2be)) !important;
}

/* Variant accents */
.emis-swal-toast--success {
    --emis-toast-accent: #0d9488;
}

.emis-swal-toast--success .swal2-success {
    border-color: rgba(13, 148, 136, 0.35);
}

.emis-swal-toast--success .swal2-success [class^='swal2-success-line'] {
    background-color: #0d9488;
}

.emis-swal-toast--success .swal2-success .swal2-success-ring {
    border-color: rgba(13, 148, 136, 0.28);
}

.emis-swal-toast--error {
    --emis-toast-accent: var(--emis-danger, #ff5370);
}

.emis-swal-toast--error .swal2-error {
    border-color: rgba(255, 83, 112, 0.35);
}

.emis-swal-toast--error .swal2-x-mark-line-left,
.emis-swal-toast--error .swal2-x-mark-line-right {
    background-color: var(--emis-danger, #ff5370);
}

.emis-swal-toast--warning {
    --emis-toast-accent: #d97706;
}

.emis-swal-toast--warning .swal2-warning {
    border-color: rgba(217, 119, 6, 0.35);
    color: #d97706;
}

.emis-swal-toast--info {
    --emis-toast-accent: #366ba0;
}

.emis-swal-toast--info .swal2-info {
    border-color: rgba(54, 107, 160, 0.35);
    color: #366ba0;
}

/* Entrance / exit animations */
@keyframes emisToastIn {
    from {
        opacity: 0;
        transform: translate3d(110%, 0, 0) scale(0.94);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
    }
}

@keyframes emisToastOut {
    from {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
    to {
        opacity: 0;
        transform: translate3d(110%, 0, 0);
    }
}

.emis-toast-show {
    animation: emisToastIn 0.38s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.emis-toast-hide {
    animation: emisToastOut 0.28s ease-in forwards;
}

@media (prefers-reduced-motion: reduce) {
    .emis-toast-show,
    .emis-toast-hide {
        animation: none;
    }
}
