.upo-toast-stack {
    position: fixed;
    top: 24px;
    right: 24px;
    display: grid;
    gap: 12px;
    z-index: 12000;
    pointer-events: none;
}

.upo-toast {
    min-width: min(420px, calc(100vw - 32px));
    max-width: min(460px, calc(100vw - 32px));
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 16px;
    background: #ffffff;
    color: #18191c;
    border: 1px solid rgba(24, 25, 28, 0.08);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.14);
    pointer-events: auto;
    opacity: 0;
    transform: translateY(-10px) scale(0.98);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.upo-toast.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.upo-toast.is-leaving {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
}

.upo-toast__icon {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.upo-toast__body {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.upo-toast__title {
    font-size: 0.88rem;
    font-weight: 700;
    color: #18191c;
}

.upo-toast__message {
    font-size: 0.98rem;
    line-height: 1.45;
    color: #18191c;
    word-break: break-word;
}

.upo-toast__close {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: none;
    background: transparent;
    color: #767f8c;
    display: grid;
    place-items: center;
    cursor: pointer;
}

.upo-toast__close:hover {
    background: rgba(24, 25, 28, 0.06);
    color: #18191c;
}

.upo-toast--success .upo-toast__icon {
    background: #ecfdf3;
    color: #0b8f42;
}

.upo-toast--error .upo-toast__icon {
    background: #fef2f2;
    color: #dc2626;
}

.upo-toast--warning .upo-toast__icon {
    background: #fff7e8;
    color: #b26a00;
}

.upo-toast--info .upo-toast__icon {
    background: #eef4ff;
    color: #1d4ed8;
}

@media (max-width: 640px) {
    .upo-toast-stack {
        left: 16px;
        right: 16px;
        top: 16px;
    }

    .upo-toast {
        min-width: 100%;
        max-width: 100%;
    }
}
