/* hymaps-offline.css — offline positioning + tile-cache UI (additive, theme-aware)
 * ──────────────────────────────────────────────────────────────────────────
 * Styles for window.hyMapsOffline: estimated (dead-reckoning) puck, growing
 * uncertainty ring, offline banner, "Estimated location" badge, and the small
 * control pills ("Download this area" / "Enable motion sensors").
 *
 * NO hardcoded brand colors — everything resolves to Hypatia theme tokens with
 * safe fallbacks so it works on any theme. iOS-glass look to match hyMaps.
 */

/* ── estimated location puck (dead-reckoning) ───────────────────────────── */
.hm-est-puck {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--warning, #fad015);
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, .55));
  animation: hm-est-pulse 1.6s ease-in-out infinite;
}
.hm-est-puck iconify-icon { font-size: 26px; }
@keyframes hm-est-pulse {
  0%, 100% { opacity: .65; transform: scale(.94); }
  50%      { opacity: 1;   transform: scale(1.06); }
}

/* dim the live GPS puck while we are coasting on an estimate */
.hm-me-marker.hm-coasting { opacity: .32; filter: grayscale(.6); }

/* ── growing uncertainty ring ───────────────────────────────────────────── */
.hm-uncert-ring {
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 1.5px solid var(--warning, #fad015);
  background: color-mix(in srgb, var(--warning, #fad015) 14%, transparent);
  pointer-events: none;
  animation: hm-uncert-breathe 2.4s ease-in-out infinite;
}
@keyframes hm-uncert-breathe {
  0%, 100% { opacity: .55; }
  50%      { opacity: .85; }
}

/* ── "Estimated location (offline)" badge ───────────────────────────────── */
.hm-est-badge {
  position: fixed;
  left: 50%;
  top: calc(env(safe-area-inset-top, 0px) + 60px);
  transform: translateX(-50%);
  z-index: 5800;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 92vw;
  padding: 7px 13px;
  border-radius: 13px;
  font: 600 12px/1.3 -apple-system, system-ui, sans-serif;
  color: var(--text, #e8fff6);
  background: var(--bg-card, rgba(8, 12, 10, .94));
  border: 1px solid var(--warning, #fad015);
  box-shadow: 0 8px 26px rgba(0, 0, 0, .42);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
}
.hm-est-badge iconify-icon { color: var(--warning, #fad015); flex: none; font-size: 18px; }

/* ── offline banner ─────────────────────────────────────────────────────── */
.hm-offline-banner {
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 92px);
  transform: translateX(-50%);
  z-index: 5800;
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: 92vw;
  padding: 9px 14px;
  border-radius: 14px;
  font: 600 12px/1.35 -apple-system, system-ui, sans-serif;
  color: var(--text, #e8fff6);
  background: var(--bg-card, rgba(8, 12, 10, .96));
  border: 1px solid var(--danger, #ff4d6d);
  box-shadow: 0 8px 30px rgba(0, 0, 0, .45);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
}
.hm-offline-banner iconify-icon { color: var(--danger, #ff4d6d); flex: none; font-size: 20px; }

/* ── control pills (download area / enable sensors) ─────────────────────── */
.hm-off-ctrls {
  position: fixed;
  left: calc(env(safe-area-inset-left, 0px) + 12px);
  bottom: calc(env(safe-area-inset-bottom, 0px) + 110px);
  z-index: 5600;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}
.hm-off-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  border: 1px solid var(--accent, #00ffa3);
  border-radius: 999px;
  font: 700 12px/1 -apple-system, system-ui, sans-serif;
  color: var(--text, #e8fff6);
  background: var(--bg-card, rgba(8, 12, 10, .9));
  box-shadow: 0 6px 20px rgba(0, 0, 0, .4);
  cursor: pointer;
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  transition: transform .12s ease, opacity .12s ease;
}
.hm-off-pill:active { transform: scale(.96); }
.hm-off-pill[disabled] { opacity: .55; cursor: default; }
.hm-off-pill iconify-icon { color: var(--accent, #00ffa3); font-size: 17px; flex: none; }
.hm-off-pill .hm-off-prog { font-weight: 600; opacity: .85; }
