.map-header { display: none; }
html,body { width: 100%; height: 100%; min-height: 100dvh; }
#map { position: fixed; inset: 0; width: 100vw; height: 100dvh; }
.maneuver-card[hidden],.route-card[hidden] { display: none !important; }
.charger-panel { top: 18px; }
.map-home {
  position: fixed;
  z-index: 10;
  right: 18px;
  bottom: 18px;
  min-width: 48px;
  height: 38px;
  padding: 0 11px;
  border: 1px solid #34393d;
  border-radius: 10px;
  background: rgba(16, 20, 23, .94);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .3);
  backdrop-filter: blur(14px);
}
.map-home span { font-size: 1rem; }
.map-home b { font-size: .58rem; }
body:has(.route-card:not([hidden])) .map-home { right: 350px; bottom: 18px; }

.route-card {
  left: auto;
  right: 18px;
  bottom: 18px;
  transform: none;
  width: min(320px, calc(100vw - 24px));
  padding: 14px 17px;
  border: 0;
  border-radius: 14px;
  background: rgba(43, 45, 49, .94);
  box-shadow: 0 14px 38px rgba(0, 0, 0, .28);
  display: block;
  color: #fff;
  backdrop-filter: blur(16px);
}
.navigation-active .map-header { display: none; }
.navigation-active .charger-panel { top: 18px; width: 360px; }
.maneuver-card {
  position: fixed;
  z-index: 9;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  min-width: 240px;
  padding: 11px 15px;
  border-radius: 13px;
  background: rgba(43, 45, 49, .94);
  color: #fff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .28);
  display: flex;
  align-items: center;
  gap: 17px;
  backdrop-filter: blur(16px);
}
.maneuver-arrow { width: 42px; height: 42px; border-radius: 7px; background: #1760bd; display: grid; place-items: center; font-size: 1.6rem; }
.maneuver-card strong,.maneuver-card small { display: block; }
.maneuver-card strong { font-size: 1.05rem; }
.maneuver-card small { max-width: 220px; margin-top: 3px; overflow: hidden; color: #d0d0d0; font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.route-destination {
  overflow: hidden;
  margin-bottom: 9px;
  color: #f5f5f5;
  font-size: .68rem;
  font-weight: 700;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.route-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.route-stats div { text-align: center; }
.route-card .route-stats strong { margin: 0; font-size: 1rem; line-height: 1.1; }
.route-card .route-stats small { margin-top: 3px; color: #aaa; font-size: .61rem; font-weight: 800; letter-spacing: .06em; }
.route-actions { display: grid; grid-template-columns: 1fr 42px; gap: 8px; margin-top: 12px; }
.route-card .route-actions button { height: 40px; margin: 0; border: 0; border-radius: 8px; font: inherit; font-size: .8rem; font-weight: 900; }
.route-card #routeGo { background: #24cf3d; color: #030503; }
.route-card #routeClose { background: linear-gradient(145deg, #55575d, #35363b); color: #fff; font-size: 1.35rem; }
.route-card.running { width: 270px; padding-right: 54px; }
.route-card.running .route-actions { position: absolute; right: 10px; bottom: 10px; display: block; margin: 0; }
.route-card.running #routeGo { display: none; }
.route-card.running #routeClose { width: 36px; height: 36px; }

@media (max-width: 850px) {
  .route-card { top: auto; right: 10px; bottom: 10px; padding: 15px 18px; }
  .maneuver-card { top: 10px; min-width: 260px; padding: 11px 15px; }
  .route-actions { margin-top: 13px; }
  .route-card .route-actions button { height: 48px; }
  .charger-panel { top: 10px; }
  .map-home { right: 10px; bottom: 10px; width: 44px; min-width: 44px; height: 44px; padding: 0; }
  .map-home b { display: none; }
  body:has(.route-card:not([hidden])) .map-home { right: 10px; bottom: 190px; }
}

.map-controls { gap: 6px; }
.map-controls button { min-width: 48px; width: auto; height: 46px; padding: 0 11px; border-radius: 8px; }
.map-controls span { font-size: 1rem; }
.map-controls b { font-size: .6rem; }
.map-controls #locateButton img { width: 25px; height: 25px; object-fit: contain; filter: invert(1); }
.charger-panel { background: rgba(16,20,23,.52); backdrop-filter: blur(9px); }
.charger-panel .charger-search { background: rgba(8,11,13,.55); border-color: rgba(255,255,255,.15); }
.speed-display { left: 18px; right: auto; top: auto; bottom: 18px; min-width: 76px; width: 76px; height: 76px; padding: 0; border: 0; border-radius: 50%; background: rgba(255,255,255,.94); color: #111; align-items: center; justify-content: center; }
.speed-display strong { font-size: 2.25rem; }
.speed-display small,.speed-display .speed-dot { display: none; }
.vehicle-arrow { width: 0; height: 0; border-right: 24px solid transparent; border-bottom: 58px solid #2479eb; border-left: 24px solid transparent; filter: drop-shadow(0 4px 3px rgba(0,0,0,.45)); }
.vehicle-arrow::after { content: ''; position: absolute; left: -17px; top: 9px; border-right: 17px solid transparent; border-bottom: 40px solid #1160c9; border-left: 17px solid transparent; }

@media (max-width: 850px) {
  .map-controls button { min-width: 44px; width: 44px; height: 44px; }
  .speed-display { left: 10px; right: auto; top: auto; bottom: 10px; min-width: 62px; width: 62px; height: 62px; }
  .speed-display strong { font-size: 1.85rem; }
}
