/* BARGAINX_V30_ACTUAL_OWNER_EXACT_UI_3D_PERFORMANCE */

html, body, #map,
.maplibregl-map,
.maplibregl-canvas-container,
.maplibregl-canvas {
  background:#05070a !important;
}

#rightRail,
#setupPanel,
#searchResults,
#driveHud,
#turnCard,
#bxProPlaceCardV294 {
  -webkit-backdrop-filter:none !important;
  backdrop-filter:none !important;
}

/* Permanent left menu - real production owner */
html body #menuButton {
  display:grid !important;
  visibility:visible !important;
  pointer-events:auto !important;
  position:fixed !important;
  left:22px !important;
  top:106px !important;
  width:76px !important;
  height:76px !important;
  place-items:center !important;
  z-index:1510 !important;
  border-radius:23px !important;
  border:1px solid rgba(105,155,193,.26) !important;
  background:#071019 !important;
  box-shadow:0 9px 24px rgba(0,0,0,.30) !important;
}

/* The route-side grid toggle is no longer a visible owner. */
html body #bxV290ControlsToggle {
  display:none !important;
}

/* Route search cancel */
html body #searchForm {
  position:relative !important;
}

html body #bxV30SearchCancel {
  display:none !important;
  position:absolute !important;
  right:58px !important;
  top:50% !important;
  transform:translateY(-50%) !important;
  min-width:82px !important;
  height:38px !important;
  padding:0 14px !important;
  place-items:center !important;
  z-index:22 !important;
  color:#f5f9fd !important;
  background:#111a23 !important;
  border:1px solid rgba(132,183,219,.25) !important;
  border-radius:11px !important;
  font:800 12px/1 system-ui,sans-serif !important;
  box-shadow:none !important;
}

html body.bx-v30-route-active.bx-v30-searching #bxV30SearchCancel {
  display:grid !important;
}

html body.bx-v30-route-active.bx-v30-searching #searchInput {
  padding-right:155px !important;
}

html body.bx-v30-searching #setupPanel {
  display:none !important;
}

html body.bx-v30-drawer-open #setupPanel {
  display:block !important;
  visibility:visible !important;
  pointer-events:auto !important;
  z-index:1480 !important;
}

/* Permanent real production right rail */
html body #rightRail {
  position:fixed !important;
  top:50% !important;
  right:18px !important;
  bottom:auto !important;
  left:auto !important;
  transform:translateY(-50%) !important;
  width:62px !important;
  min-width:62px !important;
  max-width:62px !important;
  max-height:calc(100vh - 28px) !important;
  margin:0 !important;
  padding:5px !important;
  display:flex !important;
  flex-direction:column !important;
  gap:5px !important;
  overflow:hidden !important;
  box-sizing:border-box !important;
  border-radius:20px !important;
  background:#050b11 !important;
  border:1px solid rgba(93,168,219,.28) !important;
  box-shadow:0 10px 26px rgba(0,0,0,.32) !important;
  z-index:1500 !important;
  contain:layout paint !important;
}

html body #rightRail > button {
  flex:0 0 50px !important;
  width:50px !important;
  min-width:50px !important;
  max-width:50px !important;
  height:50px !important;
  min-height:50px !important;
  max-height:50px !important;
  margin:0 !important;
  padding:0 !important;
  place-items:center !important;
  box-sizing:border-box !important;
  color:#f4f9fd !important;
  background:#09131c !important;
  border:1px solid rgba(124,179,219,.17) !important;
  border-radius:12px !important;
  box-shadow:none !important;
  transition:none !important;
  overflow:hidden !important;
}

/* Exact requested order */
html body #bxV30CompassButton { order:10 !important; display:grid !important; }
html body #railLocateButton   { order:20 !important; display:grid !important; }
html body #twoDButton         { order:30 !important; display:grid !important; }
html body #zoomInButton       { order:40 !important; display:grid !important; }
html body #zoomOutButton      { order:50 !important; display:grid !important; }
html body #soundButton        { order:60 !important; display:grid !important; }
html body #exitButton         { order:70 !important; display:grid !important; }

/* Remove two unrequested rail owners */
html body #routePanelButton,
html body #modeButton {
  display:none !important;
}

