/* ==========================================================================
   LupoTrail Route Studio — Dedicated Full-Screen Web Route Builder
   Warm Canyon Charcoal & Terracotta Rust Theme with Glassmorphism
   Designed for LupoTrail Multisport GPS
   ========================================================================== */

/* ── App Shell & Full-Screen Canvas ── */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background-color: var(--bg-darkest, #161413);
  color: var(--text-primary, #FAF7F4);
  font-family: var(--font-body, 'Inter', sans-serif);
  -webkit-font-smoothing: antialiased;
}

.studio-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
  position: relative;
  overflow: hidden;
}

/* ── Top Navigation Bar ── */
.studio-header {
  height: 60px;
  background: rgba(22, 20, 19, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(224, 99, 67, 0.18);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 1100;
  position: relative;
}

.studio-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
}

.studio-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary, #FAF7F4);
  font-family: var(--font-heading, 'Outfit', sans-serif);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.studio-brand-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  background: rgba(224, 99, 67, 0.15);
  border: 1px solid rgba(224, 99, 67, 0.35);
  color: #F08B71;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.studio-search-bar {
  position: relative;
  width: 280px;
  max-width: 100%;
}

.studio-search-input {
  width: 100%;
  height: 38px;
  background: rgba(34, 30, 28, 0.7);
  border: 1px solid rgba(250, 247, 244, 0.12);
  border-radius: 10px;
  padding: 0 14px 0 36px;
  color: #FAF7F4;
  font-size: 13px;
  font-family: var(--font-body, 'Inter', sans-serif);
  outline: none;
  transition: all 0.2s ease;
}

.studio-search-input:focus {
  border-color: var(--terracotta, #E06343);
  background: rgba(44, 39, 36, 0.95);
  box-shadow: 0 0 0 3px rgba(224, 99, 67, 0.2);
}

.studio-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted, #8C827A);
  pointer-events: none;
  font-size: 13px;
}

.studio-search-results {
  position: absolute;
  top: 44px;
  left: 0;
  right: 0;
  background: #221E1C;
  border: 1px solid rgba(224, 99, 67, 0.25);
  border-radius: 10px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6);
  max-height: 280px;
  overflow-y: auto;
  z-index: 1500;
  display: none;
}

.studio-search-item {
  padding: 10px 14px;
  font-size: 13px;
  color: #FAF7F4;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.15s ease;
}

.studio-search-item:hover {
  background: rgba(224, 99, 67, 0.15);
  color: #FFFDFB;
}

.studio-search-item:last-child {
  border-bottom: none;
}

.studio-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.studio-nav-link {
  color: var(--text-secondary, #C5B7A8);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 8px;
  transition: all 0.15s ease;
}

.studio-nav-link:hover {
  color: #FAF7F4;
  background: rgba(255, 255, 255, 0.05);
}

/* ── Main Workspace: Map & Panels ── */
.studio-body {
  flex: 1;
  position: relative;
  display: flex;
  height: calc(100vh - 60px);
  width: 100%;
}

#map {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  background-color: #12100e;
  cursor: crosshair;
}

