/* Kolkata Metro CSS Design System - June 2026 */

:root {
  /* Default Dark Mode Color Tokens */
  --bg-main: #06070B;
  --bg-surface: rgba(13, 17, 28, 0.6);
  --bg-surface-glass: rgba(13, 17, 28, 0.45);
  --bg-surface-opaque: #0D111C;
  --bg-input: rgba(22, 28, 47, 0.6);
  --bg-hover: rgba(35, 45, 75, 0.5);
  --border-color: rgba(255, 255, 255, 0.06);
  --border-focus: #6366F1;
  --border-focus-glow: rgba(99, 102, 241, 0.25);
  --accent-gradient: linear-gradient(135deg, #6366F1 0%, #3B82F6 100%);
  
  --text-main: #F1F5F9;
  --text-muted: #94A3B8;
  --text-inverse: #06070B;
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 20px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 16px 36px rgba(0, 0, 0, 0.6);
  
  --glow-color: rgba(99, 102, 241, 0.4);
  
  /* Font Constants */
  --font-family-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-family-header: 'Outfit', sans-serif;
  
  /* Transit Line Standard Colors */
  --line-blue: #004F9F;
  --line-green: #00824A;
  --line-orange: #FF8200;
  --line-yellow: #E5B800;
  --line-purple: #7D26CD;
  --line-pink: #FF69B4;
  
  --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Light Mode Variables Override */
[data-theme="light"] {
  --bg-main: #F8FAFC;
  --bg-surface: rgba(255, 255, 255, 0.65);
  --bg-surface-glass: rgba(255, 255, 255, 0.5);
  --bg-surface-opaque: #FFFFFF;
  --bg-input: rgba(241, 245, 249, 0.8);
  --bg-hover: rgba(226, 232, 240, 0.8);
  --border-color: rgba(15, 23, 42, 0.06);
  --border-focus: #4F46E5;
  --border-focus-glow: rgba(79, 70, 229, 0.15);
  --accent-gradient: linear-gradient(135deg, #4F46E5 0%, #3B82F6 100%);
  
  --text-main: #0F172A;
  --text-muted: #64748B;
  --text-inverse: #FFFFFF;
  
  --shadow-sm: 0 2px 6px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 8px 16px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 16px 32px rgba(15, 23, 42, 0.08);
  
  --glow-color: rgba(79, 70, 229, 0.15);
}

/* General Resets */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-family-body);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* Ambient Background Glows */
.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.08;
  pointer-events: none;
  z-index: -1;
  transition: opacity var(--transition-normal);
}
.bg-glow-1 {
  top: -10%;
  right: 15%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #6366F1 0%, transparent 70%);
}
.bg-glow-2 {
  bottom: 5%;
  left: 5%;
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, #3B82F6 0%, transparent 70%);
}
.bg-glow-3 {
  top: 35%;
  right: 5%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, #EC4899 0%, transparent 70%);
}
[data-theme="light"] .bg-glow {
  opacity: 0.04;
}

/* Scrollbar customization */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Header Styling */
.app-header {
  background-color: var(--bg-surface-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  padding: 12px 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.metro-logo {
  color: var(--border-focus);
}

.brand h1 {
  font-family: var(--font-family-header);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.1;
}

.sub-brand {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

/* SVG & Dot Utilities */
.inline-svg {
  display: inline-block;
  vertical-align: middle;
  margin-right: 6px;
  width: 14px;
  height: 14px;
  stroke: currentColor;
}

.footer-heart {
  color: #ef4444;
  vertical-align: middle;
  margin: 0 4px;
  display: inline-block;
  animation: heartPulse 1.5s infinite;
}

@keyframes heartPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

.ticker-line-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: middle;
  box-shadow: 0 0 6px currentColor;
}
.ticker-line-dot.line-green {
  background-color: #00824A;
  color: rgba(0, 130, 74, 0.8);
}
.ticker-line-dot.line-blue {
  background-color: #004F9F;
  color: rgba(0, 79, 159, 0.8);
}
.ticker-line-dot.line-orange {
  background-color: #FF8200;
  color: rgba(255, 130, 0, 0.8);
}
.ticker-line-dot.line-purple {
  background-color: #7D26CD;
  color: rgba(125, 38, 205, 0.8);
}

/* Helplines styling */
.header-helplines {
  display: flex;
  gap: 8px;
}

.helpline-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 6px;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.helpline-badge.security {
  border-color: rgba(255, 59, 48, 0.3);
}

.helpline-badge.women {
  border-color: rgba(125, 38, 205, 0.3);
}

/* Language Switcher dropdown */
.lang-select-wrapper {
  position: relative;
}

.lang-select {
  background-color: var(--bg-input);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  font-family: var(--font-family-header);
  transition: border-color var(--transition-fast);
}

.lang-select:focus {
  border-color: var(--border-focus);
}

/* Ticker Alerts */
.ticker-wrap {
  display: flex;
  background-color: var(--bg-surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text-main);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 8px 24px;
  overflow: hidden;
  align-items: center;
  z-index: 90;
  border-bottom: 1px solid var(--border-color);
}

[data-theme="light"] .ticker-wrap {
  background-color: var(--bg-surface);
}

.ticker-title-area {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-right: 16px;
  margin-right: 16px;
  border-right: 1px solid var(--border-color);
  white-space: nowrap;
}

.live-pulse-dot {
  width: 8px;
  height: 8px;
  background-color: #EF4444;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.8);
  animation: tickerLivePulse 2.5s infinite;
}

@keyframes tickerLivePulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0px rgba(239, 68, 68, 0.4); }
  70% { transform: scale(1.15); box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0px rgba(239, 68, 68, 0); }
}

.ticker-title {
  font-family: var(--font-family-header);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.ticker-container {
  overflow: hidden;
  flex: 1;
  display: flex;
  align-items: center;
}

.ticker {
  display: flex;
  flex-shrink: 0;
  width: max-content;
  white-space: nowrap;
  animation: tickerAnimation 45s linear infinite;
  gap: 60px;
}

.ticker:hover {
  animation-play-state: paused;
}

@keyframes tickerAnimation {
  0% { transform: translate3d(100vw, 0, 0); }
  100% { transform: translate3d(-100%, 0, 0); }
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  font-size: 0.78rem;
  color: var(--text-main);
  opacity: 0.95;
}

/* Page Layout */
.app-container {
  display: grid;
  grid-template-columns: 380px 1fr;
  flex: 1;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  min-height: calc(100vh - 110px);
}

/* Sidebar & Tabs */
.sidebar {
  border-right: 1px solid var(--border-color);
  background-color: var(--bg-surface);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 110px);
  position: sticky;
  top: 65px;
  z-index: 10;
  transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

.sidebar-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
}

.tab-btn {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-family-header);
  font-weight: 600;
  font-size: 0.8rem;
  padding: 12px 6px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: color var(--transition-fast), background var(--transition-fast);
  border-bottom: 2px solid transparent;
}

