/* ══════════════════════════════════════════
   MAPA.CSS — Estilos específicos de la vista Mapa
   ══════════════════════════════════════════ */

/* ── Contenedor fullscreen ── */
.map-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 56px;
  overflow: hidden;
  z-index: 1;
  transition: bottom 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
#nav {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
.hide-footer #nav {
  transform: translateY(100%) !important;
}
.hide-footer .map-container {
  bottom: 0 !important;
}
#map {
  width: 100%;
  height: 100%;
  background: #080f08;
  z-index: 1;
}

/* ── Rediseño oscuro de Leaflet ── */
.leaflet-bar {
  border: 1px solid var(--line2) !important;
  box-shadow: none !important;
  border-radius: 3px !important;
}
.leaflet-bar a {
  background: rgba(12, 12, 12, 0.95) !important;
  color: var(--t0) !important;
  border-bottom: 1px solid var(--line2) !important;
  transition: all 0.15s;
}
.leaflet-bar a.leaflet-disabled {
  background: rgba(12, 12, 12, 0.55) !important;
  color: var(--t2) !important;
  opacity: 0.35 !important;
  pointer-events: none !important;
  cursor: default !important;
}
.leaflet-bar a:hover {
  background: var(--s3) !important;
  color: var(--cy) !important;
}
.leaflet-control-zoom-in { border-radius: 2px 2px 0 0 !important; }
.leaflet-control-zoom-out { border-radius: 0 0 2px 2px !important; border-bottom: none !important; }

.leaflet-popup-content-wrapper {
  background: var(--s1) !important;
  color: var(--t0) !important;
  border: 1px solid var(--line2) !important;
  border-radius: 4px !important;
  box-shadow: 0 4px 12px rgba(0,0,0,.6) !important;
}
.leaflet-popup-tip {
  background: var(--s1) !important;
  border: 1px solid var(--line2) !important;
}
.leaflet-popup-content {
  margin: 10px 12px !important;
  font-family: inherit !important;
  font-size: 11px !important;
  line-height: 1.45 !important;
}
.leaflet-popup-content h4 {
  font-size: 13px !important;
  font-weight: 700 !important;
  margin-bottom: 4px !important;
  color: var(--cy);
}
.leaflet-popup-content p {
  color: var(--t1) !important;
  margin: 0 !important;
}
.leaflet-popup-close-button {
  color: var(--t2) !important;
}
.leaflet-popup-close-button:hover {
  color: var(--re) !important;
}
.leaflet-container {
  font-family: inherit !important;
  background-color: #080f08 !important;
}

/* ── Marcador GPS pulsante ── */
.gps-pulse-marker {
  width: 12px;
  height: 12px;
  background: var(--cy);
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 8px var(--cy);
  animation: gpsPulse 2s infinite;
}

@keyframes gpsPulse {
  0% { box-shadow: 0 0 0 0 rgba(0,229,255,0.7); }
  70% { box-shadow: 0 0 0 8px rgba(0,229,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(0,229,255,0); }
}

/* ── Marcador GPS estilo flecha de navegación ── */
.gps-arrow-marker {
  display: flex !important;
  align-items: center;
  justify-content: center;
  background: none !important;
  border: none !important;
  transition: transform 0.6s linear !important;
}
.gps-arrow-container {
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease-out;
}
.gps-arrow-container svg {
  width: 45px;
  height: 45px;
  display: block;
}

/* ── FABs flotantes ── */
.map-fabs {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 1000;
  display: flex;
  flex-direction: column-reverse;
  gap: 10px;
}

.map-fab {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line2);
  background: rgba(12, 12, 12, 0.92);
  color: var(--t0);
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.6);
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.map-fab svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
}
.map-fab:active {
  transform: scale(0.9);
  background: var(--s3);
}

.fab-gps {
  position: absolute;
  right: 12px;
  bottom: 200px;
  z-index: 1000;
  transition: bottom 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease, transform 0.25s ease;
}
.fab-gps.hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.8);
}

.map-container .leaflet-right {
  right: 12px !important;
}
.map-container .leaflet-bottom {
  bottom: 260px !important;
}

