/* rider.css — the rider app's frame (rider-nav.js): sticky header with a menu button, a two-tab bar
   for the everyday pages (Ride, My trips) and a menu drawer for the rest. Same tokens, icons and
   current-page treatment as the admin console's tree menu, so large-text and high-contrast keep working. */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
body.nav-on { --top: 56px; }
header.rider-top { position: sticky; top: 0; z-index: 60; min-height: var(--top, 56px); padding: 8px 16px; }
header.rider-top .nav-toggle { background: transparent; color: #fff; padding: 6px; min-height: 44px; min-width: 44px;
  display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; margin-left: -8px; }
header.rider-top .nav-toggle:hover, body.drawer-open header.rider-top .nav-toggle { background: rgba(255,255,255,.16); }
@media (max-width: 520px) { header.rider-top .tag { display: none; } }

/* tab bar — the two everyday pages, under the header */
nav.tabs { position: sticky; top: var(--top, 56px); z-index: 30; display: flex; justify-content: center; background: var(--card);
  border-bottom: 1px solid var(--line); box-shadow: 0 1px 2px rgba(34,26,51,.06); }
nav.tabs .tab { flex: 1 1 0; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px;
  max-width: 360px; color: var(--muted); font-weight: 700; text-decoration: none; border-bottom: 3px solid transparent; }
nav.tabs .tab svg { width: 20px; height: 20px; flex: none; }
nav.tabs .tab:hover { color: var(--ink); background: var(--bg); }
nav.tabs .tab[aria-current="page"] { color: var(--brand); border-bottom-color: var(--brand); }
nav.tabs .tab:focus-visible { outline: 3px solid #1a7fb8; outline-offset: -3px; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 3px #e6f4ee; }

/* pages: rider-nav.js shows one page's cards at a time */
section.off { display: none !important; }
body.nav-on .card > h2:focus { outline: none; }

/* menu drawer — slides in from the left like the admin console's menu on a phone */
.scrim { position: fixed; inset: 0; background: rgba(20,12,35,.4); z-index: 70; }
.drawer { position: fixed; top: 0; left: 0; bottom: 0; z-index: 80; width: min(320px, 86vw); background: var(--card);
  box-shadow: 2px 0 16px rgba(0,0,0,.18); display: flex; flex-direction: column; overflow-y: auto;
  animation: drawer-in .18s ease-out; }
.drawer[hidden] { display: none; }
@keyframes drawer-in { from { transform: translateX(-100%); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .drawer { animation: none; } }
.drawer-head { display: flex; align-items: center; gap: 8px; padding: 16px 12px 12px 20px; border-bottom: 1px solid var(--line);
  background: var(--brand); color: #fff; }
.drawer-head > div { flex: 1; min-width: 0; }
.drawer-head .muted { color: rgba(255,255,255,.85); }
.drawer-head button { color: #fff; font-size: 18px; min-width: 44px; }
.menu, .menu ul { list-style: none; margin: 0; padding: 0; }
.menu { padding: 8px 8px 0; flex: 1; }
.menu-group { margin-bottom: 6px; }
.menu-head { display: block; padding: 10px 12px 4px; font-size: 12px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--muted); }
.menu-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; min-height: 44px; border-radius: 8px;
  color: var(--ink); text-decoration: none; font-weight: 500; }
.menu-item svg { width: 20px; height: 20px; flex: none; color: var(--muted); }
.menu-item:hover { background: var(--bg); }
.menu-item[aria-current="page"] { background: #f1ebfd; color: var(--brand); font-weight: 700; box-shadow: inset 3px 0 0 var(--brand); }
.menu-item[aria-current="page"] svg { color: var(--brand); }
.menu-item:focus-visible { outline: 3px solid #1a7fb8; outline-offset: -2px; }
.drawer-foot { padding: 12px 20px 84px; /* clears the floating accessibility bar */ border-top: 1px solid var(--line); }
.drawer-foot button { width: 100%; }
body.drawer-open { overflow: hidden; }
body.drawer-open #a11y { z-index: 90; }

body.contrast nav.tabs .tab[aria-current="page"] { outline: 2px solid var(--brand); outline-offset: -2px; }
body.contrast .menu-item[aria-current="page"] { background: #fff; outline: 2px solid var(--brand); }
