/* ============================================================
   TOAST — notificações em linha, estilo app de banco
   ============================================================ */

#toast-root {
    position: fixed;
    top: calc(90px + env(safe-area-inset-top, 0px));
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    pointer-events: none;
    width: 100%;
    max-width: 420px;
    padding: 0 16px;
}

.toast {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    background: white;
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.18), 0 2px 8px rgba(15, 23, 42, 0.1);
    border-left: 5px solid #CBD5E1;
    font-family: 'Inter', 'Roboto', sans-serif;
    font-size: 14.5px;
    line-height: 1.45;
    color: #1E293B;
    width: 100%;
    pointer-events: all;
    opacity: 0;
    transform: translateY(-16px) scale(0.97);
    transition: opacity 0.25s ease, transform 0.25s ease;
    will-change: opacity, transform;
}

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

.toast.toast-saindo {
    opacity: 0;
    transform: translateY(-10px) scale(0.97);
}

/* Tipos */
.toast.toast-sucesso  { border-left-color: #1A5F1E; }
.toast.toast-erro     { border-left-color: #C62828; }
.toast.toast-aviso    { border-left-color: #F59E0B; }
.toast.toast-info     { border-left-color: #1565C0; }

/* Mensagem */
.toast-msg {
    flex: 1;
    font-weight: 500;
}

.toast-sucesso .toast-msg { color: #14401A; }
.toast-erro    .toast-msg { color: #7F1D1D; }
.toast-aviso   .toast-msg { color: #78350F; }
.toast-info    .toast-msg { color: #1E293B; }

/* Botão de fechar (só nos simples) */
.toast-close {
    border: none;
    background: transparent;
    color: #CBD5E1;
    cursor: pointer;
    font-size: 12px;
    padding: 0 2px;
    line-height: 1;
    flex-shrink: 0;
    transition: color 0.15s ease;
    margin-top: 1px;
}

.toast-close:hover {
    color: #64748B;
}

/* Toasts de confirmação */
.toast.toast-confirmar {
    flex-direction: column;
    gap: 12px;
}

.toast-acoes {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.toast-btn {
    border: none;
    border-radius: 8px;
    padding: 7px 14px;
    font-family: 'Inter', 'Roboto', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.toast-btn-cancelar {
    background: #F1F5F9;
    color: #64748B;
}

.toast-btn-cancelar:hover {
    background: #E2E8F0;
}

.toast-btn-confirmar {
    background: #1A5F1E;
    color: white;
}

.toast-aviso .toast-btn-confirmar {
    background: #C62828;
}

.toast-btn-confirmar:hover {
    opacity: 0.88;
}

/* Mobile */
@media (max-width: 480px) {
    #toast-root {
        top: calc(72px + env(safe-area-inset-top, 0px));
        max-width: none;
        padding: 0 12px;
    }
}
