/* Notificações tipo toast — barra lateral, ícone, título, mensagem, barra de progresso */

.vga-toast-stack {
    position: fixed;
    top: 1rem;
    right: 1rem;
    left: auto;
    z-index: 1085;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: min(22rem, calc(100vw - 2rem));
    pointer-events: none;
}

.vga-toast-stack .vga-toast {
    pointer-events: auto;
}

.vga-toast {
    --vga-toast-accent: #0d6efd;
    --vga-toast-icon-bg: rgba(13, 110, 253, 0.12);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    background: #fff;
    border-radius: 0.65rem;
    box-shadow:
        0 4px 6px -1px rgba(15, 23, 42, 0.08),
        0 10px 24px -6px rgba(15, 23, 42, 0.12);
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.06);
    animation: vga-toast-in 0.38s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Linha superior: barra lateral + texto + fechar */
.vga-toast__top {
    display: flex;
    align-items: stretch;
    position: relative;
    min-width: 0;
    flex: 1;
}

@keyframes vga-toast-in {
    from {
        opacity: 0;
        transform: translateX(0.75rem) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

.vga-toast--leaving {
    animation: vga-toast-out 0.28s ease forwards;
}

@keyframes vga-toast-out {
    to {
        opacity: 0;
        transform: translateX(0.5rem);
    }
}

.vga-toast__accent {
    width: 5px;
    flex-shrink: 0;
    background: var(--vga-toast-accent);
}

.vga-toast__body {
    flex: 1;
    min-width: 0;
    display: flex;
    gap: 0.65rem;
    padding: 0.85rem 2.25rem 0.85rem 0.75rem;
    align-items: flex-start;
}

.vga-toast__icon {
    flex-shrink: 0;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    background: var(--vga-toast-icon-bg);
    color: var(--vga-toast-accent);
}

.vga-toast__text {
    flex: 1;
    min-width: 0;
}

.vga-toast__title {
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.25;
    color: #0f172a;
    margin: 0 0 0.2rem;
}

.vga-toast__message {
    font-size: 0.8125rem;
    line-height: 1.45;
    color: #64748b;
    margin: 0;
}

.vga-toast__close {
    position: absolute;
    top: 0.4rem;
    right: 0.4rem;
    z-index: 2;
    width: 1.75rem;
    height: 1.75rem;
    padding: 0;
    border: none;
    background: transparent;
    color: #94a3b8;
    border-radius: 0.35rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    line-height: 1;
    transition: color 0.15s, background 0.15s;
}

.vga-toast__close:hover {
    color: #475569;
    background: rgba(15, 23, 42, 0.06);
}

/* Barra de tempo — largura total abaixo do cartão, encolhe da esquerda para a direita */
.vga-toast__progress-wrap {
    flex-shrink: 0;
    width: 100%;
    height: 5px;
    margin: 0;
    padding: 0;
    background: rgba(15, 23, 42, 0.08);
    border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.vga-toast__progress-bar {
    display: block;
    height: 100%;
    width: 100%;
    transform-origin: left center;
    will-change: transform;
    border-radius: 0 0 0.15rem 0;
    background: var(--vga-toast-accent);
    opacity: 0.92;
    animation: vga-toast-progress linear forwards;
}

@keyframes vga-toast-progress {
    from {
        transform: scaleX(1);
    }
    to {
        transform: scaleX(0);
    }
}

/* Variantes */
.vga-toast--success {
    --vga-toast-accent: #16a34a;
    --vga-toast-icon-bg: rgba(22, 163, 74, 0.12);
}

.vga-toast--error {
    --vga-toast-accent: #dc2626;
    --vga-toast-icon-bg: rgba(220, 38, 38, 0.12);
}

.vga-toast--warning {
    --vga-toast-accent: #d97706;
    --vga-toast-icon-bg: rgba(217, 119, 6, 0.14);
}

.vga-toast--info {
    --vga-toast-accent: #2563eb;
    --vga-toast-icon-bg: rgba(37, 99, 235, 0.12);
}

@media (max-width: 576px) {
    .vga-toast-stack {
        left: 0.75rem;
        right: 0.75rem;
        max-width: none;
    }
}
