/* Floating alerts — see wwwroot/js/toast.js */
.bma-toast-stack {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: min(380px, calc(100vw - 32px));
    pointer-events: none;
}

.bma-toast {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 38px 14px 14px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #E5E7EB;
    border-left: 4px solid var(--toast, #1A56DB);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16);
    font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: #1F2937;
    overflow: hidden;
    pointer-events: auto;
    opacity: 0;
    transform: translateX(24px);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.bma-toast.is-in { opacity: 1; transform: none; }
.bma-toast.is-out { opacity: 0; transform: translateX(24px); }

.bma-toast--success { --toast: #16A34A; }
.bma-toast--error { --toast: #DC2626; }
.bma-toast--warning { --toast: #D97706; }
.bma-toast--info { --toast: #1A56DB; }

.bma-toast-icon { width: 20px; height: 20px; flex-shrink: 0; color: var(--toast); margin-top: 1px; }
.bma-toast-text { flex: 1; min-width: 0; overflow-wrap: anywhere; white-space: pre-line; }

.bma-toast-close {
    position: absolute;
    top: 6px;
    right: 8px;
    width: 24px;
    height: 24px;
    border: 0;
    background: none;
    color: #94A3B8;
    font-size: 1.125rem;
    line-height: 1;
    cursor: pointer;
    border-radius: 6px;
}

.bma-toast-close:hover { color: #1F2937; background: #F1F5F9; }

.bma-toast-bar {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 3px;
    width: 100%;
    background: var(--toast);
    opacity: 0.35;
    transform-origin: left;
    animation: bma-toast-countdown linear forwards;
}

@keyframes bma-toast-countdown { from { transform: scaleX(1); } to { transform: scaleX(0); } }

@media (prefers-reduced-motion: reduce) {
    .bma-toast { transition: none; }
    .bma-toast-bar { animation: none; }
}