/* End route button uses existing production #exitButton */
html body #rightRail > #exitButton {
  color:#fff !important;
  background:#211017 !important;
  border-color:rgba(255,82,105,.42) !important;
}

html body.bx-v30-route-active #rightRail > #exitButton {
  background:#2d111a !important;
  border-color:rgba(255,82,105,.68) !important;
}

html body #rightRail > button:hover,
html body #rightRail > button:focus-visible {
  background:#0d1e2b !important;
  border-color:rgba(66,181,255,.52) !important;
  outline:none !important;
}

html body #rightRail > #exitButton:hover,
html body #rightRail > #exitButton:focus-visible {
  background:#3b1420 !important;
  border-color:#ff596f !important;
}

html body #railLocateButton.bx-v30-recenter-needed {
  color:#fff !important;
  background:#0b2a3d !important;
  border-color:rgba(45,184,255,.70) !important;
  box-shadow:inset 3px 0 #2db8ff !important;
}

#bxV30CompassButton .bx-v30-compass {
  position:relative !important;
  width:24px !important;
  height:24px !important;
  display:block !important;
  border:1px solid rgba(239,248,255,.70) !important;
  border-radius:50% !important;
}

#bxV30CompassButton .bx-v30-arrow {
  position:absolute !important;
  left:50% !important;
  top:3px !important;
  width:0 !important;
  height:0 !important;
  margin-left:-5px !important;
  border-left:5px solid transparent !important;
  border-right:5px solid transparent !important;
  border-bottom:14px solid #ff4f64 !important;
  transform-origin:5px 9px !important;
}

/* ACTUAL visual place card owner found by V29: #bxProPlaceCardV294 / .bxp-* */
html body #bxProPlaceCardV294.bxp-card,
html body #bxProPlaceCardV294 {
  width:min(430px,calc(100vw - 40px)) !important;
  max-height:calc(100vh - 138px) !important;
  color:#eef7ff !important;
  background:#061019 !important;
  border:1px solid rgba(72,145,197,.34) !important;
  border-radius:22px !important;
  box-shadow:0 16px 38px rgba(0,0,0,.40) !important;
}

html body #bxProPlaceCardV294 .bxp-scroll,
html body #bxProPlaceCardV294 .bxp-main,
html body #bxProPlaceCardV294 .bxp-panel,
html body #bxProPlaceCardV294 .bxp-section,
html body #bxProPlaceCardV294 .bxp-state-row,
html body #bxProPlaceCardV294 .bxp-hours,
html body #bxProPlaceCardV294 .bxp-review,
html body #bxProPlaceCardV294 .bxp-about > div {
  background:#07121b !important;
  border-color:rgba(69,133,179,.22) !important;
}

html body #bxProPlaceCardV294 .bxp-hero {
  height:205px !important;
  min-height:205px !important;
  background:#07121b !important;
  border-bottom:1px solid rgba(69,133,179,.22) !important;
}

html body #bxProPlaceCardV294 .bxp-hero img {
  width:100% !important;
  height:100% !important;
  object-fit:cover !important;
}

html body #bxProPlaceCardV294 .bxp-title,
html body #bxProPlaceCardV294 strong,
html body #bxProPlaceCardV294 label {
  color:#f2f8fd !important;
}

html body #bxProPlaceCardV294 p,
html body #bxProPlaceCardV294 small,
html body #bxProPlaceCardV294 .bxp-address,
html body #bxProPlaceCardV294 .bxp-review-count,
html body #bxProPlaceCardV294 .bxp-state,
html body #bxProPlaceCardV294 .bxp-saved {
  color:#a8bed1 !important;
}

html body #bxProPlaceCardV294 .bxp-category,
html body #bxProPlaceCardV294 .bxp-stars,
html body #bxProPlaceCardV294 .bxp-tab.active {
  color:#69ceff !important;
}

html body #bxProPlaceCardV294 .bxp-tabs {
  background:#060d14 !important;
  border-top:1px solid rgba(69,133,179,.22) !important;
  border-bottom:1px solid rgba(69,133,179,.22) !important;
}

html body #bxProPlaceCardV294 .bxp-tab {
  background:transparent !important;
  color:#a9bed0 !important;
  border:0 !important;
}

