.hdv2-cd-toast-host {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 10000040;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    pointer-events: none;
    max-width: calc(100vw - 2rem);
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.hdv2-cd-toast {
    pointer-events: auto;
    min-width: 280px;
    max-width: 380px;
    background: var(--hdv2-cah-card, #ffffff);
    border: 1px solid var(--hdv2-cah-border, #e5e7eb);
    border-radius: 0.65rem;
    box-shadow: 0 10px 25px -10px rgba(15, 23, 42, 0.2);
    padding: 0.75rem 0.85rem;
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    transform: translateX(20px);
    opacity: 0;
    transition: transform 0.18s ease, opacity 0.18s ease;
    font-family: inherit;
    color: var(--hdv2-cah-fg, #111827);
}

.hdv2-cd-toast.is-open {
    transform: translateX(0);
    opacity: 1;
}

.hdv2-cd-toast__icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.hdv2-cd-toast__icon svg {
    width: 16px;
    height: 16px;
}

.hdv2-cd-toast--success .hdv2-cd-toast__icon {
    background: hsl(142 70% 95%);
    color: hsl(142 71% 28%);
}

.hdv2-cd-toast--error .hdv2-cd-toast__icon {
    background: hsl(0 84% 96%);
    color: hsl(0 72% 38%);
}

.hdv2-cd-toast--warning .hdv2-cd-toast__icon {
    background: hsl(38 92% 95%);
    color: hsl(32 95% 35%);
}

.hdv2-cd-toast--info .hdv2-cd-toast__icon {
    background: hsl(214 95% 95%);
    color: hsl(214 84% 40%);
}

[data-hdv2-theme="dark"] .hdv2-cd-toast--success .hdv2-cd-toast__icon {
    background: hsl(142 40% 18%);
    color: hsl(142 70% 78%);
}

[data-hdv2-theme="dark"] .hdv2-cd-toast--error .hdv2-cd-toast__icon {
    background: hsl(0 35% 22%);
    color: hsl(0 90% 80%);
}

[data-hdv2-theme="dark"] .hdv2-cd-toast--warning .hdv2-cd-toast__icon {
    background: hsl(32 35% 20%);
    color: hsl(38 90% 78%);
}

[data-hdv2-theme="dark"] .hdv2-cd-toast--info .hdv2-cd-toast__icon {
    background: hsl(214 35% 20%);
    color: hsl(214 90% 80%);
}

.hdv2-cd-toast__body {
    flex: 1;
    min-width: 0;
}

.hdv2-cd-toast__title {
    font-family: inherit;
    font-size: 0.86rem;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.01em;
    color: var(--hdv2-cah-fg, #111827);
    margin: 0 0 0.1rem;
}

.hdv2-cd-toast__msg {
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--hdv2-cah-muted, #6b7280);
    margin: 0;
    line-height: 1.4;
    word-break: break-word;
}

.hdv2-cd-toast__close {
    width: 1.5rem;
    height: 1.5rem;
    flex-shrink: 0;
    border: 0;
    background: transparent;
    color: var(--hdv2-cah-muted, #6b7280);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.35rem;
}

.hdv2-cd-toast__close:hover {
    background: var(--hdv2-cah-accent, #f3f4f6);
    color: var(--hdv2-cah-fg, #111827);
}

.hdv2-cd-toast__close svg {
    width: 14px;
    height: 14px;
}

@media (max-width: 640px) {
    .hdv2-cd-toast-host {
        left: 1rem;
        right: 1rem;
        top: auto;
        bottom: 1rem;
    }

    .hdv2-cd-toast {
        min-width: 0;
        max-width: none;
        width: 100%;
    }
}