.tab-btn:hover {
  color: var(--text-main);
  background-color: var(--bg-hover);
}

.tab-btn.active {
  color: var(--border-focus);
  border-bottom-color: var(--border-focus);
}

.sidebar-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.tab-panel {
  display: none;
  flex-direction: column;
  height: 100%;
}

.tab-panel.active {
  display: flex;
}

.panel-header {
  margin-bottom: 20px;
}

.panel-header h3 {
  font-family: var(--font-family-header);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.panel-header p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Form Styles */
.search-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.dot-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  position: absolute;
  left: 14px;
  pointer-events: none;
}

.green-pulse {
  background-color: #00cc66;
  box-shadow: 0 0 0 3px rgba(0, 204, 102, 0.2);
}

.red-pulse {
  background-color: #ff3b30;
  box-shadow: 0 0 0 3px rgba(255, 59, 48, 0.2);
}

.input-field {
  width: 100%;
  padding: 12px 35px 12px 35px;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  color: var(--text-main);
  font-family: var(--font-family-body);
  font-size: 0.9rem;
  outline: none;
  transition: all var(--transition-fast);
}

.input-field:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 14px var(--border-focus-glow);
  background-color: var(--bg-hover);
}

.btn-clear {
  position: absolute;
  right: 14px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
}

.btn-clear:hover {
  color: var(--text-main);
}

/* Swap Button Divider */
.swap-divider {
  display: flex;
  justify-content: center;
  margin: -6px 0;
  position: relative;
  z-index: 2;
}

.btn-swap {
  background-color: var(--bg-surface-opaque);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color var(--transition-fast), color var(--transition-fast), transform 0.25s ease;
  box-shadow: var(--shadow-sm);
}

.btn-swap:hover {
  border-color: var(--border-focus);
  color: var(--text-main);
  transform: rotate(180deg);
}

/* Search Autocomplete Suggestions */
.suggestions-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: var(--bg-surface-opaque);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  margin-top: 5px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 50;
  box-shadow: var(--shadow-lg);
  display: none;
}

.suggestion-item {
  padding: 10px 14px;
  cursor: pointer;
  font-size: 0.88rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color var(--transition-fast);
}

.suggestion-item:hover {
  background-color: var(--bg-hover);
}

.suggestion-item .station-badge {
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
  font-family: var(--font-family-header);
}

.btn:active {
  transform: scale(0.96);
}

.btn-primary {
  background: var(--accent-gradient);
  color: #ffffff;
  box-shadow: 0 4px 12px var(--border-focus-glow);
}

.btn-primary:hover {
  box-shadow: 0 6px 16px var(--border-focus-glow);
  opacity: 0.95;
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: var(--bg-input);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background-color: var(--bg-hover);
  border-color: var(--border-focus);
}

.btn-block {
  width: 100%;
}

.form-actions {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 10px;
  margin-top: 8px;
}

/* Results & Summary cards */
.results-container {
  margin-top: 25px;
  animation: slideDown 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.results-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}

.summary-card {
  background-color: var(--bg-surface-glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: var(--shadow-sm);
}

.summary-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 500;
}

.summary-value {
  font-family: var(--font-family-header);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
}

.advisory-box {
  background-color: rgba(229, 184, 0, 0.1);
  border: 1px solid var(--line-yellow);
  color: var(--text-main);
  font-size: 0.8rem;
  line-height: 1.4;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 20px;
}