html body #bxProPlaceCardV294 .bxp-tab.active {
  background:#081825 !important;
  box-shadow:inset 0 -2px #39baff !important;
}

html body #bxProPlaceCardV294 .bxp-actions {
  display:grid !important;
  grid-template-columns:repeat(5,minmax(0,1fr)) !important;
  gap:8px !important;
}

html body #bxProPlaceCardV294 .bxp-action,
html body #bxProPlaceCardV294 .bxp-call,
html body #bxProPlaceCardV294 .bxp-submit {
  min-width:0 !important;
  min-height:62px !important;
  margin:0 !important;
  padding:8px 4px !important;
  display:grid !important;
  place-items:center !important;
  align-content:center !important;
  gap:4px !important;
  color:#eef7ff !important;
  background:#08131c !important;
  border:1px solid rgba(81,145,189,.24) !important;
  border-radius:12px !important;
  box-shadow:none !important;
  overflow:hidden !important;
}

html body #bxProPlaceCardV294 .bxp-action span {
  max-width:100% !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  white-space:nowrap !important;
}

/* Remove the old brown/orange primary owner */
html body #bxProPlaceCardV294 .bxp-action.primary,
html body #bxProPlaceCardV294 [data-bxp-action="directions"],
html body #bxProPlaceCardV294 .bxp-submit {
  color:#fff !important;
  background:linear-gradient(180deg,#0c5480,#083653) !important;
  border-color:rgba(62,185,255,.62) !important;
  box-shadow:inset 0 0 0 1px rgba(116,213,255,.08) !important;
}

html body #bxProPlaceCardV294 .bxp-action.primary b,
html body #bxProPlaceCardV294 [data-bxp-action="directions"] b {
  color:#fff !important;
}

html body #bxProPlaceCardV294 .bxp-call {
  background:#08131c !important;
  color:#a8bed1 !important;
}

html body #bxProPlaceCardV294 .bxp-close {
  color:#fff !important;
  background:#07111a !important;
  border:1px solid rgba(83,149,194,.32) !important;
}

html body #bxProPlaceCardV294 input,
html body #bxProPlaceCardV294 textarea,
html body #bxProPlaceCardV294 select {
  color:#eef7ff !important;
  background:#08131c !important;
  border-color:rgba(83,149,194,.28) !important;
}

/* Home / Work alignment */
.bx-saved-place-v22 {
  display:grid !important;
  grid-template-columns:auto minmax(0,1fr) auto !important;
  align-items:center !important;
  gap:12px !important;
}

.bx-saved-place-actions-v22 {
  display:flex !important;
  align-items:center !important;
  justify-content:flex-end !important;
  gap:8px !important;
}

#bxHomeSetButtonV22,
#bxHomeGoButtonV22,
#bxWorkSetButtonV22,
#bxWorkGoButtonV22 {
  height:40px !important;
  min-height:40px !important;
  margin:0 !important;
  padding:0 13px !important;
  display:inline-grid !important;
  place-items:center !important;
  box-sizing:border-box !important;
  border-radius:10px !important;
  line-height:1 !important;
}

/* No expensive UI animation over moving WebGL map */
html body.bx-v30-route-active #rightRail,
html body.bx-v30-route-active #setupPanel,
html body.bx-v30-route-active #searchResults,
html body.bx-v30-route-active #driveHud,
html body.bx-v30-route-active #turnCard {
  transition:none !important;
  animation:none !important;
}

@media (max-width:900px) {
  html body #menuButton {
    left:8px !important;
    top:98px !important;
    width:58px !important;
    height:58px !important;
    border-radius:18px !important;
  }

  html body #rightRail {
    right:8px !important;
    width:52px !important;
    min-width:52px !important;
    max-width:52px !important;
    padding:3px !important;
    gap:3px !important;
  }

  html body #rightRail > button {
    flex-basis:44px !important;
    width:44px !important;
    min-width:44px !important;
    max-width:44px !important;
    height:44px !important;
    min-height:44px !important;
    max-height:44px !important;
  }

  html body #bxProPlaceCardV294.bxp-card,
  html body #bxProPlaceCardV294 {
    width:min(410px,calc(100vw - 18px)) !important;
    max-height:calc(100vh - 110px) !important;
  }
}
