@keyframes qe-toast-in {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes qe-toast-timer {
    from { width: 100%; }
    to { width: 0; }
}

.qe-toast-stack {
    position: fixed;
    right: 16px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 400px;
    max-width: calc(100vw - 32px);
    pointer-events: none;
}

.qe-toast {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 12px 16px 14px;
    border: 1px solid #e3e7ec;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(31, 41, 51, .08), 0 12px 28px rgba(31, 41, 51, .18);
    color: #1f2933;
    font-family: 'Source Sans Pro', 'Segoe UI', sans-serif;
    overflow: hidden;
    pointer-events: auto;
    animation: qe-toast-in .2s ease-out;
    transition: opacity .2s ease, transform .2s ease;
}

.qe-toast.qe-toast-leaving {
    opacity: 0;
    transform: translateX(16px);
}

.qe-toast-icon {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
}

.qe-toast-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-top: 1px;
}

.qe-toast-title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
}

.qe-toast-message {
    font-size: 14px;
    line-height: 1.4;
    color: #4b5967;
    overflow-wrap: anywhere;
}

.qe-toast-close {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    margin: -4px -2px 0 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #4b5967;
    font-size: 15px;
    cursor: pointer;
}

.qe-toast-close:hover,
.qe-toast-close:focus {
    background: #eef0f3;
    color: #1f2933;
    outline: none;
}

.qe-toast-track,
.qe-toast-bar {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 3px;
}

.qe-toast-track {
    right: 0;
    background: #eef0f3;
}

.qe-toast-bar {
    width: 100%;
}

.qe-toast-bar.qe-toast-bar-timed {
    animation-name: qe-toast-timer;
    animation-timing-function: linear;
    animation-fill-mode: forwards;
}

.qe-toast:hover .qe-toast-bar,
.qe-toast:focus-within .qe-toast-bar {
    animation-play-state: paused;
}

.qe-toast-success .qe-toast-icon { background: #e3f3ea; color: #1b6b44; }
.qe-toast-success .qe-toast-bar { background: #2f8f5f; }

.qe-toast-error .qe-toast-icon { background: #fdecec; color: #b42318; }
.qe-toast-error .qe-toast-bar { background: #b42318; }

.qe-toast-warning .qe-toast-icon { background: #fdefd9; color: #8a4b00; }
.qe-toast-warning .qe-toast-bar { background: #d98a1c; }

.qe-toast-info .qe-toast-icon { background: #e8eef9; color: #1d4f91; }
.qe-toast-info .qe-toast-bar { background: #2b5aa8; }

@media (prefers-reduced-motion: reduce) {
    .qe-toast {
        animation: none;
        transition: none;
    }
}