/* Route Timeline Navigation */
.route-details h4 {
  font-family: var(--font-family-header);
  font-size: 1rem;
  margin-bottom: 12px;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.route-timeline {
  position: relative;
  padding-left: 20px;
}

.route-step {
  position: relative;
  padding-bottom: 20px;
}

.route-step:last-child {
  padding-bottom: 0;
}

/* Node lines connecting route steps */
.route-step::before {
  content: '';
  position: absolute;
  left: -13px;
  top: 15px;
  bottom: 0;
  width: 4px;
  background-color: var(--border-color);
  z-index: 1;
}

.route-step:last-child::before {
  display: none;
}

/* Active Line Colored path logic */
.route-step.blue::before { background-color: var(--line-blue); }
.route-step.green::before { background-color: var(--line-green); }
.route-step.orange::before { background-color: var(--line-orange); }
.route-step.yellow::before { background-color: var(--line-yellow); }
.route-step.purple::before { background-color: var(--line-purple); }
.route-step.pink::before { background-color: var(--line-pink); }

.step-node {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background-color: var(--bg-surface);
  border: 3px solid var(--border-color);
  position: absolute;
  left: -18px;
  top: 4px;
  z-index: 2;
}

.route-step.blue .step-node { border-color: var(--line-blue); }
.route-step.green .step-node { border-color: var(--line-green); }
.route-step.orange .step-node { border-color: var(--line-orange); }
.route-step.yellow .step-node { border-color: var(--line-yellow); }
.route-step.purple .step-node { border-color: var(--line-purple); }
.route-step.pink .step-node { border-color: var(--line-pink); }

.step-info {
  display: flex;
  flex-direction: column;
}

.step-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.step-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.timeline-segment {
  position: relative;
  margin: 12px 0;
  padding: 8px 12px;
  background-color: var(--bg-input);
  border-radius: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.timeline-segment::before {
  content: '';
  position: absolute;
  left: -13px;
  top: -13px;
  bottom: -1px;
  width: 0;
  border-left: 4px solid;
  border-left-color: var(--line-color, inherit);
  z-index: 1;
}

.interchange-alert {
  position: relative;
  background-color: rgba(0, 112, 243, 0.06);
  border: 1px dashed var(--border-focus);
  color: var(--text-main);
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  margin: 12px 0;
  display: flex;
  gap: 8px;
  align-items: center;
}

.interchange-alert::before {
  content: '';
  position: absolute;
  z-index: 1;
}

.interchange-alert.metro-interchange::before {
  left: -13px;
  top: -13px;
  bottom: -1px;
  width: 4px;
  background-color: var(--line-color);
}

.interchange-alert.cab-transfer::before,
.interchange-alert:not(.metro-interchange)::before {
  left: -12px;
  top: -13px;
  bottom: -1px;
  width: 2px;
  border-left: 2px dashed var(--text-muted);
  opacity: 0.5;
}

.interchange-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background-color: var(--border-focus);
  color: #fff;
  text-transform: uppercase;
}

/* Station Details Explorer Tab */
.station-details-card {
  margin-top: 15px;
  background-color: var(--bg-surface-glass);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 18px;
  box-shadow: var(--shadow-md);
  animation: slideDown 0.35s ease;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.station-header-card h3 {
  font-family: var(--font-family-header);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.line-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.line-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  color: #fff;
  text-transform: uppercase;
}

.detail-section {
  border-top: 1px solid var(--border-color);
  padding-top: 14px;
}

.detail-section h5 {
  font-family: var(--font-family-header);
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.timing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  font-size: 0.85rem;
}

.timing-grid div {
  display: flex;
  flex-direction: column;
}

.timing-grid .lbl {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.timing-grid .val {
  font-weight: 600;
  color: var(--text-main);
  margin-top: 2px;
}

.detail-list {
  list-style: none;
}

.detail-list li {
  font-size: 0.85rem;
  padding: 6px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.04);
  line-height: 1.4;
}

.detail-list li:last-child {
  border-bottom: none;
}

.scroll-list {
  max-height: 150px;
  overflow-y: auto;
  padding-right: 4px;
}

.amenities-container {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.amenity-tag {
  font-size: 0.78rem;
  padding: 4px 10px;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  color: var(--text-main);
}

.info-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-muted);
  flex: 1;
  padding: 40px 20px;
  gap: 12px;
}

.info-placeholder p {
  font-size: 0.85rem;
  max-width: 250px;
}

/* Tour Guide Styling */
.tour-guide-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 10px;
}

.tour-card {
  background-color: var(--bg-surface-glass);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.tour-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-focus);
}

.tour-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.tour-card-header h4 {
  font-family: var(--font-family-header);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-main);
}

.tour-station-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  color: #fff;
  text-transform: uppercase;
}

.tour-station-badge.blue { background-color: var(--line-blue); }
.tour-station-badge.green { background-color: var(--line-green); }
.tour-station-badge.orange { background-color: var(--line-orange); }

.tour-card p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.btn-tour-plan {
  align-self: flex-start;
}

