/* Toast notification stack — vanilla, zero dependencies */

.app-body {
    position: relative;
    min-height: 100vh;
}

.toast-stack {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: min(360px, calc(100% - 32px));
    pointer-events: none;
}

.toast-stack .toast-item {
    pointer-events: auto;
}

.toast-item {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-rows: auto auto;
    gap: 2px 12px;
    padding: 14px 14px 16px;
    background: rgba(26, 26, 26, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid #2a2424;
    border-radius: 10px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.45),
        0 2px 8px rgba(0, 0, 0, 0.25);
    color: #f5f0ef;
    overflow: hidden;
    max-height: 200px;
    opacity: 1;
    transform: translateX(0) scale(1);
    transition:
        opacity 300ms cubic-bezier(0.33, 0, 0.67, 0),
        transform 300ms cubic-bezier(0.33, 0, 0.67, 0),
        max-height 300ms cubic-bezier(0.33, 0, 0.67, 0),
        margin 300ms cubic-bezier(0.33, 0, 0.67, 0),
        padding 300ms cubic-bezier(0.33, 0, 0.67, 0);
}

.toast-item--enter {
    opacity: 0;
    transform: translateX(100%) scale(0.95);
}

.toast-item--enter-active {
    opacity: 1;
    transform: translateX(0) scale(1);
    transition:
        opacity 350ms cubic-bezier(0.21, 1.02, 0.73, 1),
        transform 350ms cubic-bezier(0.21, 1.02, 0.73, 1);
}

.toast-item--exit {
    opacity: 0;
    transform: translateX(60%) scale(0.9);
}

.toast-item--collapse {
    max-height: 0 !important;
    margin-top: -10px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    border-width: 0 !important;
    opacity: 0 !important;
}

.toast-item__icon {
    grid-row: 1 / 3;
    align-self: start;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    margin-top: 1px;
}

.toast-item__icon svg {
    width: 18px;
    height: 18px;
    display: block;
}

.toast-item__title {
    font-size: 13px;
    font-weight: 600;
    color: #f5f0ef;
    line-height: 1.35;
    padding-right: 20px;
}

.toast-item__message {
    grid-column: 2;
    font-size: 12px;
    color: #a89a96;
    line-height: 1.45;
    padding-right: 4px;
}

.toast-item__close {
    grid-column: 3;
    grid-row: 1;
    align-self: start;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    margin: -4px -4px 0 0;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #a89a96;
    cursor: pointer;
    transition: color 150ms ease, background 150ms ease;
}

.toast-item__close:hover {
    color: #f5f0ef;
    background: rgba(212, 175, 55, 0.1);
}

.toast-item__close svg {
    width: 14px;
    height: 14px;
}

.toast-item__progress {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.06);
}

.toast-item__progress-bar {
    height: 100%;
    width: 100%;
    transform: scaleX(1);
    transform-origin: left center;
    transition: transform linear;
}

.toast-item__progress-bar--paused {
    transition: none !important;
}

.toast-item--success .toast-item__progress-bar { background: #d4af37; }
.toast-item--error .toast-item__progress-bar { background: #8b2020; }
.toast-item--warning .toast-item__progress-bar { background: #d4af37; }
.toast-item--info .toast-item__progress-bar { background: #ca8a04; }

.toast-item--success .toast-item__icon svg { stroke: #d4af37; }
.toast-item--error .toast-item__icon svg { stroke: #8b2020; }
.toast-item--warning .toast-item__icon svg { stroke: #d4af37; }
.toast-item--info .toast-item__icon svg { stroke: #ca8a04; }

@media (prefers-reduced-motion: reduce) {
    .toast-item,
    .toast-item--enter,
    .toast-item--enter-active,
    .toast-item--exit,
    .toast-item--collapse {
        transition: none !important;
        transform: none !important;
    }

    .toast-item__progress-bar {
        transition: none !important;
    }
}
