.zb-toasts {
    position: fixed;
    z-index: 9999;
    top: max(12px, env(safe-area-inset-top, 0px));
    right: max(12px, env(safe-area-inset-right, 0px));
    left: max(12px, env(safe-area-inset-left, 0px));
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    pointer-events: none;
}

.zb-toast {
    position: relative;
    width: 100%;
    max-width: 390px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: white;
    box-shadow: 0 16px 36px rgba(15, 23, 42, .16);
    pointer-events: auto;
    animation: zb-in .22s ease-out both;
}

.zb-toast-body {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px;
}

.zb-toast-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 12px;
    font-size: 20px;
    font-weight: 800;
}

.zb-toast-copy {
    flex: 1;
    min-width: 0;
}

.zb-toast-title {
    margin: 0;
    color: #0f172a;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.45;
}

.zb-toast-message {
    margin: 5px 0 0;
    color: #475569;
    font-size: 13px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.zb-toast-link {
    display: inline-block;
    margin-top: 9px;
    color: #dc2626;
    font-size: 12px;
    font-weight: 800;
    text-decoration: underline;
}

.zb-toast-close {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #64748b;
    font-size: 22px;
    cursor: pointer;
}

.zb-toast-close:hover {
    color: #0f172a;
    background: #f1f5f9;
}

.zb-toast-progress {
    height: 3px;
    transform-origin: left;
    animation: zb-progress 6s linear forwards;
}

@keyframes zb-progress {
    to {
        transform: scaleX(0);
    }
}

.zb-toast.zb-is-leaving {
    animation: zb-out .18s ease-in forwards;
}


@keyframes zb-in {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes zb-out {
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

@media (min-width: 640px) {
    .zb-toasts {
        left: auto;
        width: min(390px, calc(100vw - 40px));
    }
}

@media (prefers-reduced-motion: reduce) {
    .zb-toast,
    .zb-toast.zb-is-leaving,
    .zb-toast-progress {
        animation: none;
    }
}