/* ----------------------------------
   GLOBAL BASE STYLES
---------------------------------- */
@font-face {
  font-family: 'NetworkSans';
  src: url('/assets/fonts/networksans/NetworkSans-2019-Regular.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'NetworkSans';
  src: url('/assets/fonts/networksans/NetworkSans-2019-RegularItalic.otf') format('opentype');
  font-weight: normal;
  font-style: italic;
}

@font-face {
  font-family: 'NetworkSans';
  src: url('/assets/fonts/networksans/NetworkSans-2019-Bold.otf') format('opentype');
  font-weight: bold;
  font-style: normal;
}

@font-face {
  font-family: 'NetworkSans';
  src: url('/assets/fonts/networksans/NetworkSans-2019-Light.otf') format('opentype');
  font-weight: thin;
  font-style: normal;
}

i.fa-solid, i.fa-regular, i.fa-brands {
  font-family: "Font Awesome 6 Free" !important;
  font-weight: 900;
}

:root {
  --green-primary: #008746;
  --light-green: #3a854c;
  --start-marker: #a3d063;
  --dark-blue: #102f3b;
  --dark-text: #000;
  --light-text: #fff;
  --grey-border: #ccc;
  --bus-line: #eca140;
  --train-line: #008dd0;
  --tram-line: #72bf44;
  --vline-line: #7f3f98;

  --padding-small: 8px;
  --padding-medium: 20px;
  --padding-large: 24px;
}

/* Typography */
p {
  margin: 0;
  line-height: 1.4em;
}
h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: bold;
}
h1 { font-size: 2em; }
h2 { font-size: 1.5em; }
h3 { font-size: 1.2em; }
h4 { font-size: 1em; }
h5 { font-size: 0.9em; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: 'NetworkSans', sans-serif;
  background: #0b0f14;
  color: #fff;
  overflow: hidden; 
}

#map {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 100%;
  height: 100vh;
}

.mapbox-improve-map {
  display: none;
}

.ca-has-edit-link {
  position: static;
}

.map-loader {
  position: fixed;
  inset: 0;
  background: #0e1a16;
  z-index: 9999;
  display: grid;
  place-items: center;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.map-loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: #fff;
}

.loader-inner i {
  font-size: 28px;
  animation: pulse 1.4s ease-in-out infinite;
}

.loader-text {
  font-size: 14px;
  opacity: 0.85;
}

@keyframes pulse {
  0%   { transform: scale(1);   opacity: 0.6; }
  50%  { transform: scale(1.1); opacity: 1;   }
  100% { transform: scale(1);   opacity: 0.6; }
}


/* ----------------------------------
   SIDEBAR
---------------------------------- */
.sidebar {
  position: absolute;
  max-height: 90vh;
  display: flex;
  /* overflow: hidden; */
  flex-direction: column;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: #fff;
  color: var(--dark-text);
  padding: var(--padding-medium);
  width: 450px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  z-index: 100;
}

.sidebar > .header {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  font-size: 1em;
  line-height: 1.4em;
  padding: var(--padding-medium);
  margin: -20px;
  margin-bottom: 10px;
  background-color: var(--green-primary);
  color: var(--light-text);
  gap: 16px;
}

.sidebar .intro-wrapper {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sidebar .spacer {
  flex-grow: 1;
  height: 3px;
  width: 40px;
  background-color: var(--light-text);
}

.sidebar > .header > .intro-wrapper.hide {
  opacity: 0;
  height: 0;
  overflow: hidden;
  transition: opacity 0.3s ease, height 0.3s ease;
  display: none;
}

.sidebar > .header > .intro-wrapper.lvl2 {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

#logo-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header.sidebar-lvl2 {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}

.sidebar > .header .title {
  font-size: 1.9em;
  font-weight: bold;
}

.sidebar > .header > .description {
  margin-bottom: 0;
}

/* ----------------------------------
   CUSTOM DROPDOWN SECTION
---------------------------------- */
#dropdown-section {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 20px;
}

#dropdown-section.dropdown--compact-section  {
  margin-top: 0;
  gap: 4px;
  margin-bottom: 12px;
  background-color: #f8f8f8;
  padding: 12px;
  border-radius: 8px;
}

