:root {
    --wf-toast-success: #15803d;
    --wf-toast-success-soft: #f0fdf4;
    --wf-toast-error: #be123c;
    --wf-toast-error-soft: #fff1f2;
    --wf-toast-warning: #b45309;
    --wf-toast-warning-soft: #fffbeb;
    --wf-toast-info: #1d4ed8;
    --wf-toast-info-soft: #eff6ff;
}

.wf-toast-region {
    position: fixed;
    z-index: 100000;
    top: max(18px, env(safe-area-inset-top));
    right: max(18px, env(safe-area-inset-right));
    display: grid;
    width: min(380px, calc(100vw - 32px));
    gap: 10px;
    pointer-events: none;
}

.wf-toast {
    --wf-toast-accent: var(--wf-toast-info);
    --wf-toast-soft: var(--wf-toast-info-soft);
    position: relative;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) 28px;
    gap: 11px;
    align-items: start;
    min-height: 78px;
    padding: 14px 12px 14px 14px;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--wf-toast-accent) 25%, white);
    border-left: 4px solid var(--wf-toast-accent);
    border-radius: 13px;
    background: linear-gradient(135deg, #fff 40%, var(--wf-toast-soft));
    color: #17211d;
    box-shadow: 0 18px 42px rgba(15, 23, 42, .18), 0 3px 10px rgba(15, 23, 42, .08);
    font-family: inherit;
    pointer-events: auto;
    animation: wf-toast-enter .24s ease-out both;
}

.wf-toast--success { --wf-toast-accent: var(--wf-toast-success); --wf-toast-soft: var(--wf-toast-success-soft); }
.wf-toast--error { --wf-toast-accent: var(--wf-toast-error); --wf-toast-soft: var(--wf-toast-error-soft); }
.wf-toast--warning { --wf-toast-accent: var(--wf-toast-warning); --wf-toast-soft: var(--wf-toast-warning-soft); }
.wf-toast--info { --wf-toast-accent: var(--wf-toast-info); --wf-toast-soft: var(--wf-toast-info-soft); }

.wf-toast__icon {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 50%;
    background: var(--wf-toast-soft);
    color: var(--wf-toast-accent);
}

.wf-toast__icon svg,
.wf-toast__close svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.2;
}

.wf-toast__content { min-width: 0; padding-top: 1px; }
.wf-toast__title { display: block; color: var(--wf-toast-accent); font-size: 14px; font-weight: 800; line-height: 1.25; }
.wf-toast__message { display: block; margin-top: 4px; color: #4b5563; font-size: 12.5px; line-height: 1.4; overflow-wrap: anywhere; }
.wf-toast__action { display: inline-block; margin-top: 7px; color: var(--wf-toast-accent); font-size: 12px; font-weight: 800; text-decoration: underline; }

.wf-toast__close {
    display: grid;
    width: 28px;
    height: 28px;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #64748b;
    cursor: pointer;
}

.wf-toast__close:hover,
.wf-toast__close:focus-visible { background: rgba(15, 23, 42, .07); color: #17211d; outline: none; }
.wf-toast__close svg { width: 17px; height: 17px; }

.wf-toast__progress {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--wf-toast-accent);
    transform-origin: left;
    animation: wf-toast-progress linear forwards;
}

.wf-toast--leaving { animation: wf-toast-leave .2s ease-in both; }

@keyframes wf-toast-enter { from { opacity: 0; transform: translate3d(24px, -5px, 0) scale(.98); } }
@keyframes wf-toast-leave { to { opacity: 0; transform: translate3d(28px, 0, 0) scale(.98); } }
@keyframes wf-toast-progress { from { transform: scaleX(1); } to { transform: scaleX(0); } }

@media (max-width: 575.98px) {
    .wf-toast-region { top: max(10px, env(safe-area-inset-top)); right: 10px; left: 10px; width: auto; }
}

@media (prefers-reduced-motion: reduce) {
    .wf-toast, .wf-toast--leaving { animation-duration: .01ms; }
}