/* Fares & Cards Tab Styling */
.info-card {
  background-color: var(--bg-surface-glass);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.info-card h4 {
  font-family: var(--font-family-header);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
}

.fare-table {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fare-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  padding: 4px 0;
}

.fare-row span {
  color: var(--text-muted);
}

.fare-note {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-top: 10px;
}

.bullet-list {
  padding-left: 18px;
  font-size: 0.82rem;
  line-height: 1.5;
}

.bullet-list li {
  margin-bottom: 8px;
}

.tourist-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.tc-box {
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
}

.tc-dur {
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.tc-price {
  font-family: var(--font-family-header);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--border-focus);
}

.tc-note {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.mt-15 { margin-top: 15px; }
.mt-10 { margin-top: 10px; }

/* Interactive Map Viewport CSS */
.map-viewport {
  display: flex;
  flex-direction: column;
  background-color: var(--bg-main);
  overflow: hidden;
  position: relative;
}

.map-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--bg-surface);
  z-index: 5;
}

.map-title-bar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.map-title-bar h3 {
  font-family: var(--font-family-header);
  font-size: 1.15rem;
  font-weight: 700;
}

.badge-route-mode {
  background-color: #ff3b30;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  animation: flashRed 2s infinite;
}

@keyframes flashRed {
  0% { opacity: 0.7; }
  50% { opacity: 1; }
  100% { opacity: 0.7; }
}

.map-controls-overlay {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 8;
  background: rgba(13, 17, 28, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 6px;
  box-shadow: var(--shadow-lg);
}

[data-theme="light"] .map-controls-overlay {
  background: rgba(255, 255, 255, 0.7);
}

.btn-zoom {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
  padding: 0;
}

.btn-zoom:hover {
  background: var(--bg-hover);
  border-color: var(--border-focus);
  color: var(--border-focus);
  transform: translateY(-1px);
}

.btn-zoom:active {
  transform: scale(0.95);
}

.btn-icon-round {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.btn-icon-round:hover {
  background-color: var(--bg-hover);
  transform: scale(1.08);
}

.btn-icon-round svg {
  position: absolute;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}

/* Light Mode SVG transforms */
[data-theme="light"] .btn-icon-round .moon-icon {
  transform: scale(1) rotate(0deg);
  opacity: 1;
}

[data-theme="light"] .btn-icon-round .sun-icon {
  transform: scale(0) rotate(-90deg);
  opacity: 0;
}

/* Dark Mode SVG transforms */
[data-theme="dark"] .btn-icon-round .moon-icon {
  transform: scale(0) rotate(90deg);
  opacity: 0;
}

[data-theme="dark"] .btn-icon-round .sun-icon {
  transform: scale(1) rotate(0deg);
  opacity: 1;
}

/* Map Canvas */
.map-canvas-container {
  flex: 1;
  overflow: auto;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 500px;
  background-color: var(--bg-main);
  background-image: radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 24px 24px;
  transition: background-color var(--transition-normal);
}

[data-theme="light"] .map-canvas-container {
  background-image: radial-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 1px);
}

.metro-map {
  width: 100%;
  height: 100%;
  max-width: 900px;
  max-height: 1150px;
  user-select: none;
}

#map-viewport-group {
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.dragging #map-viewport-group {
  transition: none !important;
}

/* SVG Element Styles */
.map-link-line {
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: opacity var(--transition-slow), stroke-width var(--transition-fast);
}

.map-link-line.highlighted-line,
.map-link-line-group.highlighted-line .map-link-line {
  stroke-width: 9px !important;
}

.map-link-line.construction {
  stroke-dasharray: 6 5;
  opacity: 0.6;
}

.map-link-bg {
  stroke: var(--bg-main);
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: opacity var(--transition-slow);
}

.map-link-bg.construction {
  stroke-dasharray: 6 5;
  opacity: 0.3;
}

/* Station Nodes */
.map-node {
  fill: #FFFFFF;
  stroke-width: 4px;
  cursor: pointer;
  transition: r var(--transition-fast), stroke-width var(--transition-fast), opacity var(--transition-slow);
}

.map-node:hover {
  r: 10px !important;
  stroke-width: 5px;
}

.map-node.construction {
  fill: var(--bg-main) !important;
  stroke-dasharray: 3 2;
  opacity: 0.7;
}

/* Interchange Hub Nodes */
.map-interchange {
  fill: #FFFFFF !important;
  stroke: var(--text-main) !important;
  stroke-width: 3px !important;
  cursor: pointer;
  transition: r var(--transition-fast), stroke-width var(--transition-fast), stroke var(--transition-fast), opacity var(--transition-slow);
}

.map-interchange:hover {
  r: 12.5px !important;
  stroke-width: 4.5px !important;
}

.map-interchange.construction {
  fill: var(--bg-main) !important;
  stroke: var(--text-muted) !important;
  stroke-dasharray: 4 2;
  opacity: 0.7;
}

/* Grand Central Interchange - Esplanade */
.grand-interchange {
  fill: #FFFFFF !important;
  stroke: #E11D48 !important; /* Rose accent */
  stroke-width: 3.5px !important;
  transition: r var(--transition-fast), stroke-width var(--transition-fast), stroke var(--transition-fast), opacity var(--transition-slow);
}