/* ── Floating Left Studio Deck / Sidebar ── */
.studio-deck {
  position: absolute;
  top: 16px;
  left: 16px;
  bottom: 16px;
  width: 380px;
  background: rgba(22, 20, 19, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(224, 99, 67, 0.22);
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 30px rgba(224, 99, 67, 0.08);
  z-index: 500;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
}

.studio-deck.collapsed {
  transform: translateX(-400px);
  pointer-events: none;
}

.studio-deck-header {
  padding: 16px 18px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.studio-route-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

.studio-route-title-input {
  flex: 1;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #FAF7F4;
  font-family: var(--font-heading, 'Outfit', sans-serif);
  font-size: 18px;
  font-weight: 700;
  padding: 4px 8px;
  outline: none;
  transition: all 0.2s ease;
}

.studio-route-title-input:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
}

.studio-route-title-input:focus {
  background: rgba(34, 30, 28, 0.95);
  border-color: var(--terracotta, #E06343);
  box-shadow: 0 0 0 3px rgba(224, 99, 67, 0.2);
}

.studio-deck-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Custom Scrollbar for Deck */
.studio-deck-content::-webkit-scrollbar {
  width: 6px;
}
.studio-deck-content::-webkit-scrollbar-track {
  background: transparent;
}
.studio-deck-content::-webkit-scrollbar-thumb {
  background: rgba(224, 99, 67, 0.25);
  border-radius: 4px;
}
.studio-deck-content::-webkit-scrollbar-thumb:hover {
  background: rgba(224, 99, 67, 0.45);
}

/* ── Segmented Control Switchers ── */
.studio-control-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.studio-control-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted, #8C827A);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.segmented-bar {
  display: flex;
  background: rgba(34, 30, 28, 0.8);
  border: 1px solid rgba(250, 247, 244, 0.08);
  border-radius: 10px;
  padding: 3px;
  gap: 3px;
}

.segmented-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-secondary, #C5B7A8);
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 12px;
  font-weight: 600;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.segmented-btn:hover {
  color: #FAF7F4;
  background: rgba(255, 255, 255, 0.04);
}

.segmented-btn.active {
  background: linear-gradient(135deg, rgba(224, 99, 67, 0.28) 0%, rgba(200, 77, 46, 0.35) 100%);
  color: #FAF7F4;
  border: 1px solid rgba(224, 99, 67, 0.5);
  box-shadow: 0 2px 8px rgba(224, 99, 67, 0.2);
}

.segmented-btn.active-cyan {
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.2) 0%, rgba(0, 195, 255, 0.3) 100%);
  color: #FAF7F4;
  border: 1px solid rgba(0, 242, 254, 0.5);
  box-shadow: 0 2px 8px rgba(0, 242, 254, 0.2);
}