.srl-options .smart-status,
.srl-options .reco-header {
  pointer-events: none;
  cursor: default;
  user-select: none;
  border-bottom: 1px solid #eee;
}

#dropdown-section.dropdown--compact-section::before  {
  content: '';
  position: absolute;
  left: 18px;
  top: 56px;
  width: 2px;
  height: 22px;
  background-color: #ccc;
}

.dropdown--compact-section .disclaimer {
  display: none;
}

.disclaimer-title { display: inline; margin: 0; }
.disclaimer .tooltip-icon { margin-left: 8px; }


#journey-content {
  flex: 1 1 auto;
  -webkit-overflow-scrolling: touch;
}

#content-wrapper {
  display: flex;
  flex-direction: column;
  max-height: 60vh;
  /* overflow-y: auto; */
  padding-right: 4px;
}

.scrollable-content {
  overflow-y: auto;
}

/* Step container */
.srl-dropdown-step {
  position: relative;
  /* z-index: 1; */
}

.srl-custom-select.open {
  z-index: 9999;
}

/* Header (icon + labels) */
.srl-dropdown-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.srl-step-icon {
  font-size: 2.1em;
  line-height: 1;
  color: var(--dark-text);
}

.start-icon.srl-step-icon.active {
  color: var(--green-primary);
}

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

.srl-step-label {
  font-size: 0.75em;
  font-weight: 700;
  text-transform: uppercase;
  color: #555;
}

.srl-step-title {
  font-weight: 700;
  color: #000;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 1em;
}

.srl-info-icon {
  font-size: 0.9em;
  color: #999;
  cursor: help;
  margin-top: 1px;
}

.tooltip-icon {
  position: relative;
  display: inline-block;
  margin-right: 4px;
  cursor: pointer;
  color: #777;
  background-color: #fff;
  border: 0;
  padding: 0;
}

.tooltip-icon:hover,
.tooltip-icon:focus {
  color: #000;
}

/* Tooltip bubble */
.tooltip-icon::after {
  content: attr(data-tooltip);
  position: absolute;
  left: -204px;
  top: 120%;
  width: 260px;
  background: #333;
  color: #fff;
  font-size: 0.8em;
  font-weight: normal;
  padding: 10px 12px;
  border-radius: 6px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  white-space: normal;
  line-height: 1.3em;
  z-index: 9999;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.disclaimer .tooltip-icon::after {
  top: -675%;
  /* left: 0; */
}

/* Show on hover */
.tooltip-icon:hover::after,
.tooltip-icon:focus::after {
  opacity: 1;
  transform: translateY(0);
}

.tooltip-icon:hover::before,
.tooltip-icon:focus::before {
  opacity: 1;
}


/* ----------------------------------
   CUSTOM SELECT DROPDOWN
---------------------------------- */
.srl-custom-select {
  background: #e5f2eb;
  border-radius: 12px;
  padding: 12px;
  position: relative;
  user-select: none;
  z-index: 1;
  transition: all 0.2s ease;
}

.srl-custom-select .srl-selected {
  background: #fff;
  padding: 14px 16px;
  border: 2px solid var(--dark-text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  color: #000;
  transition: all 0.2s ease;
}

.srl-custom-select:hover {
  background-color: #d0e4d5;
}

.dropdown--compact .srl-custom-select:hover {
  background-color: transparent;
}

.srl-custom-select .srl-selected::after {
  content: "▾";
  font-size: 0.9em;
}

.srl-custom-select #start-selected.locked {
  background-color: var(--green-primary);
  color: var(--light-text);
}

.dropdown--compact .srl-custom-select #start-selected.locked {
  background-color: transparent;
  color: var(--dark-text);
}

