.aura-toast-stack {
    position: fixed;
    z-index: 20000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: min(390px, calc(100vw - 32px));
    max-height: calc(100vh - 36px);
    overflow-x: hidden;
    overflow-y: auto;
    padding: 2px;
    pointer-events: none;
    scrollbar-width: thin;
}

.aura-toast-stack--top-left,
.aura-toast-stack--bottom-left { align-items: flex-start; }
.aura-toast-stack--top-right,
.aura-toast-stack--bottom-right { align-items: flex-end; }
.aura-toast-stack--top-center,
.aura-toast-stack--bottom-center { align-items: center; }
.aura-toast-stack--bottom-left,
.aura-toast-stack--bottom-right,
.aura-toast-stack--bottom-center { flex-direction: column-reverse; }

.aura-toast {
    --toast-accent: var(--brand-primary-dark, #255b83);
    --toast-tint: var(--brand-surface-bg, #e8f2fa);
    --toast-line: rgba(var(--brand-primary-rgb, 53, 128, 187), .2);
    position: relative;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) 30px;
    align-items: start;
    gap: 12px;
    width: 100%;
    overflow: hidden;
    padding: 14px 13px 18px;
    border: 1px solid var(--toast-line);
    border-radius: 14px;
    color: #24364b;
    background: #fff;
    box-shadow: 0 14px 38px rgba(15, 41, 61, .16), 0 3px 10px rgba(15, 41, 61, .07);
    opacity: 0;
    transform: translate3d(12px, -6px, 0) scale(.985);
    transition: opacity .2s ease, transform .24s cubic-bezier(.2, .8, .2, 1);
    pointer-events: auto;
}

.aura-toast.is-visible { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
.aura-toast.is-leaving { opacity: 0; transform: translate3d(8px, -4px, 0) scale(.985); }
.aura-toast--success { --toast-accent: #16805d; --toast-tint: #edf8f3; --toast-line: #d1eade; }
.aura-toast--error { --toast-accent: #bd3e4b; --toast-tint: #fff1f1; --toast-line: #f0d4d6; }
.aura-toast--warning { --toast-accent: #a86c16; --toast-tint: #fff7e8; --toast-line: #f0e1bf; }
.aura-toast--info { --toast-accent: var(--brand-primary-dark, #255b83); --toast-tint: var(--brand-surface-bg, #e8f2fa); --toast-line: rgba(var(--brand-primary-rgb, 53, 128, 187), .2); }

.aura-toast__icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    color: var(--toast-accent);
    background: var(--toast-tint);
    font-size: 15px;
}

.aura-toast__content { min-width: 0; padding-top: 1px; }
.aura-toast__title { display: block; margin: 0 0 3px; color: #1f3044; font-size: 13px; font-weight: 750; line-height: 1.3; }
.aura-toast__message { margin: 0; overflow-wrap: anywhere; color: #637286; font-size: 12px; line-height: 1.45; }
.aura-toast__message:empty { display: none; }
.aura-toast__close {
    width: 29px;
    height: 29px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 8px;
    color: #8793a2;
    background: transparent;
    font-size: 12px;
    cursor: pointer;
    transition: color .15s ease, background .15s ease;
}
.aura-toast__close:hover { color: #334155; background: #f0f3f6; }
.aura-toast__close:focus-visible { outline: 2px solid var(--brand-primary); outline-offset: 2px; }
.aura-toast__progress { position: absolute; right: 0; bottom: 0; left: 0; height: 3px; width: 100%; background: var(--toast-accent); opacity: .55; transition-property: width; transition-timing-function: linear; }

@media (max-width: 575.98px) {
    .aura-toast-stack { width: calc(100vw - 24px); max-height: calc(100vh - 24px); }
    .aura-toast-stack--top-left,
    .aura-toast-stack--top-right,
    .aura-toast-stack--bottom-left,
    .aura-toast-stack--bottom-right { right: 12px !important; left: 12px !important; align-items: stretch; transform: none !important; }
    .aura-toast__message { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
    .aura-toast,
    .aura-toast__close,
    .aura-toast__progress { transition-duration: .01ms !important; }
}
