.wm-toast-container {
    --wm-toast-floor: max(var(--wm-consent-h, 0px), calc(var(--wm-bottom-bar-h, 0px) + var(--wm-buybar-h, 0px)));
    --wm-toast-ease: cubic-bezier(.22, 1.2, .36, 1);
    position: fixed;
    left: 50%;
    bottom: calc(var(--wm-toast-floor) + 16px + env(safe-area-inset-bottom));
    z-index: 2147483646;
    width: min(420px, calc(100vw - 24px));
    height: var(--wm-toast-front, 0px);
    transform: translateX(-50%);
    pointer-events: none;
    transition: height .2s ease;
}

.wm-toast-container.is-expanded,
.wm-toast-container.is-stack:hover { height: var(--wm-toast-total, 0px); }

@media (max-width: 1399.98px) {
    .wm-toast-container { --wm-toast-floor: max(var(--wm-consent-h, 0px), var(--wm-consent-start-h, 0px), var(--wm-consent-end-h, 0px), calc(var(--wm-bottom-bar-h, 0px) + var(--wm-buybar-h, 0px))); }
}

@media (max-width: 767.98px) {
    body:has(.wwa:not([hidden]), .ev-call, #goTop.show) .wm-toast-container { bottom: calc(var(--wm-toast-floor) + 88px + env(safe-area-inset-bottom)); }
}

.wm-toast {
    --wm-toast-tone: var(--ev-primary, #2563eb);
    --wm-toast-line: color-mix(in srgb, var(--ev-text, #111827) 10%, transparent);
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    width: fit-content;
    max-width: 100%;
    min-height: 48px;
    margin-inline: auto;
    padding: 6px 6px 6px 14px;
    border: 1px solid var(--wm-toast-line);
    border-radius: min(var(--ev-radius-lg, 14px), 16px);
    background: var(--ev-surface, var(--ev-bg, #fff));
    color: var(--ev-text, #111827);
    box-shadow: 0 1px 2px rgb(0 0 0 / .05), 0 8px 24px -6px rgb(0 0 0 / .16);
    font: 500 .9rem/1.4 var(--ev-font-body, system-ui, sans-serif);
    pointer-events: auto;
    touch-action: pan-y;
    opacity: 0;
    transform: translateY(16px) scale(.96);
    transform-origin: 50% 100%;
    transition: opacity .2s ease, transform .24s var(--wm-toast-ease, ease), translate .2s ease;
}

[dir="rtl"] .wm-toast { padding: 6px 14px 6px 6px; }

.wm-toast::after {
    content: "";
    position: absolute;
    inset-inline: 0;
    top: 100%;
    height: 10px;
}

.wm-toast.is-visible {
    opacity: calc(1 - min(var(--i, 0), 3) * .18);
    transform: translateY(calc(var(--i, 0) * -10px)) scale(calc(1 - var(--i, 0) * .05));
}

.wm-toast-container:not(.is-expanded):not(:hover) .wm-toast.is-visible.is-back > * { opacity: 0; transition: opacity .15s ease; }
.wm-toast-container:not(.is-expanded):not(:hover) .wm-toast.is-visible.is-back { height: var(--wm-toast-front); overflow: hidden; }

.wm-toast-container.is-expanded .wm-toast.is-visible,
.wm-toast-container:hover .wm-toast.is-visible { opacity: 1; transform: translateY(calc(var(--y, 0px) * -1)); }

.wm-toast.is-hiding { opacity: 0; transform: translateY(calc(var(--i, 0) * -10px + 10px)) scale(.96); }
.wm-toast.is-dragging { transition: none; }
.wm-toast.is-again { animation: wmToastAgain .3s ease; }

@keyframes wmToastAgain {
    40% { scale: 1.03; }
}

.wm-toast__icon {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    color: var(--wm-toast-tone);
}

.wm-toast__icon svg { width: 20px; height: 20px; stroke-width: 2; }

.wm-toast__spin {
    width: 16px;
    height: 16px;
    border: 2px solid color-mix(in srgb, var(--wm-toast-tone) 25%, transparent);
    border-top-color: var(--wm-toast-tone);
    border-radius: 50%;
    animation: wmToastSpin .8s linear infinite;
}

@keyframes wmToastSpin {
    to { transform: rotate(360deg); }
}

.wm-toast__msg {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    color: inherit;
    overflow-wrap: anywhere;
}

.wm-toast__action {
    flex: none;
    min-height: 32px;
    padding: 5px 12px;
    border: 0;
    border-radius: 999px;
    background: var(--ev-text, #111827);
    color: var(--ev-surface, var(--ev-bg, #fff));
    font: 600 .84rem/1.2 var(--ev-font-body, system-ui, sans-serif);
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
}

.wm-toast__action:hover,
.wm-toast__action:focus-visible { background: color-mix(in srgb, var(--ev-text, #111827) 82%, transparent); color: var(--ev-surface, var(--ev-bg, #fff)); }

.wm-toast__close {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: inherit;
    opacity: .5;
    cursor: pointer;
}

.wm-toast__close svg { width: 15px; height: 15px; }
.wm-toast__close:hover,
.wm-toast__close:focus-visible { opacity: 1; background: color-mix(in srgb, var(--ev-text, #111827) 8%, transparent); }

.wm-toast__action:focus-visible,
.wm-toast__close:focus-visible { outline: 2px solid var(--ev-primary, currentColor); outline-offset: 2px; }

.wm-toast--success { --wm-toast-tone: var(--ev-success-text, var(--ev-success, #16a34a)); }
.wm-toast--error { --wm-toast-tone: var(--ev-danger-text, var(--ev-danger, #dc2626)); }
.wm-toast--warning { --wm-toast-tone: var(--ev-warning-text, var(--ev-warning, #b45309)); }
.wm-toast--info,
.wm-toast--loading { --wm-toast-tone: var(--ev-primary-text, var(--ev-primary, #2563eb)); }


.wm-hint {
    position: fixed;
    z-index: 2147483646;
    max-width: min(280px, calc(100vw - 16px));
    padding: 6px 11px;
    border-radius: 999px;
    background: var(--ev-text, #111827);
    color: var(--ev-surface, var(--ev-bg, #fff));
    box-shadow: 0 6px 18px -6px rgb(0 0 0 / .3);
    font: 600 .8rem/1.3 var(--ev-font-body, system-ui, sans-serif);
    pointer-events: none;
    opacity: 0;
    transform: translateY(4px) scale(.96);
    transition: opacity .16s ease, transform .2s cubic-bezier(.22, 1.2, .36, 1);
}

.wm-hint.is-below { transform: translateY(-4px) scale(.96); }
.wm-hint.is-visible { opacity: 1; transform: none; }
.wm-hint--error,
.wm-hint--warning { background: var(--ev-danger, #b91c1c); color: #fff; }

.wm-hint::after {
    content: "";
    position: absolute;
    left: calc(var(--wm-hint-arrow, 50%) - 5px);
    width: 10px;
    height: 10px;
    background: inherit;
    transform: rotate(45deg);
}

.wm-hint.is-above::after { bottom: -4px; }
.wm-hint.is-below::after { top: -4px; }


.wm-bump { animation: wmBump .42s cubic-bezier(.22, 1.4, .36, 1); }

@keyframes wmBump {
    0% { transform: scale(1); }
    35% { transform: scale(1.35); }
    100% { transform: scale(1); }
}

.wm-sr {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

@media (max-width: 575.98px) {
    .wm-toast { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .wm-toast, .wm-toast.is-hiding, .wm-hint, .wm-toast-container { transition: opacity .01ms; }
    .wm-toast.is-visible, .wm-toast.is-hiding, .wm-hint, .wm-hint.is-visible { transform: none; }
    .wm-toast-container:hover .wm-toast.is-visible, .wm-toast-container.is-expanded .wm-toast.is-visible { transform: translateY(calc(var(--y, 0px) * -1)); }
    .wm-toast.is-again, .wm-bump { animation: none; }
    .wm-toast__spin { animation-duration: 2.4s; }
}


.wm-field-error {
    margin: 6px 0 0;
    color: var(--ev-danger-text, var(--ev-danger, #b91c1c));
    font-size: .84rem;
    line-height: 1.35;
}

.wm-form-alert {
    display: flex;
    gap: 8px;
    margin: 0 0 12px;
    padding: 10px 12px;
    border: 1px solid color-mix(in srgb, var(--ev-danger, #dc2626) 28%, transparent);
    border-radius: min(var(--ev-radius, 10px), 12px);
    background: color-mix(in srgb, var(--ev-danger, #dc2626) 7%, var(--ev-surface, var(--ev-bg, #fff)));
    color: var(--ev-danger-text, var(--ev-danger, #b91c1c));
    font-size: .9rem;
    line-height: 1.45;
}

.wm-form-done {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: clamp(20px, 4vw, 36px) 20px;
    border: 1px solid color-mix(in srgb, var(--ev-text, #111827) 10%, transparent);
    border-radius: min(var(--ev-radius-lg, 14px), 18px);
    background: var(--ev-surface, var(--ev-bg, #fff));
    color: var(--ev-text, #111827);
    text-align: center;
    outline: 0;
    animation: wmDoneIn .26s cubic-bezier(.22, 1.2, .36, 1);
}

.wm-form-done__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--ev-success, #16a34a) 12%, transparent);
    color: var(--ev-success-text, var(--ev-success, #15803d));
}

.wm-form-done__text { margin: 0; max-width: 46ch; font-weight: 500; line-height: 1.5; }

.wm-form-done__again {
    min-height: 44px;
    padding: 8px 14px;
    border: 0;
    background: transparent;
    color: var(--ev-primary-text, var(--ev-primary, #2563eb));
    font: inherit;
    font-size: .9rem;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.wm-form-done--compact {
    flex-direction: row;
    justify-content: center;
    padding: 12px 14px;
    text-align: start;
}

.wm-form-done--compact .wm-form-done__icon { width: 32px; height: 32px; flex: none; }

.wm-form-saved {
    display: inline-flex;
    align-items: center;
    margin-inline-start: 12px;
    color: var(--ev-success-text, var(--ev-success, #15803d));
    font-size: .9rem;
    font-weight: 600;
    transition: opacity .3s ease;
}

.wm-form-saved::before { content: "✓"; margin-inline-end: 6px; }
.wm-form-saved.is-out { opacity: 0; }

@keyframes wmDoneIn {
    from { opacity: 0; transform: translateY(6px) scale(.98); }
}

.wm-flash-wrap {
    width: min(var(--ev-wrap, 1200px), 100% - 2 * var(--ev-gutter, 16px));
    margin: 16px auto 0;
}

.wm-flash-wrap.is-inline { width: auto; margin: 12px 0 16px; }

.wm-flash {
    --wm-flash-tone: var(--ev-primary-text, var(--ev-primary, #2563eb));
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 6px 8px 14px;
    border: 1px solid color-mix(in srgb, var(--wm-flash-tone) 22%, transparent);
    border-radius: min(var(--ev-radius, 10px), 12px);
    background: color-mix(in srgb, var(--wm-flash-tone) 6%, var(--ev-surface, var(--ev-bg, #fff)));
    color: var(--ev-text, #111827);
    font-size: .92rem;
    outline: 0;
    animation: wmDoneIn .24s ease;
}

[dir="rtl"] .wm-flash { padding: 8px 14px 8px 6px; }

.wm-flash--success { --wm-flash-tone: var(--ev-success-text, var(--ev-success, #15803d)); }
.wm-flash--error { --wm-flash-tone: var(--ev-danger-text, var(--ev-danger, #b91c1c)); }
.wm-flash--warning { --wm-flash-tone: var(--ev-warning-text, var(--ev-warning, #b45309)); }
.wm-flash__icon { flex: none; color: var(--wm-flash-tone); }
.wm-flash__text { flex: 1 1 auto; min-width: 0; margin: 0; }

.wm-flash__close {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: inherit;
    opacity: .55;
    cursor: pointer;
}

.wm-flash__close:hover,
.wm-flash__close:focus-visible { opacity: 1; background: color-mix(in srgb, var(--ev-text, #111827) 8%, transparent); }

@media (prefers-reduced-motion: reduce) {
    .wm-form-done, .wm-flash { animation: none; }
}