/* ── FAB de Grabación ── */
.fab-record {
  position: absolute;
  right: 12px;
  bottom: 336px;
  z-index: 1000;
  border-color: var(--line2);
  transition: all 0.2s ease, bottom 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.fab-record.recording {
  border-color: var(--re) !important;
  box-shadow: 0 0 12px rgba(255, 75, 75, 0.6) !important;
  animation: recordPulse 1.5s infinite;
}
@keyframes recordPulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 75, 75, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(255, 75, 75, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 75, 75, 0); }
}

/* ── FAB de Pausa ── */
.fab-pause-float {
  position: absolute;
  right: 12px;
  bottom: 456px; /* Desplazado hacia arriba para dar espacio a fab-peloton */
  z-index: 1000;
  border-color: var(--line2);
  transition: all 0.2s ease;
}
.fab-pause-float.paused {
  border-color: var(--ye) !important;
  box-shadow: 0 0 10px rgba(253, 224, 71, 0.4) !important;
}

/* ── FAB de Pelotón ── */
.fab-peloton {
  position: absolute;
  right: 12px;
  bottom: 396px; /* Justo debajo del botón de pausa */
  z-index: 1000;
  border-color: var(--line2);
  transition: all 0.2s ease;
}
.fab-peloton.active {
  border-color: var(--cy) !important;
  color: var(--cy) !important;
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.4) !important;
}

/* ── FAB principal de reportar ── */
.fab-report {
  width: 52px;
  height: 52px;
  font-size: 22px;
  background: var(--cy);
  color: #000;
  border-color: var(--cy);
  box-shadow: 0 2px 12px rgba(0,229,255,0.3);
}
.fab-report:active {
  background: #00b8d4;
}

/* ── Bottom Sheet ── */
.bottom-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1015;
  background: var(--s1);
  border-top: 1px solid var(--line2);
  border-radius: 14px 14px 0 0;
  max-height: 55vh;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.5);
}
.bottom-sheet.bs-expanded {
  transform: translateY(0);
  overflow: hidden;
}

.bs-handle {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 14px 8px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.bs-handle-bar {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: var(--line2);
  margin-bottom: 6px;
}
.bs-summary {
  font-size: 11px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--t1);
}

.bs-content {
  overflow-y: auto;
  max-height: calc(55vh - 104px);
  -webkit-overflow-scrolling: touch;
}
.bs-content::-webkit-scrollbar { display: none; }

/* ── Pestañas del Bottom Sheet ── */
.bs-tabs {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  margin-top: 4px;
  box-sizing: border-box;
}
.bs-tab {
  flex: 1;
  padding: 5px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--t2);
  background: var(--s3);
  border: 1px solid var(--line2);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  -webkit-tap-highlight-color: transparent;
}
.bs-tab.active {
  color: var(--ye);
  background: rgba(255, 230, 0, 0.08);
  border-color: rgba(255, 230, 0, 0.3);
}
.bs-tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent !important;
  color: #FFFFFF !important;
  font-size: 11px;
  font-weight: 700;
  padding: 0;
  margin-left: 3px;
  border-radius: 0;
  min-width: auto;
  height: auto;
}
.bs-action-btn {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  height: 28px;
  line-height: 1;
  padding: 0 8px;
  border-radius: 4px;
  border: 1px solid var(--line2);
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--s3);
  color: #FFFFFF;
  white-space: nowrap;
  flex: 1;
  cursor: pointer;
  transition: all 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.bs-action-btn:hover {
  border-color: rgba(255, 230, 0, 0.45);
  color: var(--ye);
}
.bs-action-btn:active {
  background: var(--ye) !important;
  color: #000000 !important;
  border-color: var(--ye) !important;
}
.bs-close-btn {
  position: absolute;
  top: 16px;
  right: 14px;
  z-index: 1020;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: bold;
  color: var(--ye);
  background: var(--s3);
  border: 1px solid var(--line2);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
  height: 28px;
  box-sizing: border-box;
}
.bs-close-btn:active {
  transform: scale(0.92);
  background: var(--s2);
}
.bs-hidden {
  display: none !important;
}

/* ── Filas de rutas guardadas ── */
.route-row {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.route-row:last-child {
  border-bottom: none;
}
.route-row-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.route-row-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--t0);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}
.route-btn-delete {
  background: none;
  border: none;
  font-size: 14px;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  opacity: 0.6;
  flex-shrink: 0;
  transition: opacity 0.15s;
}
.route-btn-delete:hover,
.route-btn-delete:active {
  opacity: 1;
}
.route-row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: var(--t2);
}

