/* Menu mobile (sticky footer) · tema "Animado"
   Uma pílula com brilho desliza até o item ativo; o ícone dá um pulo ao chegar.
   Ligado em Sistema → Configurações → Menu Mobile (menu_mobile_tema = animado). */

.sticky-footer-mobile--animado {
    position: fixed;
    isolation: isolate;
}

.sticky-footer-mobile--animado .sticky-footer-item {
    position: relative;
    z-index: 1;
    -webkit-tap-highlight-color: transparent;
}

/* No tema animado quem marca o ativo é a pílula, não o "encolher" do tema clássico */
.sticky-footer-mobile--animado .sticky-footer-item.active,
.sticky-footer-mobile--animado .sticky-footer-item:active,
.sticky-footer-mobile--animado .sticky-footer-item:focus {
    transform: none;
}

.sticky-footer-mobile--animado .sticky-footer-item:active i,
.sticky-footer-mobile--animado .sticky-footer-item:active svg {
    transform: scale(0.88);
}

.sticky-footer-mobile--animado .sticky-footer-item:focus-visible {
    outline: 3px solid #1d4ed8;
    outline-offset: -3px;
    border-radius: 14px;
}

.sticky-footer-mobile--animado .sticky-footer-item.active {
    font-weight: 700;
}

.mm-indicador {
    position: absolute;
    z-index: 0;
    top: 8px;
    bottom: 8px;
    left: 0;
    width: 0;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.07);
    background: color-mix(in srgb, var(--cor-primaria, #2d2b52) 14%, transparent);
    overflow: hidden;
    pointer-events: none;
    opacity: 0;
    will-change: transform, width;
}

.mm-indicador.mm-pronto {
    opacity: 1;
}

.mm-indicador.mm-desliza {
    transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1), width 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

/* O brilho: uma faixa clara que cruza a pílula uma vez, a cada chegada */
.mm-indicador::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.85) 50%, transparent 70%);
    transform: translateX(-120%);
}

.mm-indicador.mm-brilho::after {
    animation: mm-brilho 0.7s 0.1s ease-out forwards;
}

@keyframes mm-brilho {
    to {
        transform: translateX(120%);
    }
}

.sticky-footer-mobile--animado .sticky-footer-item.mm-pulo i,
.sticky-footer-mobile--animado .sticky-footer-item.mm-pulo svg {
    animation: mm-pulo 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes mm-pulo {
    0% {
        transform: scale(0.8) translateY(2px);
    }

    60% {
        transform: scale(1.18) translateY(-3px);
    }

    100% {
        transform: scale(1) translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .mm-indicador.mm-desliza {
        transition: none;
    }

    .mm-indicador.mm-brilho::after,
    .sticky-footer-mobile--animado .sticky-footer-item.mm-pulo i,
    .sticky-footer-mobile--animado .sticky-footer-item.mm-pulo svg {
        animation: none;
    }
}

/* ===== Vidro líquido ("gloss" do iPhone / Instagram) =====
   Barra translúcida que desfoca e realça as cores do que passa por trás, com borda de luz,
   reflexo no topo e sombra suave. A pílula do item ativo também é de vidro. */
.sticky-footer-mobile--animado {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.62) 0%, rgba(255, 255, 255, 0.26) 55%, rgba(255, 255, 255, 0.4) 100%);
    -webkit-backdrop-filter: blur(22px) saturate(190%) brightness(1.06);
    backdrop-filter: blur(22px) saturate(190%) brightness(1.06);
    border: 0;
    border-radius: 26px;
    box-shadow:
        inset 0 1.5px 0 rgba(255, 255, 255, 0.95),
        inset 0 -1px 0 rgba(255, 255, 255, 0.35),
        inset 0 0 18px rgba(255, 255, 255, 0.28),
        0 0 0 0.5px rgba(15, 23, 42, 0.1),
        0 12px 30px rgba(15, 23, 42, 0.2),
        0 3px 8px rgba(15, 23, 42, 0.08);
}

/* Reflexo: uma luz curva na metade de cima */
.sticky-footer-mobile--animado::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0.14) 36%, rgba(255, 255, 255, 0) 52%);
    pointer-events: none;
}

/* Borda de luz: mais forte no canto de cima à esquerda e embaixo à direita, como o vidro de verdade */
.sticky-footer-mobile--animado::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    padding: 1.25px;
    border-radius: inherit;
    background: linear-gradient(155deg, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0.15) 32%, rgba(255, 255, 255, 0.1) 62%, rgba(255, 255, 255, 0.85) 100%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
    pointer-events: none;
}

/* Pílula do item ativo: um segundo vidro, mais claro, com sua própria luz */
.sticky-footer-mobile--animado .mm-indicador {
    top: 7px;
    bottom: 7px;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.78) 0%, rgba(255, 255, 255, 0.34) 100%);
    background-color: color-mix(in srgb, var(--cor-primaria, #2d2b52) 10%, transparent);
    background-blend-mode: normal;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 1),
        inset 0 -1px 0 rgba(255, 255, 255, 0.4),
        0 0 0 0.5px rgba(15, 23, 42, 0.08),
        0 4px 12px rgba(15, 23, 42, 0.14);
}

/* Itens com mais contraste sobre o vidro */
.sticky-footer-mobile--animado .sticky-footer-item {
    color: #334155;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55);
}

.sticky-footer-mobile--animado .sticky-footer-item.active {
    color: var(--cor-primaria, #2d2b52);
}

/* Navegadores sem desfoque de fundo: fica quase opaco para não perder a leitura */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .sticky-footer-mobile--animado {
        background: rgba(255, 255, 255, 0.94);
    }
}

/* Quem pede menos transparência no sistema recebe a barra sólida */
@media (prefers-reduced-transparency: reduce) {
    .sticky-footer-mobile--animado {
        background: #ffffff;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }
}
