/* VayLand — всплывающие уведомления (toast) */

.vl-toast-host {
    position: fixed !important;
    top: calc(var(--vl-chrome-h, 4.25rem) + 0.75rem);
    right: 1rem;
    left: auto;
    bottom: auto;
    z-index: 10080 !important;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
    width: min(22rem, calc(100vw - 2rem));
    max-width: calc(100vw - 2rem);
    margin: 0;
    pointer-events: none;
}

.vl-toast-host .vl-alert {
    pointer-events: auto;
    width: 100%;
    margin: 0;
}

.vl-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    position: relative;
    padding: 0.9rem 2.85rem 0.9rem 1rem;
    border-radius: 14px;
    font-family: "Onest", system-ui, sans-serif;
    font-size: 0.88rem;
    line-height: 1.45;
    backdrop-filter: blur(14px) saturate(1.1);
    -webkit-backdrop-filter: blur(14px) saturate(1.1);
    margin: 0;
    animation: vl-alert-in 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    transition: opacity 0.22s ease, transform 0.22s ease;
    /* сброс bootstrap .alert если класс остался */
    background-image: none !important;
}

@keyframes vl-alert-in {
    from {
        opacity: 0;
        transform: translateX(18px) translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateX(0) translateY(0);
    }
}

.vl-alert.is-leaving {
    opacity: 0;
    transform: translateX(18px);
}

.vl-alert__icon {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vl-alert__icon svg {
    width: 18px;
    height: 18px;
    display: block;
}

.vl-alert__body {
    flex: 1;
    min-width: 0;
    padding-top: 0.1rem;
}

.vl-alert__title {
    font-weight: 700;
    font-size: 0.92rem;
    margin: 0 0 0.2rem;
    line-height: 1.3;
}

.vl-alert__text {
    margin: 0;
    font-weight: 500;
    font-size: 0.86rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.72);
}

.vl-alert__close,
.vl-alert .close {
    position: absolute;
    top: 0.7rem;
    right: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    margin: 0;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.28);
    color: rgba(255, 255, 255, 0.65);
    cursor: pointer;
    float: none;
    text-shadow: none;
    opacity: 1;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    -webkit-appearance: none;
    appearance: none;
}

.vl-alert__close svg,
.vl-alert .close svg {
    width: 14px;
    height: 14px;
    display: block;
}

.vl-alert__close span,
.vl-alert .close span {
    display: none;
}

.vl-alert__close:hover,
.vl-alert__close:focus,
.vl-alert .close:hover,
.vl-alert .close:focus {
    outline: none;
    background: rgba(0, 0, 0, 0.42);
}

/* Success — акцент текущей сезонной темы */
.vl-alert--success,
.vl-alert.alert-success {
    color: rgba(255, 255, 255, 0.92) !important;
    background:
        radial-gradient(ellipse 90% 70% at 0% 0%, rgba(var(--vl-accent-rgb, 17, 170, 1), 0.22), transparent 55%),
        linear-gradient(135deg, var(--vl-surface-dark, rgba(8, 12, 8, 0.96)) 0%, var(--vl-modal-bg, rgba(10, 16, 12, 0.94)) 100%) !important;
    border: 1px solid rgba(var(--vl-accent-rgb, 17, 170, 1), 0.48) !important;
    box-shadow:
        0 12px 32px rgba(0, 0, 0, 0.45),
        0 0 28px rgba(var(--vl-accent-rgb, 17, 170, 1), 0.16),
        inset 0 0 0 1px rgba(var(--vl-accent-soft-rgb, 168, 255, 96), 0.08);
}

.vl-alert--success .vl-alert__icon {
    background: rgba(var(--vl-accent-rgb, 17, 170, 1), 0.22);
    color: var(--vl-green-light, #14cf00);
    border: 1px solid rgba(var(--vl-accent-rgb, 17, 170, 1), 0.45);
}

.vl-alert--success .vl-alert__title {
    color: var(--vl-accent-soft, #a8ff60);
}

.vl-alert--success .vl-alert__close:hover,
.vl-alert--success .vl-alert__close:focus,
.vl-alert--success .close:hover,
.vl-alert--success .close:focus {
    border-color: rgba(var(--vl-accent-soft-rgb, 168, 255, 96), 0.45);
    color: var(--vl-accent-soft, #a8ff60);
}

/* Error */
.vl-alert--error,
.vl-alert.alert-danger {
    color: #ffe8e8 !important;
    background: linear-gradient(135deg, rgba(22, 10, 12, 0.96) 0%, rgba(28, 12, 14, 0.94) 100%) !important;
    border: 1px solid rgba(255, 71, 87, 0.4) !important;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45), 0 0 24px rgba(255, 71, 87, 0.12);
}

.vl-alert--error .vl-alert__icon {
    background: rgba(255, 71, 87, 0.16);
    color: #ff6b7a;
    border: 1px solid rgba(255, 71, 87, 0.32);
}

.vl-alert--error .vl-alert__title {
    color: #ff9aa3;
}

.vl-alert--error .vl-alert__close:hover,
.vl-alert--error .vl-alert__close:focus,
.vl-alert--error .close:hover,
.vl-alert--error .close:focus {
    border-color: rgba(255, 130, 140, 0.4);
    color: #ffb3b8;
}

/* Warning */
.vl-alert--warn,
.vl-alert.alert-warning {
    color: #fff8e8 !important;
    background: linear-gradient(135deg, rgba(22, 16, 8, 0.96) 0%, rgba(28, 20, 10, 0.94) 100%) !important;
    border: 1px solid rgba(255, 152, 0, 0.4) !important;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45), 0 0 24px rgba(255, 152, 0, 0.1);
}

.vl-alert--warn .vl-alert__icon {
    background: rgba(255, 152, 0, 0.16);
    color: #ffb347;
    border: 1px solid rgba(255, 152, 0, 0.32);
}

.vl-alert--warn .vl-alert__title {
    color: #ffd166;
}

.vl-alert--warn .vl-alert__close:hover,
.vl-alert--warn .vl-alert__close:focus,
.vl-alert--warn .close:hover,
.vl-alert--warn .close:focus {
    border-color: rgba(255, 209, 102, 0.4);
    color: #ffe08a;
}

/* Info */
.vl-alert--info {
    color: #e8f6ff !important;
    background: linear-gradient(135deg, rgba(8, 16, 22, 0.96) 0%, rgba(10, 20, 28, 0.94) 100%) !important;
    border: 1px solid rgba(0, 188, 212, 0.35) !important;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45), 0 0 24px rgba(0, 188, 212, 0.1);
}

.vl-alert--info .vl-alert__icon {
    background: rgba(0, 188, 212, 0.14);
    color: #4fc3f7;
    border: 1px solid rgba(0, 188, 212, 0.28);
}

.vl-alert--info .vl-alert__title {
    color: #7dd3fc;
}

.vl-alert--info .vl-alert__close:hover,
.vl-alert--info .vl-alert__close:focus,
.vl-alert--info .close:hover,
.vl-alert--info .close:focus {
    border-color: rgba(125, 211, 252, 0.4);
    color: #a8e4ff;
}

@media (max-width: 480px) {
    .vl-toast-host {
        top: calc(var(--vl-chrome-h, 4.25rem) + 0.5rem);
        right: 0.65rem;
        left: 0.65rem;
        width: auto;
    }

    .vl-alert {
        padding: 0.85rem 2.75rem 0.85rem 0.85rem;
        gap: 0.65rem;
    }

    .vl-alert__icon {
        width: 34px;
        height: 34px;
    }
}
