/* static/layout/navbar.css */

/* Container da Bottom Bar */
.bottom-navbar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    
    /* Garante que a barra encoste no fundo absoluto */
    margin: 0;
    
    /* Altura automática */
    height: auto;
    
    /* Fundo branco com leve transparência (Glassmorphism) */
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    
    /* Borda superior sutil */
    border-top: 1px solid var(--border-subtle);

    /* Layout Flex para os itens */
    display: flex;
    justify-content: space-around;
    align-items: center;

    /* Arredondamento APENAS em cima */
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    /* Embaixo deve ser reto (0) para casar com a sangria, 
       mas visualmente a sangria vai preencher os cantos redondos da tela */
    border-bottom-left-radius: 0; 
    border-bottom-right-radius: 0;

    box-shadow: 0px -4px 20px rgba(26, 77, 46, 0.08);
    z-index: 1000;

    /* ÁREA SEGURA (Safe Area)
       Isso empurra os ÍCONES para cima, para não ficarem na curva.
       Mas o FUNDO vai descer graças ao ::after abaixo. 
    */
    padding-top: 10px;
    padding-bottom: max(10px, env(safe-area-inset-bottom));
}

/* --- CORREÇÃO DE CANTOS ARREDONDADOS (Sangria/Bleed) --- 
   Este elemento fantasma estende a cor de fundo da navbar para ALÉM 
   do limite inferior da viewport. Isso preenche fisicamente os cantos 
   arredondados da tela do celular, eliminando o "vão transparente".
*/
.bottom-navbar::after {
    content: '';
    position: absolute;
    bottom: -100px; /* Estende 100px para baixo (invisível, mas cobre o gap) */
    left: 0;
    width: 100%;
    height: 100px; /* Altura da sangria */
    background-color: rgba(255, 255, 255, 0.95); /* Mesma cor da navbar */
    backdrop-filter: blur(10px); /* Mantém o desfoque se possível */
    z-index: -1; /* Fica atrás do conteúdo */
}

/* O Botão Individual */
.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    
    color: var(--text-light);
    
    font-family: 'Nunito', sans-serif;
    font-size: 11px;
    font-weight: 600;
    
    width: 100%;
    padding: 6px 0; /* Área de toque */
    
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

/* Ícones SVG */
.nav-item svg {
    width: 24px;
    height: 24px;
    margin-bottom: 4px;
    stroke-width: 2;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* --- ESTADOS (Hover/Active) --- */
.nav-item:hover {
    color: var(--verde-floresta);
    background-color: rgba(26, 77, 46, 0.03);
    border-radius: 16px; /* Arredondamento do botão de toque */
}

.nav-item.active {
    color: var(--verde-floresta);
    font-weight: 800;
}

.nav-item.active svg {
    transform: translateY(-6px);
    stroke-width: 2.5;
    filter: drop-shadow(0 4px 6px rgba(26, 77, 46, 0.2));
    color: var(--caju-orange);
    stroke: var(--caju-orange);
}

/* Indicador de Aba Ativa (Pontinho) */
.nav-item.active::after {
    content: '';
    display: block;
    width: 4px;
    height: 4px;
    background-color: var(--verde-floresta);
    border-radius: 50%;
    position: absolute;
    bottom: 6px;
    opacity: 0;
    animation: fadeInDot 0.3s forwards;
}

@keyframes fadeInDot {
    to { opacity: 1; transform: translateY(0); }
}

/* Ajustes para telas pequenas */
@media (max-height: 600px) {
    .bottom-navbar {
        padding-top: 6px;
    }
    .nav-item svg {
        width: 20px;
        height: 20px;
    }
}