/* ============================================================
   🌅 FAGULHA — 2026-10-16 — Fase 2 (arquivo 1 de 7)
   Variáveis semânticas aplicadas em: toast-fenda, loading-spinner.
   Cores de marca (toast-sucesso/erro) mantidas hardcoded.
   ============================================================ */

/* BOLHAS DA FENDA REFORMULADAS */
.bolha {
    position: absolute;
    bottom: -100px; /* Começa abaixo da tela */
    background: radial-gradient(circle at 30% 30%,
            rgba(255, 255, 255, 0.4) 0%,
            rgba(255, 255, 255, 0.1) 40%,
            rgba(255, 255, 255, 0.2) 60%,
            rgba(255, 255, 255, 0.05) 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 55%;
    
    /* OTIMIZAÇÃO 1: Ativa a aceleração de hardware nativa na GPU */
    will-change: transform, opacity;
    
    /* OTIMIZAÇÃO 2: Força o motor do navegador a renderizar em uma camada 3D separada */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    animation: subirEBalancar 8s infinite ease-in;
    pointer-events: none;
    touch-action: none; 
    user-select: none;
}

.bubbles-container {
    position: fixed ;
    top: 0 ;
    width: 100vw ;
    height: 100vh ;
    z-index: 4000; /* Fica a frente do conteúdo porém atrás dos menus e notificações */
    pointer-events: none;
    touch-action: none;
    user-select: none;
    overflow: hidden; 
}


/* OTIMIZAÇÃO 3: Substituído transformações 2D por 3D (translate3d) nas keyframes */
@keyframes subirEBalancar {
    0% {
        transform: translate3d(0, 0, 0) scale(0.5);
        opacity: 0;
    }

    20% {
        opacity: 0.6;
    }

    50% {
        transform: translate3d(50px, -60vh, 0) scale(1.2);
        opacity: 0.4;
    }

    80% {
        transform: translate3d(-10px, -100vh, 0) scale(1.5);
        opacity: 0.2;
    }

    100% {
        transform: translate3d(-30px, -120vh, 0) scale(1.8);
        opacity: 0;
    }
}



@keyframes deslizar {
    from {
        transform: translateY(100px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
    }
}


@keyframes surgimentoModal {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
    }
}



@keyframes slideIn {
    from {
        transform: translateX(-110%);
    }

    to {
        transform: translateX(0);
    }
}



.toast-fenda {
    position: fixed;
    top: 90px;
    left: 50%;
    transform: translateX(-50%);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
    color: #fffffff5;                                              /* fallback */
    color: oklch(1 0 0 / 96%);                                    /* fallback moderno */
    color: var(--texto-primario, oklch(1 0 0 / 96%));              /* 🌅 FAGULHA – Fase 2 */
    padding:15px 20px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: bold;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);                    /* fallback */
    border: 1px solid var(--borda-card, rgba(255, 255, 255, 0.2)); /* 🌅 FAGULHA – Fase 2 */
    animation: slideDown-toast 0.5s ease-out;
    transition: opacity 0.6s ease-in-out;
    z-index: 10005;
    /* 5 níveis acima da navbar*/

}

.toast-sucesso-global {
    background: rgba(40, 167, 69, 0.9);                            /* 🎨 cor de marca do toast — não cabe em --cor-sucesso (#4caf50 puro) */
}

@keyframes slideDown-toast {
    from {
        transform: translate(-50%, -150px);
        opacity: 0;
    }

    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

.toast-erro-global{
    background: rgba(221, 47, 64, 0.9);                            /* 🎨 cor de marca do toast — não cabe em --cor-erro (#ff6b6b puro) */
}

/* Quando a reação está sendo enviada */
.spotted-card.is-loading {
    filter: brightness(0.7) blur(1px);
    pointer-events: none;
    transition: filter 0.3s ease;
}

/* O spinner (o seu Radar de Maracutaia) */
.loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate3d(-50%, -50%, 0px);
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    width: clamp(32px, 3cqi, 70px);
    height: clamp(32px, 3cqi, 70px);
    border: 4px solid rgba(255, 255, 255, 0.3);                    /* 🎨 alpha específico do spinner — não cabe em --borda-media */
    border-top: 4px solid #ff8c00;                                 /* fallback */
    border-top: 4px solid var(--cor-principal-laranja, #ff8c00);   /* 🌅 FAGULHA – Fase 2 */
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 100;
}

@keyframes spin { 0% { transform:  rotate(0deg); } 100% { transform: rotate(360deg); } }


.lightbox-post-overlay {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        opacity: 0.5;
    }

    to {
        opacity: 1;
    }
}

/* ============================================================
   ANIMAÇÕES DE ENTRADA EM CASCATA
   ============================================================ */

/* --- MODO GRID (com transform, suave) --- */
@keyframes card-entrada-grid {
    0% {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.grid-card-entrada {
    animation: card-entrada-grid 0.35s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

/* --- MODO SWIPE (sem transform - apenas blur + opacidade) --- */
/* ============================================================
   ANIMAÇÃO DE DISTRIBUIÇÃO DO RADAR (MODO SWIPE)
   Protocolo Blur-to-Focus + Brightness - Sem Transform
   ============================================================ */

@keyframes swipe-distribuicao-keyframes {
    0% {
        opacity: 0;
        filter: blur(15px) brightness(0.3);
    }
    40% {
        filter: blur(5px) brightness(0.8);
    }
    100% {
        opacity: 1;
        filter: blur(0) brightness(1);
    }
}

.swipe-distribuicao {
    animation: swipe-distribuicao-keyframes 0.35s cubic-bezier(0.25, 1.2, 0.5, 1) forwards !important;
}

body.modo-swipe-ativo .swipe-distribuicao {
    animation: swipe-distribuicao-keyframes 0.4s cubic-bezier(0.25, 1.2, 0.5, 1) forwards !important;
}