/* ── Cargador del mapa ── */
.map-loader {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--s1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cy);
  font-size: 13px;
  font-weight: 500;
  z-index: 2000;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.map-loader.fade-out {
  opacity: 0;
}

/* ── Buscador colapsable ── */
.fab-search {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1010;
  background: rgba(12, 12, 12, 0.92);
  border: 1px solid var(--line2);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--t0);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.6);
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.fab-search svg {
  width: 18px;
  height: 18px;
}
.fab-search:active {
  transform: scale(0.9);
}

.fab-offline {
  position: absolute;
  top: 60px;
  right: 12px;
  width: 40px;
  height: 40px;
  z-index: 1010;
}

.fab-peloton {
  position: absolute;
  top: 108px;
  right: 12px;
  z-index: 1010;
}


.map-search-panel {
  position: absolute;
  top: 108px;
  right: 12px;
  z-index: 1005;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 0;
  max-width: calc(100% - 24px);
  overflow: hidden;
  opacity: 0;
  transition: width 0.28s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease, padding 0.28s;
  box-sizing: border-box;
  pointer-events: none;
  background: rgba(12, 12, 12, 0.95);
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.65);
  padding: 0;
  border: 1px solid transparent;
}
.map-search-panel.search-open {
  width: 320px;
  padding: 8px;
  border-color: var(--line2);
  opacity: 1;
  pointer-events: auto;
}

.map-search-panel input {
  flex: 1;
  height: 36px;
  padding: 0 12px;
  border-radius: 4px;
  border: 1px solid var(--line2);
  background: rgba(12, 12, 12, 0.95);
  color: var(--t1);
  font-size: 13px;
  outline: none;
  box-shadow: 0 2px 6px rgba(0,0,0,0.5);
  white-space: nowrap;
}
.map-search-panel input:focus {
  border-color: var(--cy);
}
.map-search-panel button {
  min-height: 36px !important;
  height: 36px !important;
  padding: 0 12px !important;
  margin: 0 !important;
  border-radius: 4px !important;
  font-size: 13px !important;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0,0,0,0.5) !important;
}

/* ── Tarjeta contextual (clic en mapa) ── */
.map-context-card {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  background: rgba(12, 12, 12, 0.95);
  border: 1px solid var(--line2);
  border-radius: 6px;
  padding: 12px 14px;
  z-index: 1005;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.8);
  transform: translateY(180%);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: auto;
}
.map-context-card.on {
  transform: translateY(0);
}
.map-context-card h5 {
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--t2);
  font-weight: bold;
}
.context-btn-row {
  display: flex;
  gap: 8px;
}
.context-btn-row button {
  flex: 1;
  padding: 8px;
  font-size: 11px;
  font-weight: bold;
  border-radius: 4px;
}

/* ── Atribución OSM ── */
.osm-attribution {
  text-align: center;
  padding: 14px 14px 20px;
  font-size: 12px;
  color: var(--t2);
  letter-spacing: 0.5px;
  border-top: 1px solid var(--line);
}
.osm-attribution a {
  color: var(--cy);
  text-decoration: none;
}