.srl-custom-select.open .srl-selected::after {
  content: "▴";
}

/* .dropdown--compact {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px; 
  padding: 8px 0;
}

.dropdown--compact .srl-dropdown-header {
  display: flex;
  align-items: center;
  flex-direction: row;
  gap: 6px;
  padding: 0;
  margin: 0;
}

.dropdown--compact .srl-custom-select {
  flex: 1;
  margin: 0;
}

.dropdown--compact .srl-selected {
  padding: 8px 12px;
  font-size: 14px;
} */

.dropdown--compact {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 4px 0;
}

.dropdown--compact .srl-dropdown-header {
  display: none;
}

.dropdown--compact .srl-custom-select {
  position: relative;
  padding: 0;
  border: none;
  background: transparent;
}

.dropdown--compact .srl-selected {
  border: none;
  border-bottom: 2px solid #00000020;
  color: var(--dark-text);
  background: transparent;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  font-weight: 600;
  position: relative;
}

.dropdown--compact .srl-custom-select .srl-selected {
  padding: 0 0 4px 0;
  margin-left: 26px;
}

.dropdown--compact .srl-selected::after {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
}

.dropdown--compact #start-select .srl-selected::before {
  content: "Start";
  font-size: 11px;
  font-weight: 400;
  opacity: 0.75;
}

.dropdown--compact #end-select .srl-selected::before {
  content: "End";
  font-size: 11px;
  font-weight: 400;
  opacity: 0.75;
}

.dropdown--compact .srl-custom-select::before {
  content: "\f3c5"; 
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  color: var(--dark-text);
  z-index: 1;
}

/* Options dropdown */
.srl-custom-select .srl-options {
  display: none;
  position: absolute;
  list-style: none;
  padding: 0;
  left: 12px;
  max-height: 20vh;
  width: calc(100% - 24px);
  background: #fff;
  border: solid 2px var(--dark-text);
  border-top: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  overflow-y: auto;
  z-index: 1000;
  margin-top: 1px;
}

.dropdown--compact .srl-options {
  left: 25px;
}

.srl-options .search-wrapper {
  padding: 8px 10px;
  border-bottom: 1px solid #eee;
  margin-bottom: 4px;
  background: #fff;
  position: sticky;
  top: -1px;
  z-index: 2;
}

.srl-options .search-wrapper:hover {
  background: #fff !important;
}

.search-input-wrapper {
  display: flex;
  align-items: center;
  gap: 6px; 
}

.search-icon {
  color: #999;
  font-size: 14px;
}

.srl-search {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 14px;
  padding: 4px 0;
  font-style: italic;
}

.srl-search::placeholder {
  color: #aaa;
}

.srl-options .srl-search:focus {
  outline: none;
}

.srl-custom-select.open .srl-options {
  display: block;
}

.srl-custom-select .srl-options li {
  padding: 6px 16px;
  cursor: pointer;
  transition: background 0.2s ease;
  color: #000;
}

.srl-custom-select .srl-options li:hover {
  background: #e5f2eb;
}

.srl-custom-select .srl-options li.disabled:hover {
  background: #e0e0e0;
  opacity: 0.6;
}

.srl-custom-select .srl-options li.srl-selected-option {
  background: var(--green-primary);
  color: #fff;
}

/* ----------------------------------
   DISCLAIMER
---------------------------------- */
.disclaimer {
  display: flex;
  font-size: 0.9em;
  color: var(--dark-text);
  background: #f8f8f8;
  border-radius: 8px;
  padding: 10px;
  line-height: 1.3em;
}

/* ----------------------------------
   JOURNEY VIEW STYLES
---------------------------------- */
.journey-title {
  font-weight: bold;
  font-size: 1.1em;
  color: var(--dark-text);
  margin-bottom: 8px;
}

