/* Barra de navegação de baixo (inc/tabbar.php). Só vale abaixo de 768px: o arquivo é carregado com media="(max-width: 768px)". */

.ct-tabbar {
    --ct-tabbar-h: calc(64px + env(safe-area-inset-bottom, 0px));
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9000;
    display: grid;
    grid-template-columns: repeat(var(--ct-tabbar-n, 5), minmax(0, 1fr));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: #fff;
    border-top: 1px solid #e2e5ea;
}

.ct-tabbar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    height: 64px;
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    color: #5b6472;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

.ct-tabbar-item i { font-size: 22px; }
.ct-tabbar-item:active { background: #f3f5f8; }
.ct-tabbar-item.is-ativo { color: #17191d; }
.ct-tabbar-item.is-ativo i { color: var(--marca-acento, #c0261c); }

/* O que fica no rodapé da tela precisa subir para não ficar atrás da barra, e o fim da página ganha o espaço dela. */
body.tem-tabbar { padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
body.tem-tabbar .ct-share-fixo { bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
body.tem-tabbar .ct-cookie-consent { bottom: calc(64px + env(safe-area-inset-bottom, 0px) + 12px) !important; }
body.tem-tabbar .ct-aviso-credito { bottom: calc(64px + env(safe-area-inset-bottom, 0px) + 12px); }

/* Recolhe ao rolar para baixo; a barra de compartilhar da matéria desce junto e ocupa o lugar dela. */
.ct-tabbar { transition: transform .22s ease; }
body.tabbar-oculta .ct-tabbar { transform: translateY(100%); }
body.tem-tabbar .ct-share-fixo { transition: bottom .22s ease; }
body.tem-tabbar.tabbar-oculta .ct-share-fixo { bottom: 0; }
@media (prefers-reduced-motion: reduce) {
    .ct-tabbar, body.tem-tabbar .ct-share-fixo { transition: none; }
}
