/* route-drive-mode-v1.css
 *
 * Project Myna — Drive Mode (Phase 3, PR 1: GPS plumbing)
 *
 * Two surfaces:
 *  1. The launcher panel — full-screen modal that explains Drive Mode and
 *     asks for GPS permission via the browser's native prompt.
 *  2. The debug overlay — small floating card top-right showing live GPS
 *     coords + accuracy + speed. Lets you (and curious readers) verify the
 *     stream is flowing. Disappears when Drive Mode stops.
 *
 * Naming scoped under .hg-drive- so nothing leaks to other pages.
 */

/* ─── Launcher modal ──────────────────────────────────────────────── */

.hg-drive-launcher {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999998;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.hg-drive-launcher.is-active { display: flex; }

.hg-drive-launcher-bg {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  cursor: pointer;
}

.hg-drive-launcher-card {
  position: relative;
  z-index: 1;
  background: #fff;
  border-radius: 14px;
  width: 100%;
  max-width: 480px;
  padding: 28px 24px 22px;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
  animation: hgDriveIn .22s ease-out;
  text-align: center;
}
@keyframes hgDriveIn {
  from { opacity: 0; transform: scale(.94) translateY(12px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.hg-drive-launcher-close {
  position: absolute;
  top: 8px;
  right: 12px;
  background: none;
  border: none;
  font-size: 28px;
  line-height: 1;
  color: #aaa;
  cursor: pointer;
  padding: 4px 8px;
  font-family: inherit;
}
.hg-drive-launcher-close:hover { color: #333; }

.hg-drive-launcher-icon {
  font-size: 44px;
  line-height: 1;
  margin-bottom: 8px;
}

.hg-drive-launcher-card h3 {
  margin: 0 0 12px;
  font-size: 22px;
  font-weight: 700;
  color: #222;
  line-height: 1.25;
}

.hg-drive-launcher-lede {
  font-size: 15px;
  line-height: 1.5;
  color: #444;
  margin: 0 0 16px;
}

.hg-drive-launcher-note {
  background: #fef9e7;
  border: 1px solid #f5dca0;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1.45;
  color: #6c5c14;
  margin: 0 0 18px;
  text-align: left;
}
.hg-drive-launcher-note strong {
  color: #4d3f08;
  display: block;
  margin-bottom: 2px;
}

.hg-drive-launcher-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 14px;
}
.hg-drive-launcher-btn-primary,
.hg-drive-launcher-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  padding: 12px 20px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  -webkit-appearance: none;
  appearance: none;
  transition: opacity .15s ease, transform .15s ease;
}
.hg-drive-launcher-btn-primary {
  background: #1866B4;
  color: #fff;
  box-shadow: 0 3px 10px rgba(24,102,180,.3);
}
.hg-drive-launcher-btn-primary:hover { opacity: .92; }
.hg-drive-launcher-btn-primary:active { transform: scale(.97); }
.hg-drive-launcher-btn-secondary {
  background: #f0f0f0;
  color: #444;
}
.hg-drive-launcher-btn-secondary:hover { background: #e6e6e6; }

.hg-drive-launcher-fineprint {
  font-size: 11px;
  color: #888;
  margin: 0;
  line-height: 1.4;
}
.hg-drive-launcher-fineprint a {
  color: #888;
  text-decoration: underline;
}

@media (max-width: 480px) {
  .hg-drive-launcher-card {
    padding: 24px 18px 18px;
  }
  .hg-drive-launcher-card h3 { font-size: 19px; }
  .hg-drive-launcher-lede { font-size: 14px; }
  .hg-drive-launcher-btn-primary,
  .hg-drive-launcher-btn-secondary {
    padding: 11px 16px;
    font-size: 14px;
    flex: 1 1 auto;
  }
}

/* ─── Debug overlay (top-right floating card) ─────────────────────── */

.hg-drive-overlay {
  display: none;
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 999990;
  background: rgba(20, 22, 28, 0.92);
  color: #fff;
  border-radius: 10px;
  padding: 10px 12px;
  font-family: 'SFMono-Regular', Menlo, Consolas, monospace;
  font-size: 11px;
  line-height: 1.35;
  width: 220px;
  box-shadow: 0 6px 20px rgba(0,0,0,.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: hgDriveOverlayIn .25s ease-out;
}
.hg-drive-overlay.is-active { display: block; }
@keyframes hgDriveOverlayIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hg-drive-overlay-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 7px;
  margin-bottom: 7px;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.hg-drive-overlay-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: #e8e8e8;
  flex: 1;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.hg-drive-overlay-icon {
  font-size: 13px;
  font-family: inherit;
}
.hg-drive-status-badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 2px 6px;
  border-radius: 4px;
  background: #555;
  color: #fff;
  text-transform: uppercase;
}
.hg-drive-status-badge.is-live {
  background: #2ecc71;
  animation: hgDrivePulse 2s ease-in-out infinite;
}
@keyframes hgDrivePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(46,204,113,.45); }
  50%      { box-shadow: 0 0 0 5px rgba(46,204,113,0); }
}
.hg-drive-status-badge.is-searching {
  background: #f39c12;
}
.hg-drive-status-badge.is-error,
.hg-drive-status-badge.is-denied {
  background: #e74c3c;
}
.hg-drive-overlay-close {
  background: none;
  border: none;
  color: #aaa;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
  font-family: inherit;
}
.hg-drive-overlay-close:hover { color: #fff; }

.hg-drive-overlay-grid {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.hg-drive-overlay-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.hg-drive-readout-key {
  color: #888;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.3px;
  flex: 0 0 auto;
}
.hg-drive-readout-val {
  color: #fff;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  flex: 1;
  text-align: right;
}

.hg-drive-overlay-footer {
  margin-top: 7px;
  padding-top: 6px;
  border-top: 1px solid rgba(255,255,255,.08);
  font-size: 10px;
  color: #888;
  line-height: 1.35;
}

@media (max-width: 480px) {
  .hg-drive-overlay {
    width: calc(100% - 24px);
    top: 8px;
    right: 12px;
  }
}

/* ─── Hero Drive Mode button — drop the "coming soon" feel ─────────── */

#hg-myna-hero-drive-btn small {
  /* JS strips this on init; keep CSS fallback so any page that hasn't
     deployed the new JS still hides the dated subtitle. */
  display: none;
}

@media print {
  .hg-drive-launcher,
  .hg-drive-overlay {
    display: none !important;
  }
}