.transport {
  display: flex;
  gap: 10px;
}

.transport .stations {
  position: relative;
}

.transport .line { 
  font-weight: bold; 
  margin-bottom: 6px;
  width: 55px;
}

.transport .stations::before {
  content: ''; 
  position: absolute; 
  left: 0px; 
  top: 14px;
  width: 2px; 
  height: calc(100% - 30px); 
  background-color: #ccc;
}

/* generic “bridge” row – just some vertical space */
.transport.change-services.bridge .stations {
  height: 26px;        /* tweak to taste */
}

/* Deer Park V/Line bridge: vertical line in V/Line colour, no text */
.transport.change-services.bridge-vline .stations::before {
  background-color: var(--vline-line);
  height: 100%;
}

/* we’re already hiding bullets/lines for normal change-services rows */
.change-services .station-step::before,
.change-services .station-step::after {
  background-color: transparent !important;
}


.transport .stations .station-step {
  position: relative; 
  padding-left: 26px;
}

.stations .station-step:not(:last-child) {
  margin-bottom: 10px;
}

.transport .stations .station-step::before {
  content: ''; 
  position: absolute; 
  left: -4px; 
  top: 6px;
  width: 10px; 
  height: 10px; 
  border-radius: 50%; 
  background-color: #ccc;
}

.transport .stations .station-step::after {
  content: ''; 
  position: absolute; 
  left: 3px; 
  top: 10px;
  width: 10px; 
  height: 2px; 
  background-color: #ccc;
}

.change-services .station-step {
  font-style: italic; 
  font-size: 13px; 
  color: #666;
  margin: 10px 0 !important;
  padding-left: 0 !important;
}

.change-services .station-step i {
  margin-right: 14px;
  background-color: #ebeaea;
  padding: 4px 6px;
  margin-right: 12px;
  border-radius: 50%;
  font-size: 10px;
  margin-left: -8px;
}

.station-step.change-inline {
  font-style: italic;
  font-size: 13px;
  color: #666;
  margin: 10px 0 !important;
  padding-left: 0 !important;
}

.station-step.change-inline i {
  margin-right: 14px;
  background-color: #ebeaea;
  padding: 4px 6px;
  border-radius: 50%;
  font-size: 10px;
  margin-left: -8px;
}

.station-step.change-inline::before,
.station-step.change-inline::after {
  background-color: transparent !important;
}


.change-services .station-step::before, .change-services .station-step::after { background-color: transparent !important; }

