/* base.css — reset, theme tokens, layout. White-label colors set at runtime. */
:root {
  --color-primary: #1a73e8;
  --color-accent: #34a853;
  font-family: system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
}

/* Use logical properties for RTL readiness from day one. */
#app {
  display: grid;
  block-size: 100dvh;
  inline-size: 100vw;
}

/* Navigation UI overlays the map (search + route summary + status). Logical
   properties keep it RTL-correct; rendered by navigate.js. */
#nav-panel {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 15;
  margin: 12px;
  padding: 8px;
  max-inline-size: 420px;
  background: color-mix(in srgb, white 92%, transparent);
  border-radius: 8px;
  box-shadow: 0 1px 4px rgb(0 0 0 / 25%);
}

#nav-search {
  display: flex;
  gap: 6px;
}

#dest-search {
  flex: 1;
  min-inline-size: 0;
  padding: 8px;
}

#nav-search button {
  background: var(--color-primary);
  color: white;
  border: 0;
  border-radius: 6px;
  padding: 0 12px;
}

#search-results {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  max-block-size: 40dvh;
  overflow-y: auto;
}

#search-results li {
  padding: 8px;
  cursor: pointer;
  border-radius: 6px;
}

#search-results li:hover {
  background: color-mix(in srgb, var(--color-primary) 12%, transparent);
}

#route-summary .offline-badge {
  color: var(--color-accent);
  font-weight: 600;
}

#route-summary .steps {
  max-block-size: 30dvh;
  overflow-y: auto;
}

#gps-indicator {
  color: #946200;
}

#nav-status[data-kind="success"] {
  color: var(--color-accent);
  font-weight: 600;
}

/* QR scan overlay — full-screen camera feed with a cancel button. */
#scan-overlay {
  position: fixed;
  inset: 0;
  z-index: 18;
  background: #000;
}

#scan-overlay #scan-video {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
}

#scan-overlay .scan-close {
  position: absolute;
  inset-block-start: 16px;
  inset-inline-end: 16px;
  z-index: 1;
  padding: 8px 12px;
}

.ar-btn {
  margin-block-start: 8px;
  background: var(--color-accent);
  color: #fff;
  border: 0;
  border-radius: 6px;
  padding: 8px 12px;
}