.grand-interchange:hover {
  r: 14px !important;
  stroke-width: 5px !important;
}

.grand-interchange-ring {
  stroke-dasharray: 4 2;
  animation: grandRingRotation 30s linear infinite;
}

@keyframes grandRingRotation {
  to {
    stroke-dashoffset: -100;
  }
}

/* Concentric Hover Ring for Stations */
.station-hover-ring {
  fill: none;
  stroke: var(--border-focus);
  stroke-width: 1.5px;
  opacity: 0;
  transform-origin: center;
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform: scale(0.6);
  pointer-events: none;
}

g[id^="station-group-"]:hover .station-hover-ring {
  opacity: 0.8;
  transform: scale(1);
  animation: hoverRingPulse 1.8s infinite ease-out;
}

@keyframes hoverRingPulse {
  0% { stroke-width: 2px; opacity: 0.9; }
  50% { stroke-width: 1px; opacity: 0.4; }
  100% { stroke-width: 2px; opacity: 0.9; }
}

.map-label {
  font-family: var(--font-family-body);
  font-size: 10.5px;
  font-weight: 600;
  fill: var(--text-main);
  stroke: var(--bg-surface);
  stroke-width: 3px;
  stroke-linejoin: round;
  paint-order: stroke fill;
  pointer-events: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
  transition: opacity var(--transition-slow), font-weight var(--transition-fast), font-size var(--transition-fast);
}

.map-label.construction {
  font-style: italic;
  opacity: 0.6;
}

/* Station Suggestion Construction Badge */
.station-badge.construction-badge {
  background: var(--bg-surface-glass);
  border: 1px dashed var(--border-focus);
  color: var(--text-muted);
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 4px;
  display: inline-block;
  margin-left: 6px;
}

/* Interactive highlight states */
.dimmed {
  opacity: 0.15;
}

