/* ═══════════════════════════════════════════════════════════════
   Notificações Toast — Feedback visual em tempo real
   
   Arquivo:    notificacoes-toast.css
   Descrição:  Sistema de toast para notificações push. Exibição
               automática no canto superior direito com animações,
               empilhamento e suporte a dark theme.
   
   Sumário:
     1. Variáveis
     2. Container de Toasts
     3. Toast Base
     4. Toast Header
     5. Toast Body
     6. Toast Icon (por tipo)
     7. Toast Close Button
     8. Animações
     9. Responsivo (≤ 768px)
     10. Dark Theme
   
   Paleta: Navy (#0B1F33), Teal (#0EA5A4), Gold (#D6B15E)
   ═══════════════════════════════════════════════════════════════ */


/* ══════════════════════════════════════
   1. VARIÁVEIS
   ══════════════════════════════════════ */

:root {
    --toast-bg: #ffffff;
    --toast-border: #e6edf5;
    --toast-shadow: 0 12px 48px rgba(11, 31, 51, 0.18);
    --toast-text: #0f172a;
    --toast-text-secondary: #526173;
    --toast-radius: 12px;
    --toast-icon-lead: #0EA5A4;
    --toast-icon-link: #667eea;
    --toast-icon-formulario: #ed8936;
    --toast-icon-aprovado: #48bb78;
    --toast-icon-rejeitado: #e53e3e;
    --toast-icon-convertido: #D6B15E;
}


/* ══════════════════════════════════════
   2. CONTAINER DE TOASTS
   ══════════════════════════════════════ */

.notif-toast-container {
    position: fixed;
    top: 80px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
    max-width: 420px;
    width: 100%;
}


/* ══════════════════════════════════════
   3. TOAST BASE
   ══════════════════════════════════════ */

.notif-toast {
    background: var(--toast-bg);
    border: 1px solid var(--toast-border);
    border-radius: var(--toast-radius);
    box-shadow: var(--toast-shadow);
    padding: 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    pointer-events: all;
    opacity: 0;
    transform: translateX(120%);
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: notif-toast-slide-in 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.notif-toast:hover {
    box-shadow: 0 16px 56px rgba(11, 31, 51, 0.22);
    transform: translateY(-2px) scale(1.02);
}

.notif-toast--removing {
    animation: notif-toast-slide-out 0.3s cubic-bezier(0.6, -0.28, 0.735, 0.045) forwards;
}


/* ══════════════════════════════════════
   4. TOAST HEADER
   ══════════════════════════════════════ */

.notif-toast__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
    gap: 8px;
}

.notif-toast__title {
    margin: 0;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--toast-text);
    flex: 1;
}


/* ══════════════════════════════════════
   5. TOAST BODY
   ══════════════════════════════════════ */

.notif-toast__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.notif-toast__message {
    margin: 0;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.5;
    color: var(--toast-text-secondary);
}


/* ══════════════════════════════════════
   6. TOAST ICON (por tipo)
   ══════════════════════════════════════ */

.notif-toast__icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(14, 165, 164, 0.1);
    color: var(--toast-icon-lead);
}

.notif-toast__icon svg {
    width: 20px;
    height: 20px;
    stroke-width: 2;
}

/* Tipos específicos */
.notif-toast__icon--lead {
    background: rgba(14, 165, 164, 0.1);
    color: var(--toast-icon-lead);
}

.notif-toast__icon--link {
    background: rgba(102, 126, 234, 0.1);
    color: var(--toast-icon-link);
}

.notif-toast__icon--formulario {
    background: rgba(237, 137, 54, 0.1);
    color: var(--toast-icon-formulario);
}

.notif-toast__icon--aprovado {
    background: rgba(72, 187, 120, 0.1);
    color: var(--toast-icon-aprovado);
}

.notif-toast__icon--rejeitado {
    background: rgba(229, 62, 62, 0.1);
    color: var(--toast-icon-rejeitado);
}

.notif-toast__icon--convertido {
    background: rgba(214, 177, 94, 0.1);
    color: var(--toast-icon-convertido);
}


/* ══════════════════════════════════════
   7. TOAST CLOSE BUTTON
   ══════════════════════════════════════ */

.notif-toast__close {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border: none;
    background: transparent;
    color: var(--toast-text-secondary);
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
    opacity: 0.6;
}

.notif-toast__close:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.05);
}

.notif-toast__close svg {
    width: 16px;
    height: 16px;
    stroke-width: 2.5;
}


/* ══════════════════════════════════════
   8. ANIMAÇÕES
   ══════════════════════════════════════ */

@keyframes notif-toast-slide-in {
    0% {
        opacity: 0;
        transform: translateX(120%);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes notif-toast-slide-out {
    0% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateX(120%) scale(0.9);
    }
}


/* ══════════════════════════════════════
   9. RESPONSIVO (≤ 768px)
   ══════════════════════════════════════ */

@media (max-width: 768px) {
    .notif-toast-container {
        top: 72px;
        right: 16px;
        left: 16px;
        max-width: 100%;
    }

    .notif-toast {
        padding: 14px;
    }

    .notif-toast__icon {
        width: 36px;
        height: 36px;
    }

    .notif-toast__icon svg {
        width: 18px;
        height: 18px;
    }

    .notif-toast__title {
        font-size: 13px;
    }

    .notif-toast__message {
        font-size: 12px;
    }
}


/* ══════════════════════════════════════
   10. DARK THEME
   ══════════════════════════════════════ */

[data-bs-theme="dark"] {
    --toast-bg: #1a2332;
    --toast-border: #2d3748;
    --toast-shadow: 0 12px 48px rgba(0, 0, 0, 0.4);
    --toast-text: #e2e8f0;
    --toast-text-secondary: #a0aec0;
}

[data-bs-theme="dark"] .notif-toast {
    background: var(--toast-bg);
    border-color: var(--toast-border);
}

[data-bs-theme="dark"] .notif-toast:hover {
    box-shadow: 0 16px 56px rgba(0, 0, 0, 0.5);
}

[data-bs-theme="dark"] .notif-toast__close:hover {
    background: rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .notif-toast__icon--lead {
    background: rgba(14, 165, 164, 0.15);
    color: #0EA5A4;
}

[data-bs-theme="dark"] .notif-toast__icon--link {
    background: rgba(102, 126, 234, 0.15);
    color: #7c96f5;
}

[data-bs-theme="dark"] .notif-toast__icon--formulario {
    background: rgba(237, 137, 54, 0.15);
    color: #f6ad55;
}

[data-bs-theme="dark"] .notif-toast__icon--aprovado {
    background: rgba(72, 187, 120, 0.15);
    color: #68d391;
}

[data-bs-theme="dark"] .notif-toast__icon--rejeitado {
    background: rgba(229, 62, 62, 0.15);
    color: #fc8181;
}

[data-bs-theme="dark"] .notif-toast__icon--convertido {
    background: rgba(214, 177, 94, 0.15);
    color: #D6B15E;
}
