/**
 * @file
 * Haltes-kaart: zoekbalk (boven de kaart, in de stijl van het
 * sollicitatieformulier), de kaart zelf met een zwevende route-balk, en
 * een Google InfoWindow boven de aangeklikte marker.
 */
.tup-halte-map {
  position: relative;
  width: 100%;
  height: 70vh;
  min-height: 480px;
  background: #eef1f4;
}

.tup-halte-map__canvas {
  position: absolute;
  inset: 0;
}

/* Wit zoekpaneel linksboven in de kaart (stijl van de boekingstool): twee
   gestapelde velden (vertrek + bestemming) plus de plan-knop. */
.tup-halte-map__panel {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 5;
  width: min(340px, calc(100% - 32px));
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 26px;
  background: #fff;
  border-radius: 0;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

/* Positioneer-laagje rond input + dropdown. */
.tup-halte-map__search-field {
  position: relative;
}

/* Veld-icoon: groen/rood bolletje met bus (zonder aanwijzer), links in het
   invoerveld. De achtergrond-SVG wordt via JS gezet (juiste kleur per veld). */
.tup-halte-map__field-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  pointer-events: none;
}

.tup-halte-map__search-label {
  display: block;
  margin-bottom: 6px;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 14px;
  line-height: 1.2;
  color: #000;
}

.tup-halte-map__search-input {
  width: 100%;
  background: #fff;
  border: 1px solid #d5d5d5;
  border-radius: 0;
  padding: 14px 16px 14px 48px;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.3;
  color: #000;
  outline: none;
}
.tup-halte-map__search-input::placeholder {
  color: #888;
}
/* Focus kleurt mee met het veld: groen voor vertrek, rood voor bestemming. */
.tup-halte-map__search-field[data-halte-field="departure"] .tup-halte-map__search-input:focus {
  border-color: #97bf0d;
  box-shadow: 0 0 0 2px rgba(151, 191, 13, 0.3);
}
.tup-halte-map__search-field[data-halte-field="destination"] .tup-halte-map__search-input:focus {
  border-color: #e95e4e;
  box-shadow: 0 0 0 2px rgba(233, 94, 78, 0.3);
}

/* "Plan deze rit" verschijnt onder de velden zodra beide haltes gekozen zijn. */
.tup-halte-map__plan {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 24px;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  color: #fff;
  background: #801c7f;
  border-radius: 9999px;
}
.tup-halte-map__plan:hover {
  background: #541253;
}
.tup-halte-map__plan[hidden] {
  display: none;
}

/* Banner onderaan de kaart: instructie om een halte te kiezen. */
.tup-halte-map__banner {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  z-index: 4;
  max-width: calc(100% - 32px);
  padding: 12px 22px;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  color: #222;
  background: #fff;
  border-radius: 0;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}
.tup-halte-map__banner[hidden] {
  display: none;
}

/* Suggestie-dropdown: zweeft over de kaart, valt onder het invoerveld. */
.tup-halte-map__suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 5;
  list-style: none;
  margin: 4px 0 0;
  padding: 4px;
  max-height: 320px;
  overflow-y: auto;
  background: #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}
.tup-halte-map__suggestions[hidden] {
  display: none;
}

.tup-halte-map__suggestion {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 0;
  font-size: 0.95rem;
  color: #222;
  cursor: pointer;
}
.tup-halte-map__suggestion:hover,
.tup-halte-map__suggestion.is-active {
  background: #eef1f4;
}

.tup-halte-map__suggestion-count {
  flex: none;
  min-width: 22px;
  padding: 1px 7px;
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  text-align: center;
  color: #666;
  background: #eef1f4;
  border-radius: 9999px;
}
.tup-halte-map__suggestion:hover .tup-halte-map__suggestion-count,
.tup-halte-map__suggestion.is-active .tup-halte-map__suggestion-count {
  background: #fff;
}

/* Infovenster (Google Maps InfoWindow): compact, gecentreerd boven de
   marker. De Google-bubbel levert het witte kader + sluitknop; wij stylen
   de inhoud en geven de container een gelijkmatige, ruimere padding. */
.tup-halte-map .gm-style-iw-c {
  padding: 20px !important;
  border-radius: 0;
}
.tup-halte-map .gm-style-iw-d {
  overflow: visible !important;
}
/* Sluitknop iets dichter naar de rechterbovenhoek. */
.tup-halte-map .gm-style-iw-chr > button.gm-ui-hover-effect {
  position: relative;
  top: -10px;
  right: -10px;
}

.tup-halte-info {
  min-width: 210px;
  text-align: center;
}

.tup-halte-info__title {
  margin: 4px 0 20px;
  font-size: 1.35rem;
  line-height: 1.3;
  font-weight: 700;
  color: #222;
}

.tup-halte-info__body {
  margin: 0 0 20px;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #444;
}
.tup-halte-info__body :first-child { margin-top: 0; }
.tup-halte-info__body :last-child { margin-bottom: 0; }

.tup-halte-info__actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tup-halte-info__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 24px;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  border: 0;
  border-radius: 9999px;
  cursor: pointer;
  transition: filter 150ms ease;
}
.tup-halte-info__action:hover {
  filter: brightness(0.93);
}

/* Vertrek = brand-groen, Bestemming = brand-rood. */
.tup-halte-info__action--depart {
  background: #97bf0d;
  color: #fff;
}
.tup-halte-info__action--arrive {
  background: var(--color-error, #e95e4e);
  color: #fff;
}

