body.map-c-driver-active #driverMapActions .driver-bottom-sheet,
body.map-c-customer-active #customerTracking .approved-customer-dock {
  --trip-line:#356b8a;
  --trip-accent:#adee3c;
  --trip-cyan:#4acde7;
  --trip-button:linear-gradient(#175b82,#12486d);
  --trip-edge:#5aa6c7;
  background:linear-gradient(150deg,#0b2941,#011725 78%) !important;
  border:1px solid var(--trip-line);
  color:#f6fbff;
}
body.map-c-driver-active #driverMapActions .driver-bottom-sheet {
  max-height:max(95px,calc(100dvh - var(--driver-hud-edge,160px) - var(--driver-nav-height,64px) - 16px));
}
#driverMapActions .driver-sheet-action-row {flex-shrink:0}
#driverMapActions .driver-sheet-action-simple {grid-template-columns:minmax(0,1fr)}
#driverMapActions .driver-sheet-toggle {touch-action:pan-x}
#driverMapActions .driver-compact-expand {
  flex-basis:auto;min-width:78px;padding:8px;border:1px solid var(--trip-edge);
  border-radius:11px;background:var(--trip-button);color:#fff;
}
body.map-c-driver-active #driverMapActions .driver-bottom-sheet:not(.driver-sheet-collapsed) .driver-current-summary {display:none}
body.map-c-driver-active #driverMapActions .driver-bottom-sheet:not(.driver-sheet-collapsed) .driver-sheet-toggle {justify-content:flex-end}
body.map-c-driver-active #driverSheetDetails .driver-sheet-addresses {grid-template-columns:minmax(0,1fr)}
body.map-c-driver-active #driverSheetDetails .driver-sheet-addresses > div + div {border-left:0;padding:7px 0 0;border-top:1px solid var(--trip-line)}
#driverMapActions .driver-sheet-addresses > div:first-child small {color:var(--trip-accent)}
#driverMapActions .driver-sheet-addresses > div + div small {color:var(--trip-cyan)}
#driverMapActions .driver-sheet-avatar,#customerTracking .trip-driver-avatar {
  position:relative;display:grid;place-items:center;flex:0 0 44px;width:44px;height:44px;
  overflow:hidden;background:#193d53;border:1px solid var(--trip-accent);border-radius:50%;
}
#customerTracking .trip-driver-avatar img {position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
#customerTracking .trip-driver,#customerTracking .trip-vehicle {display:flex;align-items:center;gap:10px;margin:7px 0}
#customerTracking .trip-driver strong {font-size:18px}
#customerTracking .trip-driver-rating {display:block;color:var(--trip-accent)}
#customerTracking .trip-vehicle small {display:block}
#customerTracking .trip-plate {width:fit-content;margin-top:4px;padding:2px 7px;border:1px solid var(--trip-cyan);border-radius:8px}
body.map-c-customer-active #customerTracking .passenger-arrival-readable {
  display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:center;gap:6px;
  padding:6px 0;border-bottom:1px solid var(--trip-line);
}
body.map-c-customer-active #customerTracking .passenger-arrival-readable > small {padding-left:8px;border-left:1px solid var(--trip-line)}
body.map-c-customer-active #customerTracking .passenger-arrival-readable > strong:only-child {grid-column:1/-1}
.trip-panel-options {margin:7px 0}
.trip-panel-options > summary,
#driverMapActions :is(.driver-sheet-tools button,.driver-sheet-contact button,.trip-panel-option-grid button,.driver-sheet-history > summary),
body.map-c-customer-active #passengerSheetDetails :is(.active-ride-actions button,.passenger-contact-actions button,.passenger-another-ride) {
  background:var(--trip-button) !important;color:#fff !important;border:1px solid var(--trip-edge) !important;
  border-radius:11px;min-height:44px;padding:8px;font-weight:700;
}
.trip-panel-options > summary,.driver-sheet-history > summary {display:flex;align-items:center;justify-content:space-between;cursor:pointer}
.trip-panel-options > summary::after {content:'+'}
.trip-panel-options[open] > summary::after {content:'−'}
.trip-panel-option-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin:7px 0}
#driverMapActions .driver-sheet-history {min-width:0}
.trip-panel-option-grid > button {overflow-wrap:anywhere}
.trip-panel-safety {display:flex;align-items:center;justify-content:space-between;gap:5px;margin-top:5px}
.trip-panel-safety.driver-trip-safety {justify-content:flex-end;flex-shrink:0;margin:0 8px 5px}
#customerTracking .trip-panel-safety button {background:transparent;color:#f6fbff;padding:4px}
#customerTracking .trip-panel-safety button:first-child {color:var(--trip-accent)}
.trip-panel-sos,#driverMapActions .driver-sheet-cancel,
body.map-c-customer-active #passengerSheetDetails button.passenger-cancel,
body.map-c-customer-active #passengerSheetDetails [data-trip-disclosure] button[onclick*="cancelStartedRideUI"] {
  background:#a52532 !important;color:#fff !important;border:1px solid #a52532 !important;
  border-radius:11px;min-height:44px;
}
.trip-panel-sos {display:inline-grid;place-items:center;min-width:44px;padding:0 8px;text-decoration:none;font-weight:800}
.trip-share-dialog label,.trip-share-dialog input {display:block;width:100%}
body:is(.map-c-driver-active,.map-c-customer-active) :is(#driver,#customerTracking) .leaflet-tile-pane {
  filter:grayscale(1) invert(1) sepia(.65) hue-rotate(158deg) saturate(2) brightness(.73);
}
#driverMapActions .driver-trip-person-name {flex:1;min-width:0;overflow-wrap:anywhere}
#driverMapActions .driver-trip-person-name > small {display:block;color:#b7d2e4}
body.ht-navigation-active #driverMapActions .driver-compact-arrival[data-live-arrival] {display:none}
body.map-c-driver-active .ht-nav-instruction,
body.map-c-driver-active .ht-nav-summary {
  background:linear-gradient(150deg,#0b2941,#011725 78%);border-color:#356b8a;
}

/* Active driver panel. Keep room for the live vehicle marker above the sheet. */
body.map-c-driver-active #driverMapActions .driver-ride-design {
  flex-flow:column nowrap;
  min-width:0;
  padding:0 10px 8px !important;
  max-height:max(105px,calc(100dvh - var(--driver-hud-edge,160px) - var(--driver-nav-height,64px) - clamp(78px,14vh,120px)));
}
#driverMapActions .driver-ride-panel-top {
  display:grid;grid-template-columns:44px minmax(0,1fr) 44px;
  align-items:center;flex-shrink:0;
}
#driverMapActions .driver-ride-panel-top .driver-ride-grip {
  grid-column:2;justify-self:center;justify-content:center;width:58px;
  min-height:44px;padding:0;background:transparent;color:#b7d2e4;font-size:23px;
}
#driverMapActions .driver-ride-sos {grid-column:3;margin-top:4px}
#driverMapActions .driver-ride-person {
  display:flex;align-items:center;gap:8px;min-width:0;margin-top:3px;
}
#driverMapActions .driver-ride-person small {display:block;color:#b7d2e4}
#driverMapActions .driver-ride-person strong {display:block;overflow-wrap:anywhere}
#driverMapActions .driver-ride-destination {
  display:flex;align-items:center;justify-content:space-between;gap:8px;
  border-top:1px solid var(--trip-line);margin-top:7px;padding-top:6px;
}
#driverMapActions .driver-ride-destination > div {min-width:0}
#driverMapActions .driver-ride-destination small {display:block;color:var(--trip-cyan)}
#driverMapActions .driver-ride-destination .driver-compact-stage {color:var(--trip-accent)}
#driverMapActions .driver-ride-destination strong {
  display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;
  overflow:hidden;overflow-wrap:anywhere;line-height:1.25;
}
#driverMapActions .driver-ride-time {
  color:var(--trip-accent);font-size:clamp(18px,5vw,23px);font-weight:750;white-space:nowrap;
}
#driverMapActions .driver-ride-time[data-eta-pending] {
  max-width:95px;white-space:normal;font-size:12px;color:#b7d2e4;text-align:right;
}
#driverMapActions .driver-ride-design .driver-sheet-primary {flex:none;order:1;margin-top:6px !important}
#driverMapActions .driver-ride-design .driver-sheet-primary:disabled {background:#173653!important;color:#c5d7ed!important;opacity:1}
#driverMapActions .driver-ride-design :is(#driverSheetDetails,.driver-ride-compact-content) {
  min-width:0;min-height:0;overflow-x:hidden;overflow-y:auto;
}
#driverMapActions .driver-ride-design .driver-sheet-tools > button {
  min-width:0;white-space:normal;overflow-wrap:anywhere;
}
#driverMapActions .driver-ride-design h2 {font-size:18px;line-height:1.25;margin:5px 0 8px}
#driverMapActions .driver-ride-design .driver-sheet-tools {display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
#driverMapActions .driver-ride-back {min-height:44px;color:var(--trip-cyan);background:transparent}
body.map-c-driver-active:has(#driverMapActions .driver-ride-design) .ht-nav-summary {display:none !important}
#driverMapActions .driver-ride-design {position:relative}
#driverMapActions .driver-ride-design.driver-sheet-collapsed .driver-ride-sos {position:absolute;right:10px;top:44px;margin-top:0}
#driverMapActions .driver-ride-person {min-height:44px;padding-right:54px}
#driverMapActions .driver-ride-dropoff {display:flex;align-items:center;justify-content:space-between;gap:8px}
#driverMapActions .driver-ride-dropoff > div {min-width:0}

/* Compact active-ride controls with details available from the passenger photo. */
body.map-c-driver-active>header .header-controls {display:none!important}
#driverMapActions .driver-passenger-expand {
  display:flex;align-items:center;justify-content:center;flex:0 0 48px;
  width:48px;height:48px;min-height:48px;padding:0;border:0;
  background:transparent;border-radius:50%;
}
#driverMapActions .driver-sheet-collapsed .driver-ride-panel-top {display:block;height:12px}
#driverMapActions .driver-sheet-collapsed .driver-ride-grip {
 display:block;width:54px;min-height:12px;height:12px;margin:auto;padding:0;font-size:0;touch-action:none;
}
#driverMapActions .driver-ride-grip::after {content:"";display:block;width:38px;height:4px;margin:auto;border-radius:3px;background:#9bb6cb}
#driverMapActions .driver-ride-grip>span {display:none}
#driverMapActions .driver-sheet-collapsed .driver-ride-compact-content {
  display:grid;grid-template-columns:48px minmax(0,1fr);gap:10px;
  align-items:center;padding:8px 50px 6px 10px;overflow:visible;
}
#driverMapActions .driver-sheet-collapsed .driver-ride-person {margin:0;padding:0;min-height:48px}
#driverMapActions .driver-sheet-collapsed .driver-ride-person>span {display:none}
#driverMapActions .driver-sheet-collapsed .driver-ride-destination {
  border:0;margin:0;padding:0;min-width:0;
}
#driverMapActions .driver-sheet-collapsed .driver-ride-destination small,
#driverMapActions .driver-sheet-collapsed .driver-ride-time {display:none}
#driverMapActions .driver-sheet-collapsed .driver-ride-destination strong {
  font-size:16px;line-height:1.25;-webkit-line-clamp:2;
}
#driverMapActions .driver-ride-design.driver-sheet-collapsed .driver-ride-sos {
  display:flex;position:absolute;right:8px;top:10px;
  min-width:36px;min-height:36px;width:36px;height:36px;
  padding:3px;font-size:11px;
}
#driverMapActions .driver-ride-design .driver-sheet-primary {
  display:block;width:100%!important;align-self:stretch!important;
  min-height:52px!important;border-radius:8px;padding:10px!important;
  margin:4px 0 0!important;font-size:19px;
}
#driverMapActions .driver-ride-design:not(.driver-sheet-collapsed) {
  max-height:min(58dvh,520px);
}
body.map-c-driver-active .ht-nav-instruction {
  top:calc(env(safe-area-inset-top,0px) + 8px)!important;
}