.transport.train .stations::before,
.transport.train .stations .station-step::after,
.transport.train .stations .station-step::before { background-color: var(--train-line, #0a84ff); }

.transport.bus .stations::before,
.transport.bus .stations .station-step::after,
.transport.bus .stations .station-step::before { background-color: var(--bus-line, #ff7a00); }

.transport.srl .stations::before,
.transport.srl .stations .station-step::after,
.transport.srl .stations .station-step::before { background-color: var(--green-primary, #138000); }

.transport.tram .stations::before,
.transport.tram .stations .station-step::after,
.transport.tram .stations .station-step::before { background-color: var(--tram-line, #72bf44); }

.transport.vline .stations::before,
.transport.vline .stations .station-step::after,
.transport.vline .stations .station-step::before { background-color: var(--vline-line, #7f3f98); }


/* ----------------------------------
   SAVINGS BOXES
---------------------------------- */
.savings {
  display: flex;
  justify-content: flex-start;
  gap: 4px;
}

.savings .saving {
  border-radius: 8px;
  text-align: center;
  font-size: 0.9em;
  line-height: 1.2;
}

/* SRL Box */
.savings .saving.srl {
  background-color: var(--green-primary);
  color: var(--light-text);
  padding: 12px 8px;
  font-size: 1em;
}

.savings .srl-savings-title {
  font-weight: 800;
}

.savings .srl-savings-title span {
  font-size: 2em;
}

/* Public Transport & Driving Boxes */
.savings .saving.other {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  background-color: var(--light-text);
  color: var(--green-primary);
  border: 2px solid var(--dark-blue);
}

.savings .saving.other .time-savings {
  font-size: 1em;
  color: var(--dark-blue);
}

.savings .saving.other .time-savings span {
  font-weight: 1000;
  font-size: 1.1em;
}

.savings .saving.other .savings-mode {
  font-size: 0.75em;
  font-weight: bold;
  letter-spacing: 0.4px;
  background-color: var(--dark-blue);
  color: var(--light-text);
}

.savings .saving.other .savings-mode,
.savings .saving.other .time-savings {
  padding: 5px 4px;
  min-width: 65px;
  flex-grow: 1;
  line-height: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
}

/* ----------------------------------
   RESET BUTTON
---------------------------------- */
.reset-btn:hover {
  background-color: var(--light-green);
}

#resetView {
  background: var(--green-primary);
  color: var(--light-text);
  border: 1px solid var(--light-text);
  padding: 6px 12px;
  cursor: pointer;
  display: flex;
  align-items: baseline;
  font-size: 0.9em;
  transition: background 0.2s ease, color 0.2s ease;
}

#resetView:hover {
  background: var(--green-primary);
  color: var(--light-text);
}

#resetView.hide {
  display: none;
}

#resetView i {
  margin-left: 6px;
}

/* Hide any native <select> that might slip through */
#start-wrapper select,
#end-wrapper select {
  display: none !important;
}

.station-label {
  position: relative;
  pointer-events: none;
}

.station-label-box {
  display: inline-block;
  background: #fff;
  border: 2px solid var(--green-primary); 
  padding: 2px 6px;
  font-size: 13px;
  font-weight: 600;
  color: #000;
  border-radius: 2px;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.station-label-box::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 2px;
  background: currentColor; /* inherits border color */
}

/* Train color override */
.station-label.train .station-label-box {
  border-color: #004aad;
}
.station-label.train .station-label-box::before {
  background: #004aad;
}

/* Vertical separation between stacked labels */
.station-label.srl {
  transform: translateY(-5px);
}
.station-label.train {
  transform: translateY(5px);
}

.mapboxgl-popup-content {
  padding: 0;
  position: relative;
  padding-top: 6px;
  margin: 0 0 0 2px;
  background-color: var(--green-primary);
  border-radius: 0;
  box-shadow: 0 2px 5px rgba(0,0,0,0.15);
  font-family: 'NetworkSans', sans-serif;
}

.inactive.mapboxgl-popup-content {
  padding: 0;
  position: relative;
  padding-top: 8px;
  margin: 0 0 0 2px;
  background-color: transparent;
  border-radius: 0;
  box-shadow: none;
  font-family: 'NetworkSans', sans-serif;
}

.inactive.mapboxgl-popup-content .station-label {
  background: transparent;
  color: var(--dark-text);
  font-size: 0.7rem;
  font-weight: normal;
  padding: 0;
  text-align: center;
  border: none;
  border-top: none;
}

.inactive.mapboxgl-popup-content::before {
  display: none;
}

.right .mapboxgl-popup-content {
  margin: 0 2px 0 0;
}

.bottom .mapboxgl-popup-content {
  margin: 0 0 0 2px;
}

.top .mapboxgl-popup-content {
  margin: 2px 0 0 0;
}

.mapboxgl-popup-content::before {
  content: '';
  position: absolute;
  left: -14px;
  right: auto;
  top: 50%;
  width: 16px;
  height: 1px;
  background: #000;
}

.right .mapboxgl-popup-content::before {
  right: -14px;
  left: auto;
  top: 50%;
  width: 16px;
  height: 1px;
}

.bottom .mapboxgl-popup-content::before {
  left: 49%;
  right: auto;
  top: 36px;
  width: 1px;
  height: 16px;
}

.top .mapboxgl-popup-content::before {
  left: 49%;
  right: auto;
  top: -15px;
  width: 1px;
  height: 15px;
}

.mapboxgl-popup-tip {
  border-color: transparent !important;
  border: 18px solid #0000;
}

.label-popup {
  pointer-events: none;
}

.station-label {
  background: white;
  color: var(--dark-text);
  font-size: 0.9rem;
  font-weight: bold;
  padding: 6px 10px;
  text-align: center;
  border: solid 1px #000;
  border-top: none;
}

.train-line .mapboxgl-popup-content {
  background-color: var(--train-line);
}

.bus-line .mapboxgl-popup-content {
  background-color: var(--bus-line);
}

.tram-line .mapboxgl-popup-content {
  background-color: var(--tram-line);
}

.vline-line .mapboxgl-popup-content {
  background-color: var(--vline-line);
}

.start-marker, .end-marker {
  font-size: 40px;
  color: #000;
  transition: color 0.2s ease, font-size 0.2s ease;
}

.start-marker i, .end-marker i {
  transition: margin-bottom 0.2s ease;
  pointer-events: none;
  margin-bottom: 36px;
}

.start-marker i,
.end-marker i {
  position: relative;
  display: inline-block;
}

/* Keep the icon as the positioning context */
.start-marker i,
.end-marker i {
  position: relative;
  display: inline-block;
}

/* =========================
   MAP MARKERS (PIN + DOT)
========================= */

/* Mapbox marker container */
.start-marker,
.end-marker {
  font-size: 40px;
  color: #000;
  transition: color 0.2s ease;
}

.map-pin {
  position: relative;
  display: inline-block;
  transform-origin: 50% 100%;
  transform: translateY(-20px);
  transition: transform 0.2s ease;
}

.map-pin i {
  font-size: 1em;
  color: currentColor;
  display: inline-block;
  margin: 0;
}


.map-pin .pin-dot {
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  /* border: 2px solid #fff; */
  background: currentColor;
  top: 38%;   
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.pin-icon {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  color: white;
  font-size: 15px;
}

.pin-icon::before {
  margin-bottom: 8px;
}

/* Train */
.train-marker .pin-icon::before {
  content: "\f238"; /* fa-train */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
}

/* Tram */
.tram-marker .pin-icon::before {
  content: "\e5b4"; /* fa-train-tram */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
}

/* Bus */
.bus-marker .pin-icon::before {
  content: "\f207"; /* fa-bus */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
}

/* Optional: SRL or fallback */
.srl-marker .pin-icon::before,
.vline-marker .pin-icon::before {
  content: "\f238"; /* train as default */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
}



/* Hover + sim-hover: move AND scale whole pin */
.start-marker.select:hover .map-pin,
.end-marker.select:hover .map-pin,
.start-marker.sim-hover .map-pin,
.end-marker.sim-hover .map-pin {
  transform: translateY(-26px) scale(1.2);
}

.start-marker.select:hover,
.start-marker.sim-hover {
  color: var(--start-marker);
}

.end-marker.select:hover,
.end-marker.sim-hover {
  color: var(--green-primary);
}

.start-marker.active.srl-marker,
.end-marker.active.srl-marker,
.start-marker.active.srl-marker:hover,
.end-marker.active.srl-marker:hover {
  color: var(--green-primary);
  z-index: 1;
}

.start-marker.active.train-marker,
.end-marker.active.train-marker,
.start-marker.active.train-marker:hover,
.end-marker.active.train-marker:hover {
  color: var(--train-line);
  z-index: 1;
}

.start-marker.active.bus-marker,
.end-marker.active.bus-marker, 
.start-marker.active.bus-marker:hover,
.end-marker.active.bus-marker:hover {
  color: var(--bus-line);
  z-index: 1;
}

.start-marker.active.tram-marker,
.end-marker.active.tram-marker,
.start-marker.active.tram-marker:hover,
.end-marker.active.tram-marker:hover {
  color: var(--tram-line);
  z-index: 1;
}

.start-marker.active.vline-marker,
.end-marker.active.vline-marker,
.start-marker.active.vline-marker:hover,
.end-marker.active.vline-marker:hover {
  color: var(--vline-line);
  z-index: 1;
}

/* Still keep pointer cursor for clickable markers */
.start-marker.select,
.end-marker.select {
  cursor: pointer;
}


/* SRL markers */
.start-marker.active.srl-marker i, .end-marker.active.srl-marker i {
  color: var(--green-primary);
}

.start-marker.active.srl-marker i:after, .end-marker.active.srl-marker i:after {
  background-color: var(--green-primary);
}

.start-marker.active.train-marker i, .end-marker.active.train-marker i {
  color: var(--train-line);
}
.start-marker.active.bus-marker i, .end-marker.active.bus-marker i {
  color: var(--bus-line);
}

.start-marker.active.tram-marker i, .end-marker.active.tram-marker i {
  color: var(--tram-line);
}

.start-marker.active.vline-marker i, .end-marker.active.vline-marker i {
  color: var(--vline-line);
}

.start-marker.select, .end-marker.select {
  cursor: pointer;
}

.start-marker.select:hover {
  /* font-size: 48px; */
  color: var(--start-marker);
}

/* .marker-disabled.start-marker.select:hover {
  color: #bfbfbf;
}

.marker-disabled.start-marker {
  font-size: 40px;
  color: #000;
  opacity: 0.5 !important;
  transition: color 0.2s ease, font-size 0.2s ease;
} */

.end-marker.select:hover {
  /* font-size: 48px; */
  color: var(--green-primary);
}

/* .start-marker.select:hover i, .end-marker.select:hover i {
  margin-bottom: 60px;
} */

.start-marker.sim-hover {
  /* font-size: 48px; */
  color: var(--start-marker);
}

.end-marker.sim-hover {
  /* font-size: 48px; */
  color: var(--green-primary);
}

/* .start-marker.sim-hover i, .end-marker.sim-hover i {
  margin-bottom: 60px;
} */

/* ------------------------------
  MOBILE LOGO POSITIONING (NEW)
------------------------------ */

#mobile-logo {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  display: none;
  align-items: stretch;
  height: 60px;
}

/* Left block: rounded corner */
.mobile-logo-main {
  background: var(--green-primary);
  border-bottom-right-radius: 36px;
  padding: 10px 18px;
  display: flex;
  z-index: 15;
  align-items: center;
}

/* Logo image */
.mobile-logo-main img {
  height: 40px;
  width: auto;
  display: block;
}

/* Right block: angled tail */
.mobile-logo-tail {
  position: absolute;
  width: 40px;      
  height: 60px;
  z-index: 12;
  left: 117px;
  background: var(--green-primary);
  clip-path: polygon(
    0 0,
    100% 0,
    62% 65%,
    0 65%
  );
}

.results-wrapper {
  /* overflow: scroll; */
}


/* ============================================
   Media Queries 
============================================ */

/* 1440px and down – slightly smaller sidebar */
@media (max-width: 1440px) and (min-width: 851px) {
  .sidebar {
    width: 420px;          /* was 450px */
    padding: 16px 18px;        /* a bit tighter */
  }

  .sidebar > .header {
    padding: 16px 18px;
    margin: -18px;
    margin-bottom: 10px;
  }

  .sidebar > .header .title {
    font-size: 1.7em; 
  }

  .journey-title {
    font-size: 1em;            /* down from 1.1em */
  }

  .savings .saving.srl {
    font-size: 0.95em;
  }

}

/* 1200px and down – even more compact */
@media (max-width: 1200px) and (min-width: 851px) {
  .sidebar {
    width: 380px;
    padding: 14px 16px;
  }

    .sidebar > .header .title {
    font-size: 1.5em; 
  }

  .sidebar > .header {
    padding: 14px 16px;
    margin: -16px;
    margin-bottom: 10px;
  }

  .sidebar .description {
    font-size: 0.9em;
  }

  .srl-custom-select .srl-selected {
    padding: 12px 14px;
    font-size: 0.95em;
  }

  /* #content-wrapper.results-active * {
    display: none;
  } */

}
/* Mobile and Tablet */
@media (max-width: 850px) {

  #map {
    top: 0;
    bottom: 0;
  }

  input,
  select,
  textarea {
    font-size: 16px !important;
  }


  .sidebar {
    position: fixed;
    left: 0;
    right: 0;
    top: auto;
    bottom: 0;
    max-width: none;
    height: 350px;
    max-height: 70vh;
    display: flex;
    flex-direction: column;
    width: 100%;
    transform: translateY(0);
    padding: 12px;
    background: #fff;
    color: #000;
    z-index: 5000;

    /* animation */
    animation: sidebar-slide-up 0.4s ease forwards;
    transition: height 0.25s ease;
  }

  .sidebar.sidebar--startdropdown-open {
    height: 450px;
  }

  .sidebar.sidebar--enddropdown-open {
    height: 360px;
  }

  @keyframes sidebar-slide-up {
    from { transform: translateY(30%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
  }

  #dropdown-section {
    margin-top: 0;
  }

  #content-wrapper {
    flex: 1 1 auto;
    overflow-y: auto;
  }

  .srl-custom-select .srl-options {
    max-height: 170px;
  }

  .sidebar > .header {
    position: sticky;
    z-index: 10;
    background: var(--green-primary);
    color: white;
    padding: 16px 20px;
  }

  .sidebar > .header .title {
    font-size: 1.3em;
  }

  .sidebar > .header p {
    font-size: 0.9em;
  }

  .sidebar .intro-wrapper {
    gap: 6px;
  }

  .srl-custom-select {
    border-radius: 10px;
  }

  .srl-custom-select .srl-selected {
    padding: 12px;
    font-size: 0.95em;
  }

  /* Options list should not overflow the screen */
  .srl-options {
    max-height: 45vh;
  }

  .savings .saving.srl {
    font-size: 1.2em;
  }

  #mobile-logo {
    display: flex;
  }

  #logo-wrapper {
    display: none;
  }

  .sidebar .spacer {
    display: none;
  }

  #journey-content {
    display: none;
    flex: 1;
    padding: 8px 10px 10px;
    -webkit-overflow-scrolling: touch;
  }

  #journey-content::-webkit-scrollbar {
    width: 6px;
  }

  #journey-content::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
  }

  .sidebar.sidebar--mobile-start-selected > .header {
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .sidebar.sidebar--mobile-start-selected > .header .title {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .sidebar.sidebar--mobile-start-selected #start-wrapper {
    display: none;
  }

  #dropdown-section #start-wrapper, #dropdown-section #end-wrapper {
    margin-top: 12px;
  }

  .dropdown--compact-section .srl-dropdown-step {
    margin-top: 0 !important;
  }

  .map-pin {
    transform: translateY(-15px);
  }

  .map-pin i {
    font-size: 0.8em;
  }

  .map-pin .pin-dot {
    width: 10px;
    height: 10px;
  }

  .pin-icon {
    font-size: 11px;
  }

  .mapboxgl-popup-content {
    padding-top: 4px;
    height: 25px;
  }

  .station-label {
    font-size: 0.8rem;
    font-weight: bold;
    padding: 2px 6px;
  }

  .mapboxgl-popup-content::before {
    top: 70%;
  }

  .right .mapboxgl-popup-content::before {
    top: 70%;
  }

  .bottom .mapboxgl-popup-content::before {
    top: 22px;
  }

}
