/* Race Page Styles */

.race-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Race header */
.race-header {
  background: var(--bg-card);
  padding: 110px 0 30px;
  position: relative;
}

.race-header__nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.race-header__fav {
  font-size: 22px;
  padding: 8px;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.race-header__fav:hover {
  background: var(--flame-subtle);
}

@media (max-width: 768px) {
  .race-header {
    padding: 90px 0 24px;
  }
}

.race-screen { background-color: #F7F7F8; min-height: 100vh; padding-bottom: 40px; }
.race-content { max-width: 900px; margin: 0 auto; padding: 0 16px; }
.race-stats { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 8px; }
.race-stat { display: flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 600; color: var(--text-secondary); }
.race-stat i { color: var(--flame); font-size: 13px; }
.race-stats .unit-toggle { margin-right: 8px; }
.card { background-color: #FFFFFF; border-radius: 16px; padding: 20px; margin-top: 12px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04); }
.card__title { font-size: 17px; font-weight: 600; color: #000000; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.card__title i { color: #F26419; }
.info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.info-item { background: #F2F2F7; border-radius: 12px; padding: 14px; text-align: center; }
.info-item__icon { font-size: 20px; color: #F26419; margin-bottom: 6px; }
.info-item__label { font-size: 11px; color: #8E8E93; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.info-item__value { font-size: 18px; font-weight: 600; color: #000000; transition: opacity 0.2s; }

/* Race Alert Pills */
.race-alerts-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.race-alert-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 20px;
  font-size: 13px; font-weight: 600;
  border: none; cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.race-alert-pill:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
.race-alert-pill--danger  { background: rgba(220,38,38,0.12); color: #DC2626; }
.race-alert-pill--warning { background: rgba(217,119,6,0.12); color: #D97706; }
.race-alert-pill--info    { background: rgba(37,99,235,0.12); color: #2563EB; }

/* Unit Toggle */
.unit-toggle { display: flex; background: var(--bg-body); border: 1px solid var(--border); border-radius: 8px; padding: 2px; }
.unit-btn { border: none; background: transparent; padding: 4px 10px; font-size: 12px; font-weight: 600; color: var(--text-muted); cursor: pointer; border-radius: 6px; transition: all 0.2s; }
.unit-btn.active { background: var(--flame); color: white; }
.unit-btn:hover:not(.active) { color: var(--text-primary); }

/* Aid Filter Toggle (in card titles) */
.aid-filter-toggle { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-muted); cursor: pointer; font-weight: 500; white-space: nowrap; }
.card__title-actions { display: flex; align-items: center; gap: 12px; }
.toggle-switch { position: relative; display: inline-block; width: 36px; height: 20px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-switch__slider {
  position: absolute; inset: 0; background: #E5E5EA; border-radius: 10px;
  transition: background 0.3s;
}
.toggle-switch__slider::before {
  content: ''; position: absolute; left: 2px; top: 2px;
  width: 16px; height: 16px; background: white; border-radius: 50%;
  transition: transform 0.3s; box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.toggle-switch input:checked + .toggle-switch__slider { background: var(--flame); }
.toggle-switch input:checked + .toggle-switch__slider::before { transform: translateX(16px); }

/* Hidden states for aid filter */
.segment-row--hidden { display: none; }
.segment-connector-row--hidden { display: none; }
#map { width: 100%; height: 500px; border-radius: 12px; }
#elevationChart { width: 100%; height: 180px; max-height: 180px; }
#effortChart { width: 100%; height: 250px; max-height: 300px; }
.chart-legend { display: flex; justify-content: center; gap: 16px; padding: 8px 0 0; font-size: 12px; color: #8E8E93; }
.chart-legend__item { display: flex; align-items: center; gap: 5px; }
.chart-legend__swatch { width: 12px; height: 12px; border-radius: 3px; flex-shrink: 0; }

/* Segments Timeline */
.segments-timeline { position: relative; }
.segment-row { position: relative; padding-left: 24px; }
/* Line from dot center to bottom of segment-row */
.segment-row::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 26px;
  bottom: 0;
  width: 2px;
  background-color: var(--race-color);
  z-index: 1;
}
.segment-row--last::after { display: none; }
/* Line from top of segment-row to dot center */
.segment-row::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 0;
  height: 26px;
  width: 2px;
  background-color: var(--race-color);
  z-index: 1;
}
.segment-row--first::before { display: none; }
.segment-dot {
  position: absolute; left: 0; top: 20px;
  width: 12px; height: 12px; border-radius: 50%;
  background-color: var(--race-color);
  border: 2px solid var(--race-color);
  z-index: 2;
}
.segment-dot--checkpoint { background-color: var(--race-color); border-color: var(--race-color); }
.segment-card {
  background-color: #FFFFFF;
  border-radius: 16px; padding: 16px;
  border: 1px solid #E5E5EA;
}
.segment-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; gap: 12px; }
.segment-name-section { flex: 1; }
.segment-name { font-size: 16px; font-weight: 600; color: #000000; margin: 0; }
.segment-aids { display: flex; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.segment-aid { font-size: 16px; display: flex; align-items: center; }
.segment-times { text-align: right; font-size: 12px; }
.segment-time { display: flex; align-items: center; gap: 4px; justify-content: flex-end; color: #8E8E93; }
.segment-time--cutoff { color: #EF4444; font-weight: 500; }
.time-icon { font-size: 11px; }
.segment-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; font-size: 11px; }
.segment-metric__label { display: block; color: #8E8E93; margin-bottom: 2px; }
.segment-metric__value { display: block; color: #000000; font-weight: 500; }
.segment-metric__value--positive { color: #22C55E; }
.segment-metric__value--negative { color: #F59E0B; }

/* Segment Connector */
.segment-connector-row { position: relative; padding-left: 24px; padding-top: 8px; padding-bottom: 8px; }
.segment-connector-line {
  position: absolute; left: 5px; top: 0; bottom: 0;
  width: 2px; background-color: var(--race-color);
}
.segment-connector {
  background-color: #F5F5F5;
  border-radius: 12px; padding: 10px 14px;
  border: 1px solid #E5E5EA;
  margin-left: 12px;
  display: flex; flex-direction: column; align-items: flex-start;
  font-size: 11px; gap: 6px;
}
.segment-connector__stats { color: #6B6B6B; display: flex; gap: 12px; flex-wrap: wrap; }
.segment-connector__stats span { color: #000000; }
.segment-connector__stats i.fas, .segment-connector__speeds i.fas { color: inherit; }
.segment-connector__stats .stat-positive { color: #22C55E; }
.segment-connector__stats .stat-negative { color: #F59E0B; }
.segment-connector__speeds { color: #6B6B6B; display: flex; flex-direction: column; gap: 2px; }
.speed-pace { color: #8E8E93; margin-left: 4px; }
.error-message { background: #FFF3CD; border: 1px solid #F59E0B; border-radius: 16px; padding: 16px; margin: 16px; color: #92400E; text-align: center; }
.race-footer { background: #FFFFFF; color: #8E8E93; font-size: 13px; text-align: center; padding: 20px; margin-top: 40px; }

@media (max-width: 768px) {
  .alpine-page-header__title { font-size: 24px; }
  #map { height: 300px; }
  .info-item__value { font-size: 16px; }
  .segment-header { flex-direction: column; gap: 8px; }
  .segment-times { text-align: left; }
  .segment-time { justify-content: flex-start; }
  .segment-metrics { grid-template-columns: repeat(2, 1fr); }
  .segment-connector { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 400px) {
  .info-grid { grid-template-columns: 1fr; }
  .segment-metrics { grid-template-columns: 1fr 1fr; }
}

/* 3D View Button */
.card__title--flex { display: flex; justify-content: space-between; align-items: center; }
.btn-3d-view {
  background: linear-gradient(135deg, #F26419, #FF7A33);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn-3d-view:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(242, 100, 25, 0.4);
}

/* GPX Export Button */
.btn-gpx-export {
  background: var(--bg-card);
  color: var(--flame);
  border: 1.5px solid var(--flame);
  border-radius: var(--radius-md);
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition);
  letter-spacing: 0.2px;
}
.btn-gpx-export:hover {
  background: var(--flame);
  color: white;
  box-shadow: var(--shadow-glow);
}
.card__title-buttons {
  display: flex;
  gap: 8px;
}

/* GPX Modal Overlay (shared) */
.gpx-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* Login Prompt Modal */
.gpx-gate {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 48px 40px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-lg);
  animation: gpxModalIn 0.25s ease-out;
}
@keyframes gpxModalIn {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.gpx-gate__icon {
  width: 64px; height: 64px; border-radius: 50%;
  background: linear-gradient(135deg, rgba(242,100,25,0.08), rgba(242,100,25,0.02));
  border: 1.5px solid rgba(242,100,25,0.15);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
  font-size: 26px; color: var(--flame);
}
.gpx-gate__title {
  font-size: 20px; font-weight: 700; color: var(--text-primary);
  margin-bottom: 8px; letter-spacing: -0.3px;
}
.gpx-gate__desc {
  font-size: 14px; color: var(--text-secondary);
  margin-bottom: 28px; line-height: 1.6;
}
.gpx-gate__btn {
  display: block; width: 100%;
  padding: 12px 24px; border: none; border-radius: var(--radius-md);
  font-size: 15px; font-weight: 600; cursor: pointer;
  text-decoration: none; text-align: center;
  transition: all var(--transition);
}
.gpx-gate__btn--flame,
.gpx-gate__btn--flame:visited,
.gpx-gate__btn--flame:focus,
.gpx-gate__btn--flame:active,
.gpx-gate__btn--flame:hover {
  color: white !important;
  background: var(--flame) !important;
  text-decoration: none !important;
  box-shadow: var(--shadow-glow);
}
.gpx-gate__btn--flame:hover {
  background: var(--flame-dark) !important;
  transform: translateY(-1px);
}
.gpx-gate__btn--garmin,
.gpx-gate__btn--garmin:visited,
.gpx-gate__btn--garmin:focus,
.gpx-gate__btn--garmin:active,
.gpx-gate__btn--garmin:hover {
  background: #007DC3 !important;
  color: white !important;
}
.gpx-gate__btn--garmin:hover {
  background: #006299 !important;
  transform: translateY(-1px);
}
.gpx-gate__btn--ghost {
  background: none; color: var(--text-muted);
  font-size: 13px; font-weight: 500; margin-top: 12px;
  padding: 8px;
}
.gpx-gate__btn--ghost:hover { color: var(--text-secondary); }

/* Subscription Upsell Modal */
.gpx-gate__badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: linear-gradient(135deg, rgba(242,100,25,0.1), rgba(242,100,25,0.04));
  border: 1px solid rgba(242,100,25,0.2);
  color: var(--flame);
  font-size: 12px; font-weight: 700; letter-spacing: 0.5px;
  padding: 6px 16px; border-radius: 20px;
  margin-bottom: 20px; text-transform: uppercase;
}
.gpx-gate__features {
  list-style: none; padding: 0; margin: 0 0 28px;
  text-align: left;
}
.gpx-gate__features li {
  padding: 8px 0; font-size: 14px; color: var(--text-secondary);
  display: flex; align-items: center; gap: 10px;
}
.gpx-gate__features li i {
  color: #16A34A; font-size: 13px; flex-shrink: 0;
}
.gpx-gate__price {
  font-size: 13px; color: var(--text-muted); margin-top: 12px;
}
.gpx-gate__divider {
  font-size: 13px; color: var(--text-muted); margin: 16px 0 12px;
  display: flex; align-items: center; gap: 12px;
}
.gpx-gate__divider::before,
.gpx-gate__divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}
.gpx-gate__btn--outline-flame,
.gpx-gate__btn--outline-flame:visited,
.gpx-gate__btn--outline-flame:focus,
.gpx-gate__btn--outline-flame:active,
.gpx-gate__btn--outline-flame:hover {
  background: transparent !important;
  color: var(--flame) !important;
  border: 1.5px solid var(--flame);
}
.gpx-gate__btn--outline-flame:hover {
  background: rgba(242,100,25,0.06) !important;
  transform: translateY(-1px);
}

/* GPX Export Modal (subscriber) */
.gpx-export {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  max-width: 480px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: gpxModalIn 0.25s ease-out;
}
.gpx-export__header {
  padding: 24px 28px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.gpx-export__header-left {
  display: flex; align-items: center; gap: 12px;
}
.gpx-export__header-icon {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, rgba(242,100,25,0.08), rgba(242,100,25,0.02));
  border: 1.5px solid rgba(242,100,25,0.15);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: var(--flame);
}
.gpx-export__header h3 {
  margin: 0; font-size: 17px; font-weight: 700;
  color: var(--text-primary); letter-spacing: -0.2px;
}
.gpx-export__header-sub {
  font-size: 12px; color: var(--text-muted); margin-top: 2px;
}
.gpx-export__close {
  background: var(--bg-body);
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 32px; height: 32px; border-radius: 50%;
  cursor: pointer; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.gpx-export__close:hover { background: var(--border); color: var(--text-primary); }
.gpx-export__body { padding: 16px 28px; }
.gpx-export__select-all {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--border);
  margin-bottom: 8px; font-size: 14px; font-weight: 600;
  color: var(--text-primary);
}
.gpx-export__select-all input[type="checkbox"],
.gpx-waypoint-item input[type="checkbox"] {
  width: 18px; height: 18px;
  accent-color: var(--flame); cursor: pointer;
}
.gpx-waypoint-list {
  max-height: 360px; overflow-y: auto;
  margin: 0 -28px; padding: 0 28px;
}
.gpx-waypoint-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--bg-body);
  font-size: 14px; cursor: pointer;
  transition: background var(--transition);
}
.gpx-waypoint-item:last-child { border-bottom: none; }
.gpx-waypoint-item:hover { background: var(--bg-body); margin: 0 -28px; padding: 10px 28px; }
.gpx-waypoint-icon {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: white; flex-shrink: 0;
  border: 2px solid white;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}
.gpx-waypoint-info { flex: 1; min-width: 0; }
.gpx-waypoint-name {
  font-weight: 500; color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.gpx-waypoint-meta {
  display: flex; align-items: center; gap: 8px;
  margin-top: 2px; font-size: 12px; color: var(--text-muted);
}
.gpx-waypoint-aids { display: flex; gap: 4px; font-size: 14px; }
.gpx-export__footer {
  padding: 16px 28px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
}
.gpx-export__btn-watch-wrapper {
  flex: 3;
  position: relative;
}
.gpx-export__btn-watch {
  width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--flame); color: white;
  border: none; border-radius: var(--radius-md);
  padding: 13px; font-size: 15px; font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: var(--shadow-glow);
}
.gpx-export__btn-watch:hover {
  background: var(--flame-dark);
  transform: translateY(-1px);
}
.gpx-export__btn-download {
  flex: 1;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--bg-body); color: var(--text-primary);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 13px; font-size: 15px; font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}
.gpx-export__btn-download:hover {
  background: var(--border);
  transform: translateY(-1px);
}
.gpx-watch-picker {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0; right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  z-index: 10;
  animation: gpxModalIn 0.15s ease-out;
}
.gpx-watch-picker__item {
  display: flex; align-items: center; gap: 12px;
  width: 100%;
  padding: 12px 16px;
  border: none; background: none;
  cursor: pointer;
  transition: background 0.15s;
  text-align: left; font-size: 14px;
}
.gpx-watch-picker__item:hover { background: var(--bg-body); }
.gpx-watch-picker__item + .gpx-watch-picker__item { border-top: 1px solid var(--border); }
.gpx-watch-picker__icon { width: 32px; height: 32px; border-radius: 8px; flex-shrink: 0; }
.gpx-watch-picker__label { flex: 1; font-weight: 600; color: var(--text-primary); }
.gpx-watch-picker__badge {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--text-muted);
}
.gpx-watch-picker__dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #D1D5DB;
}
.gpx-watch-picker__badge--connected .gpx-watch-picker__dot { background: #22C55E; }
.gpx-watch-picker__badge--connected { color: #16A34A; }

/* Suunto button style */
.gpx-gate__btn--suunto,
.gpx-gate__btn--suunto:visited,
.gpx-gate__btn--suunto:focus,
.gpx-gate__btn--suunto:active,
.gpx-gate__btn--suunto:hover {
  background: #E1261C !important;
  color: white !important;
}
.gpx-gate__btn--suunto:hover {
  background: #C41E16 !important;
  transform: translateY(-1px);
}

/* Legacy download button (keep for backwards compat) */
.gpx-export__download {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%;
  background: var(--flame); color: white;
  border: none; border-radius: var(--radius-md);
  padding: 13px; font-size: 15px; font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: var(--shadow-glow);
}
.gpx-export__download:hover {
  background: var(--flame-dark);
  transform: translateY(-1px);
}
@media (max-width: 480px) {
  .gpx-gate { padding: 36px 24px; }
  .gpx-export__header { padding: 20px; }
  .gpx-export__body { padding: 16px 20px; }
  .gpx-export__footer { padding: 16px 20px; }
  .gpx-waypoint-list { margin: 0 -20px; padding: 0 20px; }
  .gpx-waypoint-item:hover { margin: 0 -20px; padding: 10px 20px; }
}

/* 3D Modal */
.modal-3d-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
}
.modal-3d-overlay.active { display: flex; }
.modal-3d-content {
  background: #1a1a1a;
  border-radius: 16px;
  width: 95vw;
  height: 90vh;
  max-width: 1400px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}
.modal-3d-header {
  position: absolute;
  top: 0; left: 0; right: 0;
  padding: 12px 20px;
  background: linear-gradient(135deg, #F26419, #FF7A33);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
}
.modal-3d-header h3 { margin: 0; font-size: 16px; font-weight: 600; }
.modal-3d-controls { display: flex; align-items: center; gap: 12px; }
.style-selector {
  background: rgba(255,255,255,0.2);
  border: none;
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
}
.style-selector option { color: #333; }
.modal-3d-close {
  background: rgba(255,255,255,0.2);
  border: none;
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.modal-3d-close:hover { background: rgba(255,255,255,0.3); }
.preview-3d-banner { background: rgba(242,100,25,0.95); padding: 12px 20px; text-align: center; color: white; display: flex; align-items: center; justify-content: center; gap: 16px; position: absolute; bottom: 0; left: 0; right: 0; z-index: 10; }
.preview-3d-banner p { margin: 0; font-size: 14px; font-weight: 500; }
.preview-3d-btn { background: white; color: #F26419; padding: 6px 16px; border-radius: 8px; font-weight: 600; font-size: 13px; text-decoration: none; white-space: nowrap; }
.preview-3d-btn:hover { background: #f5f5f5; text-decoration: none; color: #E85D0F; }
#map3d { width: 100%; height: calc(100% - 56px); margin-top: 56px; }
.mapboxgl-ctrl-attrib { font-size: 10px !important; }

/* Rotation Controls */
.map3d-rotation-controls {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  background: rgba(255, 255, 255, 0.95);
  padding: 8px 12px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  z-index: 10;
}
.rotation-btn {
  width: 40px;
  height: 40px;
  border: none;
  background: #F26419;
  color: white;
  border-radius: 8px;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.rotation-btn:hover {
  background: #E05510;
  transform: scale(1.1);
}
.rotation-btn:active {
  transform: scale(0.95);
}

/* Flythrough Controls */
.flythrough-controls {
  position: absolute;
  top: 70px;
  left: 20px;
  display: flex;
  gap: 8px;
  z-index: 10;
}
.flythrough-btn {
  background: rgba(255, 255, 255, 0.95);
  border: none;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: all 0.2s;
}
.flythrough-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}
.flythrough-btn--play {
  background: linear-gradient(135deg, #22C55E, #16A34A);
  color: white;
}
.flythrough-btn--pause {
  background: linear-gradient(135deg, #F59E0B, #D97706);
  color: white;
}
.flythrough-btn--stop {
  background: linear-gradient(135deg, #EF4444, #DC2626);
  color: white;
}
.flythrough-btn.hidden {
  display: none;
}
.flythrough-speed-selector {
  background: rgba(255, 255, 255, 0.95);
  border: none;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  color: #333;
}
.flythrough-speed-selector.hidden {
  display: none;
}

/* Flythrough Elevation Profile */
.flythrough-elevation-container {
  position: absolute;
  bottom: 90px;
  left: 20px;
  right: 20px;
  height: 120px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  padding: 12px 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  z-index: 10;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}
.flythrough-elevation-container.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
#flythroughElevationChart {
  width: 100%;
  height: 100%;
}

/* Progress indicator */
.flythrough-progress {
  position: absolute;
  top: 70px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  z-index: 10;
  opacity: 0;
  transition: opacity 0.3s;
}
.flythrough-progress.visible {
  opacity: 1;
}
.flythrough-progress span {
  margin: 0 6px;
}
.flythrough-dplus {
  color: #22C55E;
}
.flythrough-dminus {
  color: #F59E0B;
}

/* Mapbox waypoint popup */
.flythrough-waypoint-popup .mapboxgl-popup-content {
  background: rgba(255, 255, 255, 0.75);
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  padding: 12px 14px;
}
.flythrough-waypoint-popup .mapboxgl-popup-tip {
  border-top-color: rgba(255, 255, 255, 0.75);
}
.map3d-rotation-controls.hidden {
  display: none;
}