#driverMapActions #driverSheetDetails {overscroll-behavior:contain;touch-action:pan-y}
#driverMapActions .driver-sheet-collapsed .driver-ride-compact-content {touch-action:pan-x}
body.driver-map-home #driverHomeLanguage {display:none!important}

/* Approved passenger view: persistent destination/ETA and a compact identity sheet. */
body.map-c-customer-active .ht-nav-instruction,
body.map-c-customer-active .ht-nav-summary {display:none!important}
body.map-c-customer-active #customerTracking .passenger-persistent-arrival {
 position:fixed;z-index:12;top:calc(env(safe-area-inset-top,0px) + 10px);
 left:12px;right:12px;display:grid;grid-template-columns:minmax(0,1fr) minmax(100px,auto);
 gap:12px;padding:12px 14px;border:1px solid #356b8a;border-radius:16px;
 background:linear-gradient(140deg,#0b2941,#011725);box-shadow:0 4px 18px #0004;
 color:#f6fbff;pointer-events:none;
}
#customerTracking .passenger-top-destination {min-width:0;align-self:center}
#customerTracking .passenger-top-destination small {display:block;color:#b7d2e4;font-size:14px}
#customerTracking .passenger-top-destination strong {display:block;font-size:18px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#customerTracking .passenger-top-time {border-left:1px solid #356b8a;padding-left:12px;text-align:right;max-width:170px}
#customerTracking .passenger-top-time strong {display:block;color:#adee3c;font-size:23px;line-height:1.2}
#customerTracking .passenger-top-time small {display:block;font-size:14px;margin-top:3px;white-space:nowrap}
#customerTracking .passenger-top-time strong:only-child {font-size:14px;color:#c5d7ed}
body.map-c-customer-active #customerTracking .approved-customer-dock {
 display:flex!important;flex-direction:column;overflow:visible!important;
 max-height:calc(100dvh - env(safe-area-inset-top,0px) - var(--map-c-nav) - 130px)!important;
 padding:6px 10px 10px!important;
}
#customerTracking .passenger-identity-bar {position:relative;flex-shrink:0}
body.map-c-customer-active #customerTracking .passenger-identity-bar .passenger-sheet-toggle {
 display:flex!important;gap:10px;align-items:center;min-width:0;
 padding:18px 48px 0 0!important;min-height:96px;
}
body.map-c-customer-active #customerTracking .passenger-identity-bar .passenger-handle {position:absolute;top:2px;left:calc(50% - 20px);margin:0}
#customerTracking .passenger-profile-rating {flex:0 0 58px;display:grid;justify-items:center;align-self:center;gap:3px}
#customerTracking .passenger-profile-rating .trip-driver-avatar {width:48px;height:48px}
#customerTracking .passenger-profile-rating .trip-driver-rating {font-size:12px;line-height:1.1;text-align:center;margin:0}
#customerTracking .trip-driver-rating>span {display:block;font-size:11px;letter-spacing:-1px}
#customerTracking .trip-driver-rating>b {display:block;font-size:14px}
#customerTracking .passenger-identity-copy {min-width:0;flex:1}
body.map-c-customer-active #customerTracking .passenger-identity-copy .passenger-state {font-size:12px;line-height:1.15;margin:0 0 3px}
#customerTracking .passenger-identity-copy .trip-driver {margin:0}
#customerTracking .passenger-identity-copy .trip-driver strong {font-size:17px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#customerTracking .passenger-identity-copy .trip-vehicle {margin:1px 0 0;gap:6px;min-width:0}
body.map-c-customer-active #customerTracking .passenger-identity-copy .passenger-summary-vehicle {width:54px;flex:0 0 54px}
body.map-c-customer-active #customerTracking .passenger-identity-copy .passenger-summary-vehicle .approved-vehicle-picture,
body.map-c-customer-active #customerTracking .passenger-identity-copy .passenger-summary-vehicle img {width:54px!important;height:34px!important;object-fit:contain}
#customerTracking .passenger-identity-copy .trip-vehicle>span:last-child {min-width:0}
#customerTracking .passenger-identity-copy .trip-vehicle small {font-size:12px;line-height:1.2;overflow-wrap:anywhere}
#customerTracking .passenger-identity-copy .trip-plate {font-size:12px;padding:1px 5px;margin-top:2px}
body.map-c-customer-active #customerTracking .passenger-identity-bar .passenger-chevron {top:13px;right:10px;width:20px;height:20px}
#customerTracking .passenger-compact-sos {position:absolute;right:0;bottom:4px;min-width:40px;min-height:40px;padding:0 4px;font-size:13px}
body.map-c-customer-active #customerTracking #passengerSheetDetails {min-height:0;overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y}
#customerTracking #passengerSheetDetails[hidden] {display:none!important}
body.map-c-customer-active #customerTracking #passengerSheetDetails .passenger-addresses p {font-size:16px}
body.map-c-customer-active #customerTracking #passengerSheetDetails :is(.passenger-contact-actions button,.approved-fare,.trip-panel-options>summary) {font-size:16px}
body.map-c-customer-active #customerTracking #passengerSheetDetails .approved-fare b {font-size:24px}
@media(min-width:800px){body.map-c-customer-active #customerTracking .passenger-persistent-arrival {max-width:740px;width:calc(100% - 24px);left:50%;right:auto;transform:translateX(-50%);box-sizing:border-box}}
@media(max-width:360px){#customerTracking .passenger-identity-copy .trip-driver strong {font-size:15px}#customerTracking .passenger-top-time strong {font-size:20px}}
@media(min-width:800px){body.map-c-customer-active #customerTracking .approved-customer-dock {transform:none;left:calc(50% - 370px);right:auto;box-sizing:border-box}}
#driverMapActions .driver-sheet-dropoff-at-stop {order:2;min-height:44px;width:100%;margin-top:4px;color:#f6fbff;background:#173653;border:1px solid #356b8a}
