/* ==========================================================================
   Elevation Profile SVG Chart & Real-Time Scrubber Styles
   ========================================================================== */
.elevation-section {
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease;
}

.elevation-section:hover {
  border-color: #fdba74;
}

.elevation-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.elevation-header-title {
  font-size: 0.84rem;
  font-weight: 800;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 6px;
}

.elevation-header-sub {
  font-size: 0.70rem;
  color: #64748b;
  margin-top: 1px;
}

/* Live Stats Dashboard Bar */
.elev-stats-dashboard {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  background: #f8fafc;
  padding: 4px 6px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.elev-stat-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3px 2px;
}

.elev-stat-lbl {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
  letter-spacing: 0.2px;
}

.elev-stat-val {
  font-size: 0.85rem;
  font-weight: 800;
  color: #0f172a;
  margin-top: 2px;
  white-space: nowrap;
}

.elev-stat-val.highlight {
  color: #ea580c;
}

.elev-stat-val.accent {
  color: #0284c7;
}

/* SVG Chart Canvas Wrapper */
.elevation-svg-wrapper {
  position: relative;
  width: 100%;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  padding: 4px;
  overflow: hidden;
  user-select: none;
  touch-action: none;
}

.elevation-svg {
  width: 100%;
  height: 125px;
  display: block;
  cursor: crosshair;
}

.chart-grid-line {
  stroke: #e2e8f0;
  stroke-width: 1;
  stroke-dasharray: 3, 3;
}

.chart-axis-label {
  font-size: 9px;
  fill: #94a3b8;
  font-weight: 600;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.chart-cursor-line {
  stroke: #ea580c;
  stroke-width: 1.5;
  stroke-dasharray: 2, 2;
  display: none;
}

.chart-cursor-dot {
  fill: #ea580c;
  stroke: #ffffff;
  stroke-width: 2.5;
  filter: drop-shadow(0 2px 5px rgba(234, 88, 12, 0.45));
  display: none;
}

.elevation-footer-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.70rem;
  color: #64748b;
  font-weight: 600;
  padding: 0 2px;
}

/* ==========================================================================
   Floating Bottom Elevation Profile Panel on Map
   ========================================================================== */
.map-elevation-panel {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: min(840px, 92vw);
  background: rgba(255, 255, 255, 0.96);
  border-radius: 14px;
  border: 1.5px solid #e2e8f0;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(10px);
  padding: 10px 14px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease;
}

@media (max-width: 840px) {
  .map-elevation-panel {
    bottom: 74px; /* above mobile quick-bar */
    width: 95vw;
    padding: 8px 10px;
  }
}

.map-elevation-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.map-elevation-title {
  font-size: 0.82rem;
  font-weight: 800;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 6px;
}

.map-elev-live-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.74rem;
  color: #475569;
  background: #f1f5f9;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}

.btn-close-map-elev {
  background: transparent;
  border: none;
  font-size: 0.9rem;
  font-weight: 700;
  color: #94a3b8;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.btn-close-map-elev:hover {
  background: #fee2e2;
  color: #ef4444;
}
