/* Mobile bottom navigation (<=800px). Desktop is unchanged: the dock is hidden and the header keeps its controls. */

.m-dock {
  display: none;
}

@media (max-width: 800px) {
  /* One fixed bar at the bottom: menu, previous, slide/next, language, notes. */
  .m-dock {
    display: grid;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 45;
    height: calc(64px + env(safe-area-inset-bottom, 0px));
    padding: 0 env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
    grid-template-columns: repeat(5, minmax(0, 1fr));
    background: #030d14;
    border-top: 1px solid rgba(142, 219, 200, 0.2);
    box-sizing: border-box;
  }

  .m-dock-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-width: 44px;
    min-height: 44px;
    padding: 6px 2px;
    background: transparent;
    border: 0;
    border-left: 1px solid rgba(142, 219, 200, 0.1);
    color: var(--muted);
    font: 500 9.5px/1 var(--mono);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .m-dock-btn:first-child {
    border-left: 0;
  }

  .m-dock-ico {
    font-size: 15px;
    line-height: 1;
  }

  .m-dock-pos {
    font-size: 11px;
    line-height: 1;
    color: var(--text);
  }

  .m-dock-lang {
    font-size: 11px;
  }

  .m-dock-btn[aria-expanded="true"],
  .m-dock-lang:hover,
  .m-dock-btn:hover {
    color: var(--mint);
  }

  .m-dock-btn:disabled {
    opacity: 0.32;
    cursor: default;
  }

  .m-dock-btn:focus-visible {
    outline: 1px solid var(--mint);
    outline-offset: -4px;
  }

  /* The dock replaces the floating slide controls and the header controls on phones. */
  .slide-controls,
  .locale-controls,
  .notes-toggle,
  .menu-toggle,
  .topbar-meta,
  .topbar-meta + .topbar-line {
    display: none !important;
  }

  /* Keep the slide content clear of the bar. */
  main#presentation > .section {
    padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)) !important;
  }

  /* Menu and notes sit above the content and never under the bar. */
  .mobile-menu {
    inset: 64px 0 calc(64px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .speaker-notes-panel {
    bottom: calc(72px + env(safe-area-inset-bottom, 0px)) !important;
  }
}
