/* static/css/portal_cliente/portal_base.css */
/* Estilos base, identidade visual e comportamento PWA do Portal do Cliente */

[x-cloak] { display: none !important; }

body { 
    font-family: 'Inter', sans-serif; 
    -webkit-tap-highlight-color: transparent;
    background: #064e3b;
    background-attachment: fixed;
    min-height: 100vh;
}

/* COMPORTAMENTO DINÂMICO: SITE VS APP */

/* 1. MODO SITE (Navegador): Comportamento normal, sem travas */
html, body { 
    -webkit-tap-highlight-color: transparent;
    overscroll-behavior-y: auto;
}

/* 2. MODO APP (PWA Instalado): Blindagem total */
@media (display-mode: standalone) {
    html, body { 
        -webkit-user-select: none !important;
        user-select: none !important;
        -webkit-touch-callout: none !important;
        overscroll-behavior-y: none;
    }

    input, textarea, [contenteditable="true"] {
        -webkit-user-select: text !important;
        user-select: text !important;
        -webkit-touch-callout: default !important;
    }
}

.gradient-bg { 
    background: linear-gradient(270deg, #10b981, #059669, #0891b2, #10b981) !important;
    background-size: 400% 400% !important;
    animation: aurora-flow 10s ease infinite !important;
}

@keyframes aurora-flow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.backdrop-blur-xl {
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}

.safe-area-top { padding-top: env(safe-area-inset-top); }
.safe-area-bottom { padding-bottom: env(safe-area-inset-bottom); }

/* Estilos de Fallback Esmeralda */
.text-emerald-main { color: #10b981 !important; }
.text-emerald-footer { color: rgba(110, 231, 183, 0.7) !important; font-size: 9px !important; }
.border-emerald-light { border-color: rgba(110, 231, 183, 0.4) !important; }
.bg-emerald-600 { background-color: #10b981 !important; }

.chat-focus-container:focus-within {
    box-shadow: 0 0 0 2px #10b981 !important;
    border-color: transparent !important;
}
.chat-focus-container textarea:focus {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
    ring: 0 !important;
}

/* Scrollbar escondida */
::-webkit-scrollbar { width: 0px; background: transparent; }

/* Ajuste de Título para Modal de Sucesso */
.swal2-title {
    font-size: 1.2rem !important;
    letter-spacing: -0.025em !important;
    font-weight: 900 !important;
    text-transform: uppercase !important;
}
@media (min-width: 380px) {
    .swal2-title { font-size: 1.4rem !important; }
}
@media (min-width: 640px) {
    .swal2-title { font-size: 1.8rem !important; }
}

/* --- Mão Neon Pulsante (Botões) --- */
.neon-hand-btn {
    color: #fff;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.8)) drop-shadow(0 0 10px rgba(139, 92, 246, 0.6));
    animation: neon-pulse-hand 1.5s infinite ease-in-out;
}

@keyframes neon-pulse-hand {
    0%, 100% { 
        transform: scale(1);
        filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.8)) drop-shadow(0 0 10px rgba(139, 92, 246, 0.6));
    }
    50% { 
        transform: scale(1.2);
        filter: drop-shadow(0 0 8px rgba(255, 255, 255, 1)) drop-shadow(0 0 15px rgba(139, 92, 246, 0.9));
    }
}

/* Desktop Block Overlay */
#mobile-only-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: #0f172a;
    z-index: 9999;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    color: white;
}

/* Efeito de Destaque para Novo Contrato */
@keyframes contract-pulse-green {
    0% { background-color: transparent; transform: scale(1); box-shadow: none; }
    50% { background-color: #ecfdf5; transform: scale(1.02); box-shadow: 0 0 20px rgba(16, 185, 129, 0.2); }
    100% { background-color: transparent; transform: scale(1); box-shadow: none; }
}
.highlight-contract-pulse {
    animation: contract-pulse-green 1.5s ease-in-out 3 !important;
    border: 2px solid #10b981 !important;
    z-index: 50;
    position: relative;
}

/* ==========================================================================
   DEFENSIVE WEATHER & HEADER ANIMATIONS (ZERO FOUC / INQUEBRÁVEL)
   Garante que SVG e elementos do cabeçalho nunca empilhem verticalmente
   mesmo em conexões lentas ou com timeout (408) do stylesheet secundário.
   ========================================================================== */
.weather-container {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    pointer-events: none !important;
    overflow: hidden !important;
    z-index: 1 !important;
}

.weather-container > * {
    position: absolute !important;
    pointer-events: none !important;
}

.dirigible {
    position: absolute !important;
    top: 15px !important;
    left: 0 !important;
    width: 260px !important;
    height: 150px !important;
    max-width: 260px !important;
    max-height: 150px !important;
    opacity: 0;
    transform: translate(-300px, 15px) scale(0.55);
    pointer-events: none !important;
    z-index: 2 !important;
}

.funny-airplane {
    position: absolute !important;
    top: 30px !important;
    left: 0 !important;
    opacity: 0;
    transform: translate(-500px, 80px);
    pointer-events: none !important;
    z-index: 4 !important;
}

.airplane-body-wrapper {
    position: relative !important;
    width: 140px !important;
    height: 90px !important;
}

.dirigible-svg {
    width: 260px !important;
    height: 150px !important;
    max-width: 260px !important;
    max-height: 150px !important;
    display: block !important;
}

.airplane-svg {
    width: 140px !important;
    height: 90px !important;
    max-width: 140px !important;
    max-height: 90px !important;
    display: block !important;
}

.sun-container {
    position: absolute !important;
    top: -30px !important;
    right: -30px !important;
    width: 150px !important;
    height: 150px !important;
}

.cloud-sunny {
    position: absolute !important;
}

.cloud-container {
    position: absolute !important;
    inset: 0 !important;
    overflow: hidden !important;
}

#bat-container {
    position: absolute !important;
    opacity: 0 !important;
}

/* Blindagem Autofill: Prevenção de fundo branco com credenciais salvas */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px #064e3b inset !important;
    -webkit-text-fill-color: #ffffff !important;
    caret-color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    transition: background-color 5000s ease-in-out 0s;
}
input:-webkit-autofill:focus {
    border-color: #34d399 !important;
    -webkit-box-shadow: 0 0 0 1000px #064e3b inset, 0 0 0 1px #34d399 !important;
}
input:autofill,
input:autofill:hover,
input:autofill:focus,
input:autofill:active {
    box-shadow: 0 0 0 1000px #064e3b inset !important;
    -webkit-text-fill-color: #ffffff !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}
input:autofill:focus {
    border-color: #34d399 !important;
    box-shadow: 0 0 0 1000px #064e3b inset, 0 0 0 1px #34d399 !important;
}


