:root {
    --kol-toast-width: min(360px, calc(100vw - 32px));
    --kol-toast-surface: rgba(20, 24, 33, 0.92);
    --kol-toast-border: rgba(255, 255, 255, 0.1);
    --kol-toast-text: #f8fafc;
    --kol-toast-muted: rgba(226, 232, 240, 0.75);
    --kol-toast-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
}

.kol-modern-toast-root {
    position: fixed;
    left: 16px;
    bottom: 16px;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    width: var(--kol-toast-width);
    pointer-events: none;
}

.kol-modern-toast {
    position: relative;
    overflow: hidden;
    padding: 16px 18px 18px;
    border: 1px solid var(--kol-toast-border);
    border-radius: 18px;
    background:
        radial-gradient(circle at top right, rgba(56, 189, 248, 0.2), transparent 34%),
        radial-gradient(circle at bottom left, rgba(14, 165, 233, 0.2), transparent 38%),
        var(--kol-toast-surface);
    box-shadow: var(--kol-toast-shadow);
    color: var(--kol-toast-text);
    backdrop-filter: blur(16px);
    transform: translateY(18px) scale(0.97);
    opacity: 0;
    transition: opacity 0.24s ease, transform 0.24s ease;
    pointer-events: auto;
}

.kol-modern-toast.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.kol-modern-toast.is-leaving {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
}

.kol-modern-toast.is-clickable {
    cursor: pointer;
}

.kol-modern-toast__close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--kol-toast-text);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.kol-modern-toast__close:hover,
.kol-modern-toast__close:focus {
    background: rgba(255, 255, 255, 0.16);
    outline: none;
}

.kol-modern-toast__header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-right: 28px;
    margin-bottom: 8px;
}

.kol-modern-toast__title {
    display: block;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.kol-modern-toast__badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.09);
    color: var(--kol-toast-muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.kol-modern-toast__message {
    margin: 0;
    font-size: 14px;
    line-height: 1.55;
    color: var(--kol-toast-text);
}

.kol-modern-toast__meta {
    margin-top: 10px;
    font-size: 12px;
    color: var(--kol-toast-muted);
}

.kol-modern-toast__progress {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 3px;
    transform-origin: left;
    background: linear-gradient(90deg, rgba(56, 189, 248, 0.95), rgba(125, 211, 252, 0.45));
    animation-name: kol-modern-toast-progress;
    animation-timing-function: linear;
    animation-fill-mode: forwards;
}

.kol-modern-toast--success {
    background:
        radial-gradient(circle at top right, rgba(34, 197, 94, 0.2), transparent 34%),
        radial-gradient(circle at bottom left, rgba(16, 185, 129, 0.18), transparent 38%),
        var(--kol-toast-surface);
}

.kol-modern-toast--warning {
    background:
        radial-gradient(circle at top right, rgba(251, 191, 36, 0.24), transparent 34%),
        radial-gradient(circle at bottom left, rgba(249, 115, 22, 0.18), transparent 38%),
        var(--kol-toast-surface);
}

.kol-modern-toast--error {
    background:
        radial-gradient(circle at top right, rgba(248, 113, 113, 0.22), transparent 34%),
        radial-gradient(circle at bottom left, rgba(239, 68, 68, 0.18), transparent 38%),
        var(--kol-toast-surface);
}

@keyframes kol-modern-toast-progress {
    from {
        transform: scaleX(1);
    }

    to {
        transform: scaleX(0);
    }
}

@media (max-width: 640px) {
    .kol-modern-toast-root {
        right: 12px;
        left: 12px;
        width: auto;
    }
}
