/* shadcn/ui Sonner-style toasts (vanilla) */

.toast-viewport {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 9999;
    display: flex;
    max-height: 100vh;
    width: 100%;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    pointer-events: none;
}

@media (min-width: 640px) {
    .toast-viewport {
        max-width: 420px;
    }
}

.toast {
    pointer-events: auto;
    position: relative;
    display: flex;
    width: 100%;
    align-items: flex-start;
    gap: 0.75rem;
    overflow: hidden;
    border-radius: 0.5rem;
    border: 1px solid hsl(0 0% 14.9%);
    background: hsl(0 0% 9%);
    padding: 1rem 1rem 1rem 1.125rem;
    color: hsl(0 0% 98%);
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.35), 0 2px 4px -2px rgb(0 0 0 / 0.25);
    animation: toast-slide-in 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.toast--exiting {
    animation: toast-slide-out 0.2s ease-in forwards;
}

.toast--success {
    border-color: hsl(142 76% 22%);
    background: hsl(142 76% 6%);
}

.toast--destructive {
    border-color: hsl(0 62% 30%);
    background: hsl(0 62% 6%);
    color: hsl(0 86% 97%);
}

.toast__icon {
    flex-shrink: 0;
    margin-top: 0.125rem;
    color: hsl(0 0% 63.9%);
}

.toast--success .toast__icon {
    color: hsl(142 71% 45%);
}

.toast--destructive .toast__icon {
    color: hsl(0 84% 60%);
}

.toast__body {
    flex: 1;
    display: grid;
    gap: 0.25rem;
    padding-right: 1.5rem;
}

.toast__title {
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.01em;
}

.toast__description {
    font-size: 0.8125rem;
    line-height: 1.4;
    color: hsl(0 0% 63.9%);
}

.toast--destructive .toast__description {
    color: hsl(0 0% 75%);
}

.toast__close {
    position: absolute;
    right: 0.5rem;
    top: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    padding: 0;
    border: none;
    border-radius: 0.25rem;
    background: transparent;
    color: hsl(0 0% 63.9%);
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.15s, background 0.15s;
}

.toast__close:hover {
    opacity: 1;
    background: hsl(0 0% 14.9%);
}

.toast__close svg {
    width: 0.875rem;
    height: 0.875rem;
}

@keyframes toast-slide-in {
    from {
        transform: translateX(calc(100% + 1rem));
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toast-slide-out {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(calc(100% + 1rem));
        opacity: 0;
    }
}
