/* Toast container (top-right) */
#toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 9999;
    pointer-events: none;
    /* allow clicks through gaps */
}

/* Individual toast */
.toast {
    min-width: 220px;
    max-width: 360px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.9rem;
    border-radius: 8px;
    box-shadow: 0 6px 16px rgba(10, 10, 10, 0.12);
    color: #fff;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
    font-size: 14px;
    pointer-events: auto;
    /* allow clicking inside toast */
    transform-origin: top right;
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
    transition: opacity 220ms ease, transform 220ms cubic-bezier(.2, .9, .3, 1);
}

.toast.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.toast .ico {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    flex-shrink: 0;
    font-weight: 700;
}

.toast .content {
    flex: 1;
    line-height: 1.1;
}

.toast .close-btn {
    background: transparent;
    border: none;
    color: inherit;
    font-size: 16px;
    cursor: pointer;
    padding: 4px;
    margin-left: 6px;
}

/* Types */
.toast.success {
    background: linear-gradient(90deg, #2e7d32, #1b5e20);
}

.toast.error {
    background: linear-gradient(90deg, #c62828, #8e0000);
}

.toast.info {
    background: linear-gradient(90deg, #1565c0, #0d47a1);
}

.toast.warn {
    background: linear-gradient(90deg, #f57f17, #ef6c00);
}

/* small accessibility tweak for paused toasts (hover) */
.toast[aria-hidden="true"] {
    pointer-events: none;
    opacity: 0;
    transform: translateY(-6px) scale(.98);
}