/* ==========================================================================
   AUTOKEY MOBILE FLOATING DOCK (MENU DE NAVEGAÇÃO INFERIOR GLOBAL)
   Estilo esportivo / dark glass flutuante com bordas arredondadas
   ========================================================================== */

/* Escondido por padrão no desktop */
.mobile-bottom-dock {
  display: none !important;
}

@media (max-width: 768px) {
  /* Espaçamento inferior nas páginas para não cobrir botões nem conteúdo */
  body.has-mobile-dock,
  body.has-mobile-dock .page,
  body.has-mobile-dock .maq-page,
  body.has-mobile-dock .autokey-main,
  body.has-mobile-dock .autokey-footer {
    padding-bottom: calc(95px + env(safe-area-inset-bottom, 20px)) !important;
  }

  /* Dock Flutuante Arredondado com efeito Dark Glass */
  .mobile-bottom-dock {
    display: flex !important;
    align-items: center;
    justify-content: space-around;
    position: fixed;
    left: 12px;
    right: 12px;
    max-width: 440px;
    margin: 0 auto;
    bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    height: 58px;
    padding: 0 0.4rem;
    background: rgba(22, 26, 30, 0.85);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 9999px;
    box-shadow: 0 16px 36px -6px rgba(0, 0, 0, 0.45), 0 4px 12px -2px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    z-index: 10000;
    transform: translate3d(0, 0, 0);
    will-change: transform;
    box-sizing: border-box;
    -webkit-user-select: none;
    user-select: none;
  }

  .mobile-dock-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    flex: 1 1 0;
    min-width: 0;
    height: 100%;
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    -webkit-tap-highlight-color: transparent;
    transition: color 0.15s ease, transform 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  }

  .mobile-dock-item svg {
    width: 19px;
    height: 19px;
    stroke: currentColor;
    stroke-width: 2.2;
    transition: transform 0.15s ease, stroke 0.15s ease;
  }

  .mobile-dock-icon-kd,
  .mobile-dock-icon-vehicle,
  .mobile-dock-icon-km100,
  .mobile-dock-icon-pdfs,
  .mobile-dock-icon-home {
    display: block;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    object-fit: contain;
    transition: filter 0.15s ease;
  }

  /* Micro-interação de toque elástico */
  .mobile-dock-item:active {
    transform: scale(0.9);
  }

  /* Estado Ativo: Branco com Brilho Vermelho Autokey */
  .mobile-dock-item.active {
    color: #ffffff;
  }

  .mobile-dock-item.active svg {
    stroke: #d9040a;
    filter: drop-shadow(0 0 6px rgba(217, 4, 10, 0.6));
  }

  .mobile-dock-item.active .mobile-dock-icon-kd,
  .mobile-dock-item.active .mobile-dock-icon-vehicle,
  .mobile-dock-item.active .mobile-dock-icon-km100,
  .mobile-dock-item.active .mobile-dock-icon-pdfs,
  .mobile-dock-item.active .mobile-dock-icon-home {
    filter: brightness(1.08) drop-shadow(0 0 4px rgba(217, 4, 10, 0.6));
  }

  /* Destaque sutil no item de Suporte */
  .mobile-dock-item-suporte {
    color: #86efac;
  }

  .mobile-dock-item-suporte svg {
    stroke: #22c55e;
  }

  .mobile-dock-item-suporte.active svg {
    filter: drop-shadow(0 0 6px rgba(34, 197, 94, 0.6));
  }
}

