/* WeatherDuck app tab bar and in-app chrome, iOS shell only.
   Everything here is scoped to html.wd-in-native, which site-pwa.php sets
   only when the Capacitor bridge is present. Phone browsers, the Android
   app and home-screen installs never match. The bar markup carries the
   hidden attribute, so it stays hidden everywhere else even if this file
   fails to load. Agreed from mockups/app-tab-bar-draft.html (1 Dec 2026). */

/* === Bar === */

html.wd-in-native .wd-appbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  background: var(--wd-chrome);
  border-top: 1px solid var(--wd-chrome-border);
}

html.wd-in-native .wd-appbar .wd-appbar__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--wd-space-xs);
  min-height: 56px;
  padding: var(--wd-space-sm) var(--wd-space-xs);
  background: none;
  color: var(--wd-text-on-dark-subtle);
  font-size: var(--wd-font-size-xs);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

html.wd-in-native .wd-appbar .wd-appbar__item:hover,
html.wd-in-native .wd-appbar .wd-appbar__item:focus {
  background: none;
  color: var(--wd-text-on-dark-muted);
}

html.wd-in-native .wd-appbar .wd-appbar__item.is-active {
  color: var(--wd-cta);
}

.wd-appbar__icon {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Fills the cloud so the sun behind it reads as behind. */
.wd-appbar__mask {
  fill: var(--wd-chrome);
}

/* === Page around the bar === */

/* Room under the content so the last card never sits behind the bar, and
   clear of the notch when an iPhone is turned sideways. */
html.wd-in-native body {
  padding: 0 env(safe-area-inset-right) calc(56px + env(safe-area-inset-bottom)) env(safe-area-inset-left);
}

/* The shell draws edge to edge (viewport-fit=cover), so the sticky header
   grows by the status bar height and stays green behind the clock. */
html.wd-in-native .wd-sitebar {
  padding-top: env(safe-area-inset-top);
}

/* The marketing footer and the Proof it works menu link stay on the
   website; the bar does their job in the app. */
html.wd-in-native .wd-footer,
html.wd-in-native .wd-sitebar__popover a[href*="/category/forecast-verification/"] {
  display: none;
}
