/* Modern toast — matches theme-refresh tokens */
.zt-toast-host {
    position: fixed;
    z-index: 20050;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    width: min(420px, calc(100vw - 24px));
    max-width: calc(100vw - 24px);
}

.zt-toast-host[data-position="top-center"] {
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    align-items: stretch;
}

.zt-toast-host[data-position="top-right"] {
    top: 18px;
    right: 18px;
    align-items: flex-end;
}

.zt-toast-host[data-position="top-left"] {
    top: 18px;
    left: 18px;
    align-items: flex-start;
}

.zt-toast-host[data-position="bottom-right"] {
    bottom: 18px;
    right: 18px;
    align-items: flex-end;
}

.zt-toast-host[data-position="bottom-center"] {
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    align-items: stretch;
}

.zt-toast {
    pointer-events: auto;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 12px;
    align-items: start;
    width: 100%;
    padding: 14px 14px 14px 12px;
    border-radius: 16px;
    border: 1px solid var(--zt-border, #e5eaf2);
    background: var(--zt-surface, #ffffff);
    color: var(--zt-text, #172033);
    box-shadow: 0 18px 40px rgba(15, 23, 42, .14);
    font-family: var(--zt-font, 'Plus Jakarta Sans', 'Segoe UI', sans-serif);
    transform: translateY(-8px) scale(.98);
    opacity: 0;
    transition: transform .28s cubic-bezier(.22, 1, .36, 1), opacity .22s ease;
}

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

.zt-toast.is-out {
    transform: translateY(-6px) scale(.98);
    opacity: 0;
}

.zt-toast__icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex: 0 0 auto;
}

.zt-toast__body {
    min-width: 0;
    padding-top: 2px;
}

.zt-toast__title {
    display: block;
    font-size: 13px;
    font-weight: 750;
    letter-spacing: -.01em;
    line-height: 1.3;
    margin: 0 0 2px;
}

.zt-toast__message {
    display: block;
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1.45;
    color: var(--zt-muted, #64748b);
    margin: 0;
}

.zt-toast__close {
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--zt-muted, #64748b);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background-color .16s ease, color .16s ease;
}

.zt-toast__close:hover,
.zt-toast__close:focus {
    background: rgba(15, 23, 42, .06);
    color: var(--zt-text, #172033);
    outline: none;
}

.zt-toast.is-success {
    border-color: #bbf7d0;
    background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 55%);
}

.zt-toast.is-success .zt-toast__icon {
    background: #dcfce7;
    color: #15803d;
}

.zt-toast.is-error {
    border-color: #fecaca;
    background: linear-gradient(180deg, #fef2f2 0%, #ffffff 55%);
}

.zt-toast.is-error .zt-toast__icon {
    background: #fee2e2;
    color: #dc2626;
}

.zt-toast.is-warning {
    border-color: #fde68a;
    background: linear-gradient(180deg, #fffbeb 0%, #ffffff 55%);
}

.zt-toast.is-warning .zt-toast__icon {
    background: #fef3c7;
    color: #b45309;
}

.zt-toast.is-info {
    border-color: #bfdbfe;
    background: linear-gradient(180deg, #eff6ff 0%, #ffffff 55%);
}

.zt-toast.is-info .zt-toast__icon {
    background: #dbeafe;
    color: #2563eb;
}

html[data-zt-theme="dark"] .zt-toast {
    background: #172033;
    border-color: rgba(148, 163, 184, .22);
    color: #e5e7eb;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .35);
}

html[data-zt-theme="dark"] .zt-toast__message {
    color: #94a3b8;
}

html[data-zt-theme="dark"] .zt-toast__close:hover,
html[data-zt-theme="dark"] .zt-toast__close:focus {
    background: rgba(148, 163, 184, .12);
    color: #e5e7eb;
}

html[data-zt-theme="dark"] .zt-toast.is-success {
    background: linear-gradient(180deg, rgba(22, 101, 52, .28) 0%, #172033 60%);
    border-color: rgba(74, 222, 128, .28);
}

html[data-zt-theme="dark"] .zt-toast.is-error {
    background: linear-gradient(180deg, rgba(153, 27, 27, .28) 0%, #172033 60%);
    border-color: rgba(248, 113, 113, .28);
}

html[data-zt-theme="dark"] .zt-toast.is-warning {
    background: linear-gradient(180deg, rgba(146, 64, 14, .28) 0%, #172033 60%);
    border-color: rgba(251, 191, 36, .28);
}

html[data-zt-theme="dark"] .zt-toast.is-info {
    background: linear-gradient(180deg, rgba(30, 64, 175, .28) 0%, #172033 60%);
    border-color: rgba(96, 165, 250, .28);
}

@media (max-width: 640px) {
    .zt-toast-host[data-position="top-right"],
    .zt-toast-host[data-position="top-left"],
    .zt-toast-host[data-position="bottom-right"] {
        left: 12px;
        right: 12px;
        width: auto;
        align-items: stretch;
        transform: none;
    }

    .zt-toast-host[data-position="top-center"],
    .zt-toast-host[data-position="bottom-center"] {
        left: 12px;
        right: 12px;
        width: auto;
        transform: none;
    }
}