/* ── Live Route Metrics HUD Card ── */
.studio-stats-hud {
  background: linear-gradient(180deg, rgba(34, 30, 28, 0.9) 0%, rgba(25, 23, 21, 0.95) 100%);
  border: 1px solid rgba(224, 99, 67, 0.2);
  border-radius: 14px;
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.studio-stat-box {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.studio-stat-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted, #8C827A);
}

.studio-stat-value {
  font-family: var(--font-heading, 'Outfit', sans-serif);
  font-size: 19px;
  font-weight: 800;
  color: #FAF7F4;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.studio-stat-unit {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary, #C5B7A8);
  margin-left: 2px;
}

/* ── Route Toolbar Actions (Undo, Redo, Loop, Reverse, Clear) ── */
.studio-tools-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

.studio-tool-btn {
  background: rgba(34, 30, 28, 0.85);
  border: 1px solid rgba(250, 247, 244, 0.1);
  border-radius: 10px;
  color: var(--text-secondary, #C5B7A8);
  padding: 8px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 10px;
  font-weight: 600;
}

.studio-tool-btn span.icon {
  font-size: 15px;
}

.studio-tool-btn:hover:not(:disabled) {
  background: rgba(224, 99, 67, 0.18);
  border-color: rgba(224, 99, 67, 0.4);
  color: #FAF7F4;
  transform: translateY(-1px);
}

.studio-tool-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

/* ── Waypoints Section ── */
.studio-waypoints-card {
  background: rgba(34, 30, 28, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.studio-waypoints-header {
  padding: 10px 14px;
  background: rgba(22, 20, 19, 0.5);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary, #C5B7A8);
}

.studio-waypoints-list {
  max-height: 180px;
  overflow-y: auto;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.studio-waypoint-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  font-size: 12px;
  color: #FAF7F4;
  transition: background 0.15s ease;
}

.studio-waypoint-row:hover {
  background: rgba(224, 99, 67, 0.12);
}

.studio-wpt-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 800;
  margin-right: 8px;
}

.studio-wpt-badge.start {
  background: #3FA66B;
  color: #FFF;
}

.studio-wpt-badge.mid {
  background: #4A4542;
  color: #FAF7F4;
  border: 1px solid rgba(224, 99, 67, 0.5);
}

.studio-wpt-badge.end {
  background: #E06343;
  color: #FFF;
}

.studio-wpt-del-btn {
  background: transparent;
  border: none;
  color: var(--text-muted, #8C827A);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  transition: color 0.15s;
}

.studio-wpt-del-btn:hover {
  color: #E04848;
}

.studio-empty-waypoints {
  padding: 20px 14px;
  text-align: center;
  color: var(--text-muted, #8C827A);
  font-size: 12px;
  line-height: 1.5;
}

/* ── Deck Footer (Export & Save) ── */
.studio-deck-footer {
  padding: 14px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(22, 20, 19, 0.6);
}

.btn-primary-studio {
  background: linear-gradient(135deg, #E06343 0%, #C84D2E 100%);
  color: #FFFDFB;
  border: none;
  border-radius: 10px;
  padding: 10px 16px;
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(224, 99, 67, 0.35);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-primary-studio:hover:not(:disabled) {
  background: linear-gradient(135deg, #F08B71 0%, #E06343 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(224, 99, 67, 0.45);
}

.btn-primary-studio:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
}

.studio-secondary-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.btn-secondary-studio {
  background: rgba(44, 39, 36, 0.7);
  color: var(--text-primary, #FAF7F4);
  border: 1px solid rgba(250, 247, 244, 0.12);
  border-radius: 10px;
  padding: 8px 12px;
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.btn-secondary-studio:hover:not(:disabled) {
  background: rgba(54, 48, 44, 0.95);
  border-color: rgba(224, 99, 67, 0.3);
}

.btn-secondary-studio:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ── Toggle Deck Collapse Button ── */
.studio-deck-toggle {
  position: absolute;
  top: 16px;
  left: 406px;
  background: rgba(22, 20, 19, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(224, 99, 67, 0.22);
  border-radius: 10px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FAF7F4;
  cursor: pointer;
  z-index: 500;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
  transition: all 0.25s ease;
}

.studio-deck-toggle:hover {
  background: rgba(44, 39, 36, 0.95);
  border-color: var(--terracotta, #E06343);
}

.studio-deck-toggle.collapsed {
  left: 16px;
}

/* ── Top-Right Map Utilities & Layer Switcher ── */
.studio-map-controls {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
}

.studio-glass-card {
  background: rgba(22, 20, 19, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(224, 99, 67, 0.22);
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.studio-layer-picker {
  display: flex;
  gap: 4px;
}

.studio-layer-btn {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary, #C5B7A8);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
}

.studio-layer-btn:hover {
  color: #FAF7F4;
  background: rgba(255, 255, 255, 0.05);
}

.studio-layer-btn.active {
  background: rgba(224, 99, 67, 0.2);
  border-color: rgba(224, 99, 67, 0.4);
  color: #FAF7F4;
}

.studio-icon-btn {
  background: rgba(22, 20, 19, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(224, 99, 67, 0.22);
  border-radius: 10px;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FAF7F4;
  cursor: pointer;
  font-size: 16px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
  transition: all 0.15s ease;
}

.studio-icon-btn:hover {
  background: rgba(44, 39, 36, 0.95);
  border-color: var(--terracotta, #E06343);
  transform: translateY(-1px);
}

/* ── Bottom Elevation Profile Drawer ── */
.studio-elevation-panel {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 180px;
  background: rgba(22, 20, 19, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(224, 99, 67, 0.22);
  z-index: 450;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.6);
}

.studio-elevation-panel.collapsed {
  transform: translateY(145px);
}

.studio-elevation-header {
  height: 35px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
}

.studio-elevation-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary, #C5B7A8);
  display: flex;
  align-items: center;
  gap: 8px;
}

.studio-elevation-stats {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted, #8C827A);
}

.studio-elevation-stats span.val {
  color: #FAF7F4;
  font-weight: 700;
}

.studio-elevation-canvas-wrap {
  flex: 1;
  position: relative;
  width: 100%;
  padding: 6px 20px 10px;
}

#elevationChart {
  width: 100%;
  height: 100%;
  display: block;
}

/* ── Interactive Map Marker Styling (Custom Leaflet DivIcon) ── */
.leaflet-div-icon {
  background: transparent !important;
  border: none !important;
}

.lupo-marker-pin {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading, 'Outfit', sans-serif);
  font-weight: 800;
  font-size: 12px;
  color: #FFF;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6), 0 0 0 3px rgba(0, 0, 0, 0.3);
  cursor: grab;
  transition: transform 0.15s ease;
}

.lupo-marker-pin:active {
  cursor: grabbing;
  transform: scale(1.15);
}

.lupo-marker-start {
  background: #3FA66B;
  box-shadow: 0 4px 14px rgba(63, 166, 107, 0.5), 0 0 0 3px #161413;
}

.lupo-marker-mid {
  background: #2C2724;
  border: 2px solid #E06343;
  color: #FAF7F4;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6), 0 0 0 2px #161413;
}

.lupo-marker-end {
  background: #E06343;
  box-shadow: 0 4px 14px rgba(224, 99, 67, 0.5), 0 0 0 3px #161413;
}

.lupo-hover-marker {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #00f2fe;
  border: 2px solid #FFF;
  box-shadow: 0 0 10px #00f2fe;
}

/* ── Saved Routes Modal / Drawer ── */
.studio-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.studio-modal-overlay.open {
  display: flex;
}

.studio-modal-card {
  width: 100%;
  max-width: 540px;
  background: #191715;
  border: 1px solid rgba(224, 99, 67, 0.3);
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(224, 99, 67, 0.12);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-height: 85vh;
}

.studio-modal-header {
  padding: 18px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.studio-modal-title {
  font-family: var(--font-heading, 'Outfit', sans-serif);
  font-size: 18px;
  font-weight: 700;
  color: #FAF7F4;
}

.studio-modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted, #8C827A);
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
}

.studio-modal-close:hover {
  color: #FAF7F4;
}

.studio-modal-body {
  padding: 18px 22px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.saved-route-card {
  background: rgba(34, 30, 28, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.15s ease;
}

.saved-route-card:hover {
  background: rgba(44, 39, 36, 0.95);
  border-color: rgba(224, 99, 67, 0.35);
  transform: translateY(-1px);
}

.saved-route-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.saved-route-name {
  font-size: 14px;
  font-weight: 700;
  color: #FAF7F4;
}

.saved-route-meta {
  font-size: 12px;
  color: var(--text-muted, #8C827A);
  display: flex;
  gap: 10px;
}

.saved-route-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Toast Notification ── */
.studio-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: rgba(22, 20, 19, 0.95);
  border: 1px solid rgba(224, 99, 67, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 12px 18px;
  border-radius: 12px;
  color: #FAF7F4;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
  z-index: 3000;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.studio-toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* ── Route Calculating Spinner ── */
.calc-spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(224, 99, 67, 0.3);
  border-top-color: #E06343;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Mobile Responsiveness ── */
@media (max-width: 768px) {
  .studio-deck {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 60vh;
    border-radius: 20px 20px 0 0;
    border-bottom: none;
  }
  .studio-deck.collapsed {
    transform: translateY(100%);
  }
  .studio-deck-toggle {
    top: auto;
    bottom: 62vh;
    left: 16px;
  }
  .studio-search-bar {
    width: 180px;
  }
  .studio-header {
    padding: 0 12px;
  }
  .studio-elevation-panel {
    display: none; /* Hide bottom chart on small mobile screens to conserve space */
  }
}
