.map-stop-popup .leaflet-popup-content-wrapper {
  overflow: hidden;
  border: 0;
  border-radius: 20px;
  box-shadow: 0 22px 55px rgba(16, 42, 67, .25);
}

.map-stop-popup .leaflet-popup-content,
.map-stop-popup .leaflet-popup-scrolled {
  width: min(380px, calc(100vw - 44px)) !important;
  max-height: none !important;
  margin: 0;
  overflow: visible !important;
  border: 0;
}

.map-stop-popup .leaflet-popup-close-button {
  z-index: 4;
  top: 8px !important;
  right: 8px !important;
  display: grid;
  width: 27px !important;
  height: 27px !important;
  padding: 0 !important;
  place-items: center;
  color: rgba(255, 255, 255, .82) !important;
  font-size: 18px !important;
  border-radius: 9px;
  background: rgba(255, 255, 255, .1);
}

.map-stop-popup .leaflet-popup-close-button:hover {
  color: #fff !important;
  background: rgba(255, 255, 255, .2);
}

.map-stop-popup-redesigned {
  overflow: hidden;
  background: #fff;
}

.map-stop-popup-redesigned .map-stop-popup-title {
  min-height: 67px;
  padding: 13px 48px 13px 15px;
  color: #fff;
  border: 0;
  background:
    radial-gradient(circle at 85% -20%, rgba(255, 202, 92, .3), transparent 42%),
    linear-gradient(135deg, #102a43, #12695f);
}

.map-stop-popup-redesigned .map-stop-popup-icon {
  width: 39px;
  height: 39px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 12px;
  background: rgba(255, 255, 255, .12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12);
}

.map-stop-popup-redesigned .map-stop-popup-title small {
  color: rgba(255, 255, 255, .62);
  font-size: .58rem;
}

.map-stop-popup-redesigned .map-stop-popup-title strong {
  max-width: 270px;
  color: #fff;
  font-family: "Manrope", sans-serif;
  font-size: .95rem;
  letter-spacing: -.02em;
}

.map-stop-network {
  padding: 11px 15px 12px;
  border-bottom: 1px solid #e7efeb;
  background: #fff;
}

.map-stop-section-heading {
  display: flex;
  margin-bottom: 8px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.map-stop-section-heading > span {
  color: #486581;
  font-size: .63rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.map-stop-section-heading > small {
  color: #829ab1;
  font-size: .61rem;
  font-weight: 700;
}

.map-stop-popup-redesigned .map-stop-lines {
  display: flex;
  max-height: none;
  padding: 0;
  gap: 5px;
  overflow: visible;
}

.map-stop-popup-redesigned .map-stop-line-badge {
  min-width: 30px;
  min-height: 25px;
  padding: 3px 7px;
  border-radius: 7px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08);
}

.map-stop-more-lines {
  display: grid;
  min-width: 28px;
  height: 25px;
  place-items: center;
  color: #486581;
  font-size: .61rem;
  font-weight: 800;
  border-radius: 7px;
  background: #e8efec;
}

.map-stop-departures-section {
  padding-top: 10px;
  background: #f8faf9;
}

.map-stop-popup-redesigned .map-stop-passages-heading {
  padding: 0 15px 7px;
  border: 0;
}

.map-stop-live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #087f72 !important;
}

.map-stop-live i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #00a896;
  box-shadow: 0 0 0 3px rgba(0, 168, 150, .12);
}

.map-stop-popup-redesigned .map-stop-passages {
  max-height: none;
  padding: 0 11px 7px;
  overflow: visible;
}

.map-stop-popup-redesigned .map-stop-passage {
  min-height: 46px;
  padding: 7px 6px;
  grid-template-columns: auto minmax(0, 1fr) 53px;
  gap: 9px;
  border-top: 1px solid #e5ece9;
}

.map-stop-popup-redesigned .map-stop-passage:first-child {
  border-top: 0;
}

.map-stop-popup-redesigned .map-stop-passage-line {
  min-width: 34px;
  min-height: 28px;
  padding: 4px 7px;
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08);
}

.map-stop-popup-redesigned .map-stop-passage-direction {
  display: -webkit-box;
  overflow: hidden;
  color: #334e68;
  font-size: .72rem;
  font-weight: 700;
  line-height: 1.22;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.map-stop-popup-redesigned .map-stop-passage-time {
  display: flex;
  align-items: flex-end;
  text-align: right;
  flex-direction: column;
  gap: 0;
}

.map-stop-popup-redesigned .map-stop-passage-time strong {
  color: #102a43;
  font-family: "Manrope", sans-serif;
  font-size: .78rem;
}

.map-stop-popup-redesigned .map-stop-passage-time small {
  color: #9aabb8;
  font-family: "DM Sans", sans-serif;
  font-size: .54rem;
  font-weight: 700;
}

.map-stop-popup-redesigned .map-stop-passage-time small.is-live {
  color: #00a896;
}

.map-stop-popup-footer {
  padding: 8px 11px 11px;
  background: #f8faf9;
}

.map-stop-popup-redesigned .map-stop-more {
  width: 100%;
  min-height: 38px;
  margin: 0;
  padding: 8px 12px;
  color: #fff;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(135deg, #ff6b55, #ec523c);
  box-shadow: 0 7px 16px rgba(255, 107, 85, .2);
}

.map-stop-popup-redesigned .map-stop-more:hover {
  background: linear-gradient(135deg, #f45f49, #d94834);
}

@media (max-width: 600px) {
  .map-stop-popup .leaflet-popup-content,
  .map-stop-popup .leaflet-popup-scrolled {
    width: calc(100vw - 54px) !important;
    min-width: 270px;
  }

  .map-stop-popup-redesigned .map-stop-popup-title strong {
    max-width: calc(100vw - 150px);
  }
}
