/* ============================================================
   Guards' map card chrome + the tabbed main-screen shell,
   on the light "Sentinel" system.

   Google's terms require the logo and attribution to stay
   visible, so they are restyled, never hidden.
   ============================================================ */

/* Safari lets composited map tiles escape overflow + border-radius; clip-path holds. */
.ck-map-wrap { clip-path: inset(0 round var(--gw-r-card, 16px)); }
.ck-map { border-radius: inherit; overflow: hidden; }

/* Under the GPS chip, clear of the Google logo at the bottom left. */
.ck-map-wrap .sync-pill { top: 48px !important; bottom: auto !important; left: 10px; }

/* Live link & offline sync status pill (light) */
.sync-pill {
  background: var(--sd-surface);
  border-color: var(--sd-line);
  color: var(--sd-ink2);
  box-shadow: var(--sd-shadow);
}
.sync-pill:hover { border-color: var(--sd-brand); }
.sync-pill .sync-dot { background: var(--sd-brand); }
.sync-pill.offline {
  border-color: #F0D9A8;
  color: #8A5300;
  background: var(--sd-warn-soft);
}
.sync-pill.offline .sync-dot { background: var(--sd-warn); animation: none; }
.sync-pill.syncing {
  border-color: #C3D6F7;
  color: #1D4ED8;
  background: var(--sd-info-soft);
}
.sync-pill.syncing .sync-dot { background: var(--sd-info); }
.sync-pill.stale .sync-dot { background: var(--sd-warn); animation: none; }

/* Attribution: light and quiet instead of a dark strip. */
.ck-map .gm-style-cc div { background: transparent !important; }
.ck-map .gm-style-cc { background: rgba(255, 255, 255, 0.72) !important; }
.ck-map .gm-style-cc,
.ck-map .gm-style-cc a,
.ck-map .gm-style-cc button,
.ck-map .gm-style-cc span {
  color: rgba(21, 33, 26, 0.62) !important;
  font-size: 10px !important;
}
.ck-map .gm-style-cc a:hover { color: rgba(21, 33, 26, 0.9) !important; }
/* The last item sits inside the card's rounded corner. */
.ck-map .gm-style-cc:last-child > div:last-child { padding-right: 12px !important; }

.ck-status[hidden] { display: none !important; }

/* ── Tabbed main screen ─────────────────────────────────── */
/* #screen-main becomes the tab host: panes scroll, not the screen. */
#screen-main {
  padding: 0;
  overflow: hidden;
}
#screen-main .nf-tabs {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.nf-tabpane {
  display: none;
  flex-direction: column;
  gap: 12px;
  padding: 16px 14px calc(64px + 24px); /* room for the fixed tab bar */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1;
  min-height: 0;
}
.nf-tabpane.active { display: flex; }

/* Bottom tab bar uses the design-system component. JS toggles
   the .active class on the buttons (not aria-selected). */
.sd-tabbar button.active { color: var(--sd-brand-dark); }
.sd-tabbar button svg { width: 22px; height: 22px; }