/* ── Selector de modo de transporte ── */
.transport-mode-selector {
  position: absolute;
  left: 12px;
  bottom: 200px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: rgba(12, 12, 12, 0.88);
  border: 1px solid var(--line2);
  border-radius: 10px;
  padding: 5px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.5);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-20px);
  transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.22s ease;
}
.transport-mode-selector.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}
.tms-btn {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: none;
  color: var(--t2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.18s ease;
  -webkit-tap-highlight-color: transparent;
  padding: 0;
}
.tms-btn svg {
  width: 18px;
  height: 18px;
}
.tms-btn:hover {
  background: var(--s3);
  color: var(--t0);
}
.tms-btn.tms-active {
  background: rgba(255, 230, 0, 0.12);
  border-color: rgba(255, 230, 0, 0.4);
  color: var(--ye);
}
.tms-btn:active {
  transform: scale(0.92);
}

/* ── Resumen de Ruta Calculada ── */
.route-summary-card {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 1005;
  background: rgba(12, 12, 12, 0.94);
  border: 1px solid var(--line2);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transform: translateY(180%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}
.route-summary-card.on {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.rs-info {
  display: flex;
  align-items: center;
  gap: 12px;
}
.rs-icon {
  font-size: 28px;
  background: rgba(0, 229, 255, 0.1);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid rgba(0, 229, 255, 0.2);
}
.rs-details {
  display: flex;
  flex-direction: column;
}
.rs-meta {
  font-size: 15px;
  font-weight: 800;
  color: var(--cy);
}
.rs-title {
  font-size: 11px;
  color: var(--t2);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 1px;
}
.rs-actions {
  display: flex;
  gap: 8px;
}
.rs-actions button {
  flex: 1;
  padding: 10px;
  font-size: 12px;
  font-weight: bold;
  border-radius: 6px;
}

/* ── HUD de Navegación Activa ── */
.nav-hud-card {
  position: absolute;
  top: 12px;
  left: 12px;
  right: auto;
  z-index: 1005;
  background: rgba(10, 10, 10, 0.96);
  border: 1.5px solid var(--line2);
  border-radius: 28px;
  padding: 6px 14px 6px 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 6px 22px rgba(0,0,0,0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transform: translateY(-150%);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  max-width: 180px;
  cursor: pointer;
}
.nav-hud-card.on {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.nav-hud-card.hud-expanded {
  right: 12px;
  max-width: none;
  border-radius: 14px;
  padding: 14px 16px;
  gap: 14px;
}
.nh-icon-container {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--cy);
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.4);
  transition: all 0.3s ease;
}
.hud-expanded .nh-icon-container {
  width: 42px;
  height: 42px;
}
.nh-icon-container svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
}
.nh-instruction-container {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nh-instruction {
  font-size: 14px;
  font-weight: 700;
  color: var(--t0);
  line-height: 1.3;
}
.nav-hud-card:not(.hud-expanded) .nh-instruction {
  display: none !important;
}
.nh-distance {
  font-size: 11px;
  color: var(--cy);
  font-weight: bold;
  letter-spacing: 0.5px;
}

/* ── Barra Inferior de Navegación ── */
.nav-bottom-bar {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  z-index: 1005;
  background: rgba(10, 10, 10, 0.96);
  border: 1.5px solid var(--line2);
  border-radius: 14px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  box-shadow: 0 6px 22px rgba(0,0,0,0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transform: translateY(180%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}
.nav-bottom-bar.on {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.nb-upper-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.nb-info {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.nb-time {
  font-size: 18px;
  font-weight: 900;
  color: var(--cy);
  line-height: 1;
}
.nb-dist {
  font-size: 12px;
  color: var(--t1);
  font-weight: 500;
}
.nb-eta {
  font-size: 12px;
  color: var(--t2);
}
.nb-dot {
  color: rgba(255,255,255,0.35);
  font-weight: bold;
}
.nav-bottom-bar button {
  padding: 8px 16px;
  font-size: 12px;
  font-weight: bold;
  border-radius: 8px;
}

/* ── Cateye Retro-computadora ── */
.nb-cateye-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0);
  padding-top: 0;
  margin-top: 0;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.2s ease,
              padding-top 0.3s ease,
              margin-top 0.3s ease,
              border-color 0.3s ease;
}
.map-container.cateye-open .nb-cateye-row {
  max-height: 50px;
  opacity: 1;
  border-color: rgba(255, 255, 255, 0.08);
  padding-top: 10px;
  margin-top: 2px;
  pointer-events: auto;
}
.map-container.cateye-open .nav-bottom-bar {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
  padding: 8px 14px;
  gap: 6px;
}
.map-container.cateye-open .nb-time {
  font-size: 16px;
}
.map-container:not(.cateye-open):not(.guidance-mode) .nav-bottom-bar {
  display: none !important;
}
.map-container:not(.nav-mode) .nb-upper-row {
  display: none !important;
}
.map-container:not(.guidance-mode) .nb-info {
  display: none !important;
}
.nb-cateye-item {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
}
.ce-label {
  font-size: 12px;
  color: var(--cy);
  font-weight: 900;
  letter-spacing: 0.5px;
}
.ce-val {
  font-size: 13px;
  font-weight: 800;
  color: var(--t0);
}

/* ── GPS en navegación activa ── */
.map-container.nav-mode .fab-gps {
  bottom: 124px;
}
.map-container.nav-mode.cateye-open .fab-gps {
  bottom: 164px;
}

.map-container.nav-mode .fab-search,
.map-container.nav-mode .fab-offline,
.map-container.nav-mode .map-search-panel,
.map-container.nav-mode .transport-mode-selector,
.map-container.nav-mode .map-fabs,
.map-container.nav-mode .bottom-sheet:not(#peloton-dedicated-sheet),
.map-container.nav-mode .leaflet-right {
  display: none !important;
}

.map-container.nav-mode .fab-peloton {
  display: flex !important;
  top: 12px;
  right: 12px;
}

/* ── Velocímetro flotante ── */
.nav-speedometer {
  position: absolute;
  right: 10px;
  bottom: 186px;
  width: 62px;
  height: 62px;
  background: rgba(12, 12, 12, 0.95);
  border: 2.5px solid var(--cy);
  border-radius: 50%;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 22px rgba(0, 229, 255, 0.4);
  z-index: 1000;
  pointer-events: auto;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-speedometer:active {
  transform: scale(0.9);
}
.nav-speedometer.paused {
  border-color: var(--ye) !important;
  box-shadow: 0 4px 22px rgba(253, 224, 71, 0.4) !important;
}
.map-container.nav-mode .nav-speedometer {
  display: flex;
  animation: scaleInSpeed 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.map-container.nav-mode.cateye-open .nav-speedometer {
  bottom: 226px;
}
.nav-speedometer-val {
  font-size: 24px;
  font-weight: 900;
  color: var(--t0);
  line-height: 1;
  font-family: 'Outfit', 'Inter', sans-serif;
  letter-spacing: -0.5px;
}
.nav-speedometer-unit-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  margin-top: 2px;
  line-height: 1;
}
.nav-speedometer-unit {
  font-size: 8.5px;
  color: var(--cy);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  line-height: 1;
}
.nav-speedometer-plus {
  font-size: 13px;
  color: var(--ye);
  font-weight: 900;
  line-height: 1;
  display: inline-block;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.map-container.cateye-open .nav-speedometer-plus {
  transform: rotate(45deg);
}

@keyframes scaleInSpeed {
  from { transform: scale(0); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* ── Indicador REC ── */
.fab-record.recording::before {
  content: '● REC';
  position: absolute;
  right: 52px;
  background: rgba(12, 12, 12, 0.95);
  border: 1.5px solid var(--re);
  color: var(--re);
  font-size: 10px;
  font-weight: 900;
  padding: 4px 8px;
  border-radius: 12px;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(255, 75, 75, 0.35);
  white-space: nowrap;
  animation: recBlink 6s infinite ease-in-out;
  pointer-events: none;
}

@keyframes recBlink {
  0%, 90% { opacity: 1; }
  95% { opacity: 0.05; }
  100% { opacity: 1; }
}

/* ── Descarga de mapa offline ── */
.map-download-open .transport-mode-selector,
.map-download-open #btn-record-route,
.map-download-open .leaflet-control-zoom {
  display: none !important;
}

/* ── Planificador de Rutas ── */
.planner-bar {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1010;
  background: rgba(139, 92, 246, 0.92);
  backdrop-filter: blur(8px);
  color: #fff;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  align-items: center;
  justify-content: space-between;
}
.planner-bar.on {
  display: flex;
}
.planner-bar-close {
  background: none !important;
  border: 1px solid rgba(255,255,255,0.4) !important;
  color: #fff !important;
  font-size: 14px !important;
  padding: 4px 10px !important;
  border-radius: 4px !important;
  cursor: pointer;
}

.planner-card {
  display: none;
  position: fixed;
  bottom: 62px;
  left: 8px;
  right: 8px;
  z-index: 1010;
  background: rgba(18, 18, 22, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(139, 92, 246, 0.35);
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.5);
}
.planner-card.on {
  display: block;
}
.planner-card-meta {
  font-size: 12px;
  color: var(--t1);
  margin-bottom: 10px;
  text-align: center;
}
.planner-card-actions {
  display: flex;
  gap: 8px;
}
.planner-card-actions .btn {
  flex: 1;
  padding: 9px 6px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
}
.planner-card-actions .btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
