/* GFGF Driver Live Map — enhancement styles (shipped by the gfgf-driver-map mu-plugin). */

/* Hero base + map colours. */
body.gd-map-upgraded #gd-map-wrap{ background:#0D0D0D; }
body.gd-map-upgraded #gd-map{ width:100%; height:100%; }
.leaflet-container{ background:#0D0D0D!important; font-family:inherit; }
.leaflet-control-attribution{ background:rgba(13,13,13,.5)!important; color:#555!important; font-size:9px!important; }
.leaflet-control-attribution a{ color:#6a6a6a!important; }

/* offline overlay covers the full map — center it nicely */
body.gd-map-upgraded #gd-map-offline{ z-index:9; }

/* pulsing demand hotspots */
.gd-hot{ animation:gdhot 3.2s ease-in-out infinite; }
@keyframes gdhot{ 0%,100%{opacity:.10} 50%{opacity:.30} }

/* live driver puck */
.gdx-puck{ position:relative; width:30px; height:30px; }
.gdx-puck .core{ position:absolute; top:50%; left:50%; width:20px; height:20px; transform:translate(-50%,-50%);
  border-radius:50%; background:radial-gradient(circle at 40% 35%,#4da3ff,#2f80ff 70%); border:2.5px solid #fff;
  box-shadow:0 0 0 2px rgba(47,128,255,.35),0 4px 12px rgba(0,0,0,.6); }
.gdx-puck .ping{ position:absolute; top:50%; left:50%; width:20px; height:20px; transform:translate(-50%,-50%);
  border-radius:50%; background:rgba(47,128,255,.45); animation:gdping 2.4s ease-out infinite; }
@keyframes gdping{ 0%{opacity:.5;transform:translate(-50%,-50%) scale(1)} 100%{opacity:0;transform:translate(-50%,-50%) scale(4.2)} }

/* recenter control — high-contrast so it reads on a dark map */
.gdx-recenter{ position:absolute; bottom:88px; right:14px; z-index:12; width:46px; height:46px; border-radius:50%;
  background:#ffffff; border:none; padding:0; display:flex; align-items:center; justify-content:center;
  cursor:pointer; box-shadow:0 4px 14px rgba(0,0,0,.55),0 0 0 1px rgba(0,0,0,.15); }
.gdx-recenter svg{ width:23px; height:23px; fill:#2f80ff; display:block; }
.gdx-recenter:active{ transform:scale(.93); }
.gdx-recenter:focus-visible{ outline:3px solid #2f80ff; outline-offset:2px; }

/* glassy status pill (reskin the existing #gd-status-pill in place) */
body.gd-map-upgraded #gd-statusbar{ background:rgba(13,13,13,.86)!important; -webkit-backdrop-filter:blur(14px); backdrop-filter:blur(14px); border-bottom:1px solid rgba(255,255,255,.06)!important; }
body.gd-map-upgraded #gd-status-pill{ -webkit-backdrop-filter:blur(12px); backdrop-filter:blur(12px); box-shadow:0 4px 16px rgba(0,0,0,.4); }
body.gd-map-upgraded #gd-status-pill.online #gd-sdot{ box-shadow:0 0 0 0 rgba(0,200,81,.6); animation:gdx-live 2s infinite; }
@keyframes gdx-live{ 0%{box-shadow:0 0 0 0 rgba(0,200,81,.55)} 70%{box-shadow:0 0 0 8px rgba(0,200,81,0)} 100%{box-shadow:0 0 0 0 rgba(0,200,81,0)} }

/* "Looking for orders…" radar dock */
.gdx-dock{ position:absolute; left:12px; right:12px; bottom:14px; z-index:11; display:none; align-items:center; gap:14px;
  padding:14px 16px; border-radius:20px; background:linear-gradient(180deg,rgba(27,27,27,.94),rgba(16,16,16,.96));
  border:1px solid var(--border,#2A2A2A); box-shadow:0 12px 40px rgba(0,0,0,.55); -webkit-backdrop-filter:blur(18px); backdrop-filter:blur(18px); }
.gdx-dock.show{ display:flex; }
.gdx-radar{ width:42px; height:42px; border-radius:50%; flex:none; position:relative;
  background:radial-gradient(circle,rgba(0,200,81,.18),transparent 70%); }
.gdx-radar::before,.gdx-radar::after{ content:""; position:absolute; inset:0; border-radius:50%;
  border:2px solid rgba(0,200,81,.5); animation:gdx-radar 2.4s ease-out infinite; }
.gdx-radar::after{ animation-delay:1.2s; }
@keyframes gdx-radar{ 0%{transform:scale(.4);opacity:.9} 100%{transform:scale(1.15);opacity:0} }
.gdx-dock-title{ font-size:15px; font-weight:800; color:#fff; }
.gdx-dock-sub{ font-size:12px; color:var(--grey,#777); font-weight:600; margin-top:2px; line-height:1.35; }

/* ============================================================================
   UBER-STYLE APP SHELL — fixed top, full-bleed map, pull-up bottom sheet.
   Scoped to the driver dashboard only (body.gd-map-upgraded / #gd). Added 2026-07-15.
   ============================================================================ */

/* The dashboard owns the whole viewport, edge to edge — no theme margins, no page scroll. */
body.gd-map-upgraded{ margin:0!important; overflow:hidden!important; }
body.gd-map-upgraded #wpadminbar{ display:none!important; }
html.gd-dash-lock{ overflow:hidden!important; margin-top:0!important; }

/* App shell: full viewport, vertical flex. */
body.gd-map-upgraded #gd{
  position:fixed!important; inset:0!important;
  width:100vw!important; max-width:none!important;
  height:100vh!important;    /* fallback */
  height:100svh!important;   /* SMALL viewport — always fits above the browser's top+bottom bars,
                                so the bottom sheet peek is never hidden behind mobile chrome. */
  margin:0!important; padding:0!important; border:0!important;
  display:flex!important; flex-direction:column!important;
  background:#0D0D0D!important; overflow:hidden!important; z-index:100;
}

/* Fixed top region: status bar (+ stripe banner + earnings), natural height. */
body.gd-map-upgraded #gd-statusbar,
body.gd-map-upgraded #gd-stripe-banner,
body.gd-map-upgraded #gd-earn-strip{ flex:0 0 auto!important; position:relative!important; z-index:30; margin:0!important; width:100%!important; box-sizing:border-box; }
body.gd-map-upgraded #gd-earn-strip{ padding:10px 12px!important; }
/* Inside the native app the Android status bar overlays the top of the page (2026-10-21: the clock
   sat on top of "Charles"). Push the header below it. */
html.gfgf-native body.gd-map-upgraded #gd-statusbar{ padding-top:max(env(safe-area-inset-top,0px),36px)!important; }

/* Map fills all remaining space, edge to edge.
   isolation:isolate CONTAINS Leaflet's internal panes (z-index 200–800) inside this box, so they
   can't paint over the status bar / bottom sheet / controls that sit outside it. This was the bug:
   without it the map tiles covered the whole bottom sheet and the recenter button. */
body.gd-map-upgraded #gd-map-wrap{
  flex:1 1 auto!important; position:relative!important; isolation:isolate;
  height:auto!important; min-height:0!important; width:100%!important;
  margin:0!important; border-radius:0!important; background:#0D0D0D;
}
body.gd-map-upgraded #gd-map{ position:absolute!important; inset:0!important; width:100%!important; height:100%!important; z-index:1; }
/* Map-internal overlays must sit above Leaflet's panes (which max out ~800). */
body.gd-map-upgraded #gd-map-offline{ position:absolute!important; inset:0!important; z-index:900!important; pointer-events:none; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:6px; }

/* Recenter + waiting dock float above the map (and above the collapsed sheet peek). */
body.gd-map-upgraded .gdx-recenter{ bottom:118px!important; right:16px!important; z-index:1000!important; }
body.gd-map-upgraded .gdx-recenter.locating{ opacity:.55; }
body.gd-map-upgraded .gdx-dock{ bottom:118px!important; left:12px!important; right:76px!important; z-index:1000!important; }

/* ── Bottom sheet ── */
body.gd-map-upgraded #gdx-sheet{
  position:absolute!important; left:0; right:0; bottom:0; z-index:45;
  display:flex; flex-direction:column;
  background:linear-gradient(180deg,#161616,#0F0F0F);
  border-top:1px solid var(--border,#2A2A2A);
  border-radius:20px 20px 0 0;
  box-shadow:0 -14px 44px rgba(0,0,0,.62);
  max-height:88svh;
  padding-bottom:env(safe-area-inset-bottom,0px);
}
#gdx-handle{ flex:0 0 auto; height:30px; border:0; background:transparent; cursor:grab; display:flex; align-items:center; justify-content:center; padding:6px 0 4px; touch-action:none; }
#gdx-handle span{ display:block; width:44px; height:5px; border-radius:100px; background:#5a5a5a; }
#gdx-handle:active{ cursor:grabbing; }
#gdx-sheet-body{ flex:0 1 auto; max-height:0; overflow:hidden; transition:max-height .34s cubic-bezier(.4,0,.2,1); }
#gdx-sheet.expanded #gdx-sheet-body{ max-height:64vh; overflow-y:auto; -webkit-overflow-scrolling:touch; }

/* Tab bar is the always-visible peek at the bottom of the sheet. */
body.gd-map-upgraded #gd-bottom-nav{ position:relative!important; flex:0 0 auto!important; bottom:auto!important; left:auto!important; right:auto!important; width:100%!important; z-index:1;
  /* The fixed-position version centers itself with translateX(-50%); inside the sheet that shift
     pushed half the bar off the left edge ("HELP" showed as "LP", 2026-10-21). */
  transform:none!important; max-width:none!important; }
/* A tapped step button dims while the server confirms (set by api() in the dashboard). */
#gd .gd-step-btn.gd-busy{ opacity:.55; pointer-events:none; }

/* Panels + pickup banner render in normal flow inside the sheet body. */
body.gd-map-upgraded #gd .gd-panel{ position:relative!important; top:auto!important; bottom:auto!important; left:auto!important; right:auto!important; height:auto!important; max-height:none!important; display:none; width:100%!important; box-sizing:border-box; }
body.gd-map-upgraded #gd .gd-panel.active{ display:block; }
body.gd-map-upgraded #gd-pickup-banner{ position:relative!important; }

/* Keep the order-offer modal + toast on top of everything. */
body.gd-map-upgraded #gd-offer-overlay{ position:fixed!important; z-index:9000!important; }
body.gd-map-upgraded #gd-toast{ z-index:9999!important; }

/* ── Felix active-delivery guidance (injected into each order card) ── */
.gdx-felix{ margin-top:12px; padding:12px 14px; border-radius:14px;
  background:linear-gradient(180deg,rgba(37,99,235,.10),rgba(37,99,235,.04));
  border:1px solid rgba(37,99,235,.28); }
.gdx-felix-head{ display:flex; align-items:center; gap:8px; font-size:13px; font-weight:800;
  color:#8ab4ff; margin-bottom:8px; }
.gdx-felix-bot{ font-size:16px; }
.gdx-felix-head span:nth-child(2){ flex:1; }
.gdx-felix-hear{ flex:none; border:1px solid rgba(37,99,235,.5); background:rgba(37,99,235,.16);
  color:#cfe0ff; font-size:12px; font-weight:700; padding:5px 12px; border-radius:100px; cursor:pointer; }
.gdx-felix-hear:active{ transform:scale(.95); }
.gdx-felix-row{ font-size:13px; color:var(--text,#eaeaea); line-height:1.55; padding:3px 0; }
.gdx-felix-row b{ color:#a9c4ff; font-weight:700; }
.gdx-felix-none{ color:var(--grey,#999); }
.gdx-felix-load{ font-size:12.5px; color:#8ab4ff; font-weight:600; display:flex; align-items:center; gap:8px; }
