/* ─────────────────────────────────────────────────────────────────────────
   Mobile dock nav — F5.17.B
   Bottom fixed dock for mobile (<768px). Five thumb-friendly slots:
   Matches | Predictions | World Cup | DEMO/Plans | Account.
   Hidden on desktop where .app-header__nav suffices.
   Respects iOS safe-area-inset-bottom.
   ───────────────────────────────────────────────────────────────────────── */

.app-dock-nav {
  display: none; /* desktop: hidden, header nav owns primary navigation */
}

@media (max-width: 767px) {
  /* F5.17.c-fix: body-level horizontal-overflow guard. X-only clip doesn't
     affect the Y-axis sticky header. Fixed bg (::before) is viewport-
     relative so it's not clipped either. */
  .app-shell { overflow-x: clip; }

  .app-dock-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 60;
    background: var(--surface-1);
    border-top: 1px solid var(--border-subtle);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom)) 4px;
    justify-content: space-around;
    align-items: stretch;
    gap: 0;
    /* Ensure main content isn't covered — handled by main padding-bottom rule */
  }

  /* Push main content above dock so last content row isn't obscured. */
  .app-main {
    padding-bottom: calc(64px + env(safe-area-inset-bottom));
    /* F5.17.c-fix Karol QA "ucięte po prawej": clip stray horizontal
       overflow on mobile. Safe for the sticky header + LIVE ticker — those
       are SIBLINGS of .app-main in .app-shell, not descendants, so their
       position:sticky is unaffected. overflow-x:clip (not hidden) doesn't
       create a scroll container. */
    overflow-x: clip;
  }

  /* Karol QA 2026-06-05: the footer (News strip + links) is a SIBLING of
     .app-main, so the .app-main padding-bottom above does NOT lift it above the
     fixed dock — the bottom of the News banner was hidden behind the dock until
     you scrolled the page fully down. Give the footer its own dock clearance. */
  .app-footer {
    padding-bottom: calc(var(--space-4) + 64px + env(safe-area-inset-bottom));
  }
}

.app-dock-nav__item {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 6px 4px;
  text-decoration: none;
  color: var(--text-tertiary);
  font-size: 10px;
  line-height: 1.1;
  font-weight: 500;
  border-radius: 8px;
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: color var(--duration-fast) var(--easing-out),
              background var(--duration-fast) var(--easing-out);
  min-height: 48px; /* WCAG touch target */
  -webkit-tap-highlight-color: transparent;
}

.app-dock-nav__item:hover,
.app-dock-nav__item:focus-visible {
  color: var(--text-primary);
  background: var(--surface-2);
  outline: none;
}

.app-dock-nav__item[aria-current="page"] {
  color: var(--accent);
}

.app-dock-nav__icon {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.app-dock-nav__label {
  white-space: nowrap;
  letter-spacing: 0.01em;
}

@media (prefers-reduced-motion: reduce) {
  .app-dock-nav__item { transition: none; }
}
