/* Blok 05 Toolbox: twee routes van hetzelfde bericht naar een ander antwoord. Rijen worden per breedte op hun plek gezet. */
.route {
  --routelijn: color-mix(in srgb, var(--ink) 28%, var(--sand));

  display: flex;
  flex-direction: column;
  gap: 28px;
}
.route .blok-intro { align-self: center; }

.route__kaart {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 40px;
}
.route__k1 { grid-column: 1; }
.route__k2 { grid-column: 2; }

.route__label {
  grid-row: 1;
  text-align: center;
  color: var(--ink-muted);
}
.route__label--toolbox { color: var(--terracotta); }

.route__bericht {
  grid-row: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-self: center;
  gap: var(--space-1);
  max-width: 360px;
  margin-top: 14px;
}
.route__splits { display: none; }

/* Wie er spreekt: kleiner dan een gewoon onderschrift */
.route__bericht > .onderschrift,
.route__ballon > .onderschrift {
  font-size: 11px;
  line-height: 14px;
}

/* Dunne lijn tussen de stations */
.route__lijn {
  justify-self: center;
  width: 2px;
  height: 28px;
  margin-block: 6px;
  background: var(--routelijn);
  border-radius: 1px;
}
.route__lijn--1 { grid-row: 3; }
.route__rij--1 { grid-row: 4; }
.route__lijn--2 { grid-row: 5; }
.route__rij--2 { grid-row: 6; }
.route__lijn--3 { grid-row: 7; }
.route__rij--3 { grid-row: 8; }

.station {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  min-height: 96px;
  padding: 14px 18px;
  border: 1px solid transparent;
  border-radius: 14px;
}
.station--grijs { background: var(--sunken); }
.station--toolbox {
  background: var(--surface);
  border-color: var(--line);
}
.station__beeld {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
}
.station__beeld img {
  width: auto;
  max-width: 60px;
  height: auto;
  max-height: 58px;
}
.station--grijs .station__beeld img { opacity: .85; }
.station > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.station b {
  font-size: 16px;
  line-height: 21px;
  font-weight: 600;
}
.station--grijs b { color: var(--ink-muted); }
.station > div > span {
  font-size: 14px;
  line-height: 20px;
  color: var(--ink-muted);
}

/* Beide antwoorden delen dezelfde rijen (subgrid): de ballonnen zijn even hoog en de labels staan op één lijn */
.route__antwoord {
  grid-row: 9 / span 3;
  display: grid;
  grid-template-rows: subgrid;
  justify-items: center;
}
/* Ballon met eronder wie er spreekt, zoals bij het bericht van de cliënt */
.route__ballon {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-1);
  width: min(400px, 100%);
}
.route__ballon .ballon {
  flex: 1;
  width: 100%;
}
.route__aankomst {
  position: relative;
  flex: 1;
  width: 2px;
  min-height: 19px;
  margin-block: 7px 14px;
  background: var(--routelijn);
  border-radius: 1px;
}
.route__aankomst::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -8px;
  width: 9px;
  height: 9px;
  background: var(--routelijn);
  border-radius: 50%;
  transform: translateX(-50%);
}
.route__uitkomst {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 10px;
  text-align: center;
}
.route__uitkomst b {
  font-size: 15px;
  line-height: 19px;
  font-weight: 600;
}
.route__uitkomst--grijs b { color: var(--ink-muted); }

/* Bij scrollen lichten de stations rij voor rij op, daarna verschijnen de antwoorden (klasse gezet door route.js) */
.route--beweeg [data-rij] {
  transition: opacity .5s ease, translate .5s ease;
}
.route--beweeg .station:not(.aan),
.route--beweeg .route__lijn:not(.aan) { opacity: .25; }
.route--beweeg .route__antwoord:not(.aan) {
  opacity: 0;
  translate: 0 16px;
}

@media (max-width: 900px) {
  .route__kaart { column-gap: var(--space-4); }
  .station {
    flex-direction: column;
    gap: var(--space-1);
    text-align: center;
  }
}

@media (max-width: 640px) {
  .route { gap: var(--space-4); }
  .route__kaart {
    column-gap: 10px;
    margin-top: 10px;
  }

  .route__bericht {
    grid-column: 1 / -1;
    grid-row: 1;
    align-items: center;
    max-width: 290px;
    margin-top: 0;
  }
  .route__splits {
    display: block;
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    height: 40px;
    margin-top: 6px;
    fill: none;
    stroke: var(--routelijn);
    stroke-width: 2;
  }
  .route__label {
    grid-row: 3;
    padding-block: 6px;
  }
  .route__lijn { margin: 0; }
  .route__lijn--1 { grid-row: 4; height: 12px; }
  .route__rij--1 { grid-row: 5; }
  .route__lijn--2 { grid-row: 6; height: 14px; }
  .route__rij--2 { grid-row: 7; }
  .route__lijn--3 { grid-row: 8; height: 14px; }
  .route__rij--3 { grid-row: 9; }

  .station {
    min-height: 0;
    padding: var(--space-3) var(--space-2);
    border-radius: var(--radius-md);
  }
  .station--grijs { border-color: transparent; }
  .station__beeld {
    width: auto;
    height: 46px;
  }
  .station__beeld img {
    max-width: none;
    height: 46px;
    max-height: none;
  }
  .station > div { gap: var(--space-1); }
  .station b {
    font-size: 14px;
    line-height: 18px;
  }
  .station > div > span {
    font-size: 12px;
    line-height: 16px;
  }

  /* De lijnen stoppen bij de laatste stations, de antwoorden staan onder elkaar */
  .route__antwoord {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    margin-top: var(--space-6);
  }
  .route__antwoord.route__k1 { grid-row: 10; }
  .route__antwoord.route__k2 { grid-row: 12; }
  .route__ballon { width: auto; }
  .route__aankomst { display: none; }
  /* Boven elk antwoord staat van wie het komt, zodat het ook klopt als de kolomkoppen uit beeld zijn */
  .route__wie {
    order: -2;
    text-align: center;
    color: var(--ink-muted);
  }
  .route__wie--toolbox { color: var(--terracotta); }
  /* Het label erboven zegt al wie antwoordt: "AI-functie" onder de ballon kan weg */
  .route__ballon > .onderschrift { display: none; }
  .route__uitkomst {
    order: -1;
    padding-bottom: var(--space-1);
  }
  .route .bronnen { margin-top: var(--space-2); }
}