.highlighted-line {
  stroke-width: 10px !important;
  filter: url(#glow);
  opacity: 1 !important;
}

.highlighted-node {
  opacity: 1 !important;
  r: 9px !important;
  stroke-width: 5px !important;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

.highlighted-interchange {
  opacity: 1 !important;
  r: 11px !important;
  stroke-width: 4px !important;
  fill: #FFFFFF !important;
  animation: interchangePulse 2s infinite ease-in-out;
}

@keyframes interchangePulse {
  0% { stroke-width: 4px; r: 11px; }
  50% { stroke-width: 5.5px; r: 12.5px; }
  100% { stroke-width: 4px; r: 11px; }
}

.highlighted-label {
  opacity: 1 !important;
  font-weight: 700;
  font-size: 12px;
}

/* Map Legend */
.map-legend {
  position: absolute;
  bottom: 20px;
  right: 20px;
  background: rgba(13, 17, 28, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
  box-shadow: var(--shadow-lg);
  z-index: 5;
  max-width: 250px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

[data-theme="light"] .map-legend {
  background: rgba(255, 255, 255, 0.75);
}

.legend-header {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 6px;
}

.legend-title {
  font-family: var(--font-family-header);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-main);
}

.legend-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  font-weight: 550;
  color: var(--text-main);
}

.legend-line {
  width: 24px;
  height: 4px;
  border-radius: 2px;
}

.legend-line-construction {
  width: 24px;
  height: 0;
  border-bottom: 3px dashed var(--text-muted);
  opacity: 0.75;
  display: inline-block;
  vertical-align: middle;
}

.legend-node-interchange {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--bg-surface-opaque);
  border: 3px solid var(--text-main);
}

/* Tooltip floating bubble */
.map-tooltip {
  position: fixed;
  background-color: var(--bg-surface-glass);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 14px;
  box-shadow: var(--shadow-lg);
  z-index: 200;
  width: 200px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transform: translate(-50%, -100%);
  margin-top: -15px;
  animation: tooltipFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes tooltipFadeIn {
  from { opacity: 0; transform: translate(-50%, -90%); }
  to { opacity: 1; transform: translate(-50%, -100%); }
}

.tooltip-title {
  font-family: var(--font-family-header);
  font-weight: 700;
  font-size: 0.95rem;
}

.tooltip-body {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.tooltip-actions {
  display: flex;
  gap: 6px;
}

.btn-sm {
  padding: 6px 10px;
  font-size: 0.75rem;
  border-radius: 6px;
  flex: 1;
}

/* Helper Chatbot Floating Container Styling */
.chatbot-wrapper {
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

/* Chat bubble toggle button */
.chatbot-bubble {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: var(--border-focus);
  color: #ffffff;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 112, 243, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: transform var(--transition-fast), background-color var(--transition-fast);
}

.chatbot-bubble:hover {
  transform: scale(1.08);
  background-color: #0056b3;
}

.chatbot-badge {
  position: absolute;
  top: 0;
  right: 0;
  width: 12px;
  height: 12px;
  background-color: #00cc66;
  border: 2px solid var(--bg-main);
  border-radius: 50%;
}

/* Chat window box layout */
.chatbot-window {
  width: 330px;
  height: 420px;
  background-color: var(--bg-surface-glass);
  backdrop-filter: blur(18px);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: absolute;
  bottom: 70px;
  right: 0;
  transform-origin: bottom right;
  animation: chatbotOpen 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1000;
}

@keyframes chatbotOpen {
  from { opacity: 0; transform: scale(0.8) translate(10px, 10px); }
  to { opacity: 1; transform: scale(1) translate(0, 0); }
}

.chatbot-header {
  background: var(--accent-gradient);
  border-bottom: none;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #FFFFFF;
}

.chatbot-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.chatbot-title h4 {
  font-family: var(--font-family-header);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.2;
  color: #FFFFFF;
}

.chatbot-title span {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.8);
}

.chatbot-close {
  margin-left: auto;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chatbot-close:hover {
  color: #FFFFFF;
}

/* Chat Messages history pane */
.chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-msg {
  display: flex;
  max-width: 85%;
}

.chat-msg.bot {
  align-self: flex-start;
}

.chat-msg.user {
  align-self: flex-end;
}

.msg-bubble {
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.8rem;
  line-height: 1.45;
}

.chat-msg.bot .msg-bubble {
  background-color: var(--bg-hover);
  color: var(--text-main);
  border-bottom-left-radius: 4px;
  border: 1px solid var(--border-color);
}

.chat-msg.user .msg-bubble {
  background: var(--accent-gradient);
  color: #ffffff;
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 10px var(--border-focus-glow);
}

/* Chatbot Quick Response buttons */
.chatbot-quick-replies {
  padding: 10px 16px 16px 16px;
  border-top: 1px solid var(--border-color);
  background-color: rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.reply-chip {
  text-align: left;
  background-color: var(--bg-surface-opaque);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 8px 14px;
  border-radius: 99px;
  font-size: 0.76rem;
  font-weight: 550;
  cursor: pointer;
  transition: all var(--transition-fast);
  outline: none;
  font-family: var(--font-family-body);
  box-shadow: var(--shadow-sm);
}

.reply-chip:hover {
  background-color: var(--bg-hover);
  border-color: var(--border-focus);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px var(--border-focus-glow);
}

/* Service Status Section styling */
.service-status-section {
  background-color: var(--bg-surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-color);
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  z-index: 5;
  transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

.service-status-section h4 {
  font-family: var(--font-family-header);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.status-card {
  background-color: var(--bg-surface-glass);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  text-align: left;
  gap: 14px;
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
  cursor: default;
  position: relative;
  overflow: hidden;
}

.status-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-focus);
  box-shadow: var(--shadow-md);
}

/* Specific background-tint gradients for each line, blending to var(--bg-surface-glass) */
.status-card.line-blue {
  border-left: 4px solid var(--line-blue);
  background: linear-gradient(135deg, rgba(0, 79, 159, 0.08) 0%, var(--bg-surface-glass) 100%);
}
.status-card.line-green {
  border-left: 4px solid var(--line-green);
  background: linear-gradient(135deg, rgba(0, 130, 74, 0.08) 0%, var(--bg-surface-glass) 100%);
}
.status-card.line-orange {
  border-left: 4px solid var(--line-orange);
  background: linear-gradient(135deg, rgba(255, 130, 0, 0.08) 0%, var(--bg-surface-glass) 100%);
}
.status-card.line-yellow {
  border-left: 4px solid var(--line-yellow);
  background: linear-gradient(135deg, rgba(229, 184, 0, 0.08) 0%, var(--bg-surface-glass) 100%);
}
.status-card.line-purple {
  border-left: 4px solid var(--line-purple);
  background: linear-gradient(135deg, rgba(125, 38, 205, 0.08) 0%, var(--bg-surface-glass) 100%);
}
.status-card.line-pink {
  border-left: 4px solid var(--line-pink);
  background: linear-gradient(135deg, rgba(255, 105, 180, 0.08) 0%, var(--bg-surface-glass) 100%);
}

.status-card-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background-color: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color var(--transition-fast);
  flex-shrink: 0;
}

[data-theme="light"] .status-card-icon {
  background-color: rgba(0, 0, 0, 0.04);
}

.status-card.line-blue .status-card-icon { color: var(--line-blue); }
.status-card.line-green .status-card-icon { color: var(--line-green); }
.status-card.line-orange .status-card-icon { color: var(--line-orange); }
.status-card.line-yellow .status-card-icon { color: var(--line-yellow); }
.status-card.line-purple .status-card-icon { color: var(--line-purple); }
.status-card.line-pink .status-card-icon { color: var(--line-pink); }

.status-card-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.status-line-name {
  font-family: var(--font-family-header);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #00cc66;
  box-shadow: 0 0 8px rgba(0, 204, 102, 0.6);
  display: inline-block;
  animation: pulseStatus 2.5s infinite;
}

/* Under Construction state override */
.status-card.construction .status-dot {
  background-color: #FF8200;
  box-shadow: 0 0 8px rgba(255, 130, 0, 0.6);
  animation: pulseStatusOrange 2.5s infinite;
}

.status-card.construction .status-text {
  color: #FF8200 !important;
}

/* Planned Corridor state override */
.status-card.planned .status-dot {
  background-color: var(--text-muted);
  box-shadow: none;
  animation: none;
}

.status-card.planned .status-text {
  color: var(--text-muted) !important;
}

@keyframes pulseStatus {
  0% { box-shadow: 0 0 0 0px rgba(0, 204, 102, 0.4); }
  70% { box-shadow: 0 0 0 6px rgba(0, 204, 102, 0); }
  100% { box-shadow: 0 0 0 0px rgba(0, 204, 102, 0); }
}

@keyframes pulseStatusOrange {
  0% { box-shadow: 0 0 0 0px rgba(255, 130, 0, 0.4); }
  70% { box-shadow: 0 0 0 6px rgba(255, 130, 0, 0); }
  100% { box-shadow: 0 0 0 0px rgba(255, 130, 0, 0); }
}

.status-text {
  font-size: 0.72rem;
  font-weight: 600;
  color: #00cc66;
  text-transform: uppercase;
  letter-spacing: 0.2px;
}

.status-meta {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 8px;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
  padding-top: 8px;
  width: 100%;
}

[data-theme="light"] .status-meta {
  border-top-color: rgba(0, 0, 0, 0.08);
}

.meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.meta-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.meta-val {
  font-size: 0.72rem;
  color: var(--text-main);
  font-weight: 600;
  white-space: nowrap;
}

/* Footer Styling */
.app-footer {
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  padding: 24px 24px calc(24px + env(safe-area-inset-bottom)) 24px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 5;
  transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

.disclaimer {
  font-size: 0.72rem;
  max-width: 800px;
  margin: 0 auto;
}

.footer-credits-link {
  color: var(--border-focus);
  text-decoration: none;
  font-weight: 700;
  transition: color var(--transition-fast), text-shadow var(--transition-fast);
}

.footer-credits-link:hover {
  color: #3B82F6;
  text-shadow: 0 0 8px var(--border-focus-glow);
  text-decoration: underline;
}

/* Responsive Rules for Small Devices (Laptops/Tablets/Phones) */
@media (max-width: 950px) {
  .app-container {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  
  .sidebar {
    max-height: none;
    height: auto;
    position: relative;
    top: 0;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }
  
  .map-viewport {
    height: 550px;
  }
  
  .map-canvas-container {
    min-height: auto;
  }
  
  .ticker-wrap {
    padding: 6px 12px;
  }
}

@media (max-width: 650px) {
  .ticker-wrap {
    padding: 6px max(12px, env(safe-area-inset-right)) 6px max(12px, env(safe-area-inset-left));
  }
  
  .ticker-title-area {
    padding-right: 8px;
    margin-right: 8px;
    gap: 4px;
  }
  
  .ticker-title {
    font-size: 0.7rem;
  }

  .map-label {
    font-size: 8.5px;
    stroke-width: 2px;
  }

  .app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    padding-top: max(8px, env(safe-area-inset-top));
    padding-bottom: 8px;
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
    background-color: var(--bg-surface-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
  }
  
  .header-container {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 2px 0;
  }
  
  .logo-area {
    flex-direction: row;
    align-items: center;
    gap: 8px;
  }
  
  .metro-logo {
    width: 28px !important;
    height: 28px !important;
  }
  
  .brand {
    text-align: left;
  }
  
  .brand h1 {
    font-size: 1.15rem;
  }
  
  .sub-brand {
    display: none; /* Hide sub-brand text on mobile to save space */
  }
  
  .header-actions {
    align-self: center;
    margin-top: 0;
    width: auto;
    justify-content: flex-end;
    gap: 8px;
  }
  
  .lang-select {
    padding: 4px 8px;
    font-size: 0.75rem;
    height: 32px;
  }
  
  .btn-icon-round {
    width: 32px;
    height: 32px;
  }
  
  .btn-icon-round svg {
    width: 16px;
    height: 16px;
  }
  
  .header-helplines {
    display: none; /* Hide helplines in small headers, accessible via chatbot */
  }
  
  .sidebar-content {
    padding: 16px max(16px, env(safe-area-inset-right)) 16px max(16px, env(safe-area-inset-left));
  }
  
  .results-summary {
    grid-template-columns: 1fr 1fr; /* Keep 2x2 layout on mobile instead of stacking vertically */
    gap: 8px;
  }
  
  .summary-card {
    padding: 10px;
  }
  
  .summary-value {
    font-size: 1.05rem;
  }
  
  /* UX Optimization: Move Legend below map viewport on mobile to prevent blocking touch gestures */
  .map-canvas-container {
    flex-direction: column;
    height: 480px;
    min-height: 480px;
  }
  
  .map-viewport {
    height: auto;
  }
  
  .map-legend {
    position: relative;
    bottom: auto;
    right: auto;
    margin: 15px auto 25px auto;
    max-width: 100%;
    width: calc(100% - 32px);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(12px);
    background: var(--bg-surface-glass);
    border: 1px solid var(--border-color);
  }
  
  .legend-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  
  /* Zoom controls mobile placement - offset from notches and corners */
  .map-controls-overlay {
    top: calc(15px + env(safe-area-inset-top));
    right: calc(15px + env(safe-area-inset-right));
    gap: 6px;
  }
  
  .btn-zoom {
    width: 38px;
    height: 38px;
  }
  
  /* Chatbot window mobile adjustments - offset from home indicator and side corners */
  .chatbot-wrapper {
    bottom: calc(15px + env(safe-area-inset-bottom));
    right: calc(15px + env(safe-area-inset-right));
  }
  
  .chatbot-window {
    width: calc(100vw - 32px);
    right: 0;
    bottom: calc(60px + env(safe-area-inset-bottom));
  }
  
  .chatbot-bubble {
    width: 48px;
    height: 48px;
  }
  
  /* Tabs padding details */
  .tab-btn {
    font-size: 0.72rem;
    padding: 10px 4px;
    gap: 4px;
  }
  
  .tab-btn svg {
    width: 14px;
    height: 14px;
  }
  
  /* Service status layout cards mobile adjustments */
  .status-grid {
    grid-template-columns: 1fr;
  }
  
  .status-card {
    padding: 12px !important;
    gap: 10px !important;
  }

  /* Autocomplete and Buttons Touch target polish */
  .suggestion-item {
    padding: 12px 16px;
    font-size: 0.92rem;
  }

  .btn-swap {
    width: 40px;
    height: 40px;
  }

  .route-tabs {
    gap: 2px;
    padding: 3px;
  }

  .route-tab-btn {
    font-size: 0.76rem;
    padding: 8px 6px;
    gap: 4px;
  }

  .route-tab-badge {
    font-size: 0.58rem;
    padding: 1px 5px;
    top: -8px;
    right: -4px;
  }
}

/* Route tabs layout for Route results panel */
.route-tabs {
  display: flex;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 20px;
  gap: 4px;
}

.route-tab-btn {
  flex: 1;
  background: none;
  border: none;
  border-radius: 8px;
  color: var(--text-muted);
  font-family: var(--font-family-header);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 10px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all var(--transition-fast);
  position: relative;
}

.route-tab-btn:hover {
  color: var(--text-main);
  background-color: rgba(255, 255, 255, 0.03);
}

[data-theme="light"] .route-tab-btn:hover {
  background-color: rgba(0, 0, 0, 0.02);
}

.route-tab-btn.active {
  background: var(--accent-gradient);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

.route-tab-icon {
  font-size: 1rem;
}

.route-tab-badge {
  position: absolute;
  top: -6px;
  right: -2px;
  background-color: #10b981;
  color: white;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 20px;
  border: 1.5px solid var(--bg-surface-opaque);
  box-shadow: var(--shadow-sm);
  animation: pulseBadge 2s infinite;
}

@keyframes pulseBadge {
  0% { transform: scale(1); }
  50% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

.route-tab-panel {
  display: none;
  animation: fadeIn var(--transition-normal);
}

.route-tab-panel.active {
  display: flex;
  flex-direction: column;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Alternatives Cards Styling */
.alt-card {
  background: var(--bg-surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.alt-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-focus);
  box-shadow: var(--shadow-md);
}

.alt-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
}

.alt-card-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.alt-icon {
  font-size: 1.5rem;
  background-color: var(--bg-hover);
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
}

.alt-card-title h5 {
  font-family: var(--font-family-header);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

.alt-subtitle {
  font-size: 0.76rem;
  color: var(--text-muted);
  font-weight: 500;
}

.alt-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.alt-badge.badge-green {
  background-color: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.alt-badge.badge-blue {
  background-color: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.alt-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  background-color: rgba(0, 0, 0, 0.12);
  border-radius: 8px;
  padding: 12px;
  border: 1px solid var(--border-color);
}

[data-theme="light"] .alt-meta-grid {
  background-color: rgba(0, 0, 0, 0.02);
}

.alt-meta-grid div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.alt-meta-grid .lbl {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.5px;
}

.alt-meta-grid strong {
  font-family: var(--font-family-header);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
}

/* Privacy Policy Page Styles */
.privacy-container {
  max-width: 900px;
  margin: 40px auto;
  padding: 0 24px;
  flex: 1;
}

.privacy-card {
  background-color: var(--bg-surface-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 40px;
  box-shadow: var(--shadow-lg);
  margin-bottom: 40px;
  transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

.privacy-card h1 {
  font-family: var(--font-family-header);
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.privacy-last-updated {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 32px;
  font-weight: 500;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 16px;
}

.privacy-section {
  margin-bottom: 28px;
}

.privacy-section h2 {
  font-family: var(--font-family-header);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 12px;
}

.privacy-section p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.privacy-section strong {
  color: var(--text-main);
}

.privacy-section ul {
  list-style-type: none;
  padding-left: 0;
  margin-bottom: 16px;
  margin-top: 8px;
}

.privacy-section li {
  position: relative;
  padding-left: 20px;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.privacy-section li::before {
  content: "•";
  position: absolute;
  left: 6px;
  color: var(--border-focus);
  font-weight: bold;
}

.privacy-back-btn-container {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 24px;
}

@media (max-width: 600px) {
  .privacy-card {
    padding: 24px 20px;
  }
  
  .privacy-card h1 {
    font-size: 1.75rem;
  }
  
  .privacy-section h2 {
    font-size: 1.15rem;
  }
}

