/* Public transport: the connections to the pickup and from the drop-off under
   a match, the public transport option, and the connection list (app.js).
   Linked after style.css. */

.last-mile, .transit-box {
  margin-top: 8px;
  padding: 8px 10px;
  background: white;
  border: 1px dashed var(--border);
  border-radius: 6px;
  font-size: 12px;
}

.transit-box.alt {
  border-style: solid;
  border-color: var(--border);
}

.transit-box .conn {
  padding: 4px 0;
  border-top: 1px solid var(--border);
}

.transit-box .conn:first-of-type { border-top: none; }

/* The public transport alternative: one line, opened on a click
   (renderTransitOption). */
details.transit-box { padding: 0; border-radius: 10px; font-size: 13px; }
details.transit-box > summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
}
details.transit-box > summary::-webkit-details-marker { display: none; }
details.transit-box > summary::after {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  margin: 0 4px 3px auto;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
}
details.transit-box[open] > summary::after { margin-bottom: -3px; transform: rotate(-135deg); }
details.transit-box > :not(summary) { margin-left: 14px; margin-right: 14px; }
details.transit-box > :last-child:not(summary) { margin-bottom: 8px; }
.pt-icon {
  flex: none;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.pt-title { font-weight: 600; }
.pt-summary { color: var(--muted); }
.pt-stations { font-weight: 600; }

/* One connection per row, as plain text (see renderConnections) */
.pt-conn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid var(--border);
}
.pt-conn:first-of-type { border-top: none; }

.pt-body { flex: 1; min-width: 0; }
.pt-times { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; }
.pt-clock { font-size: 14px; font-weight: 600; white-space: nowrap; }
/* The day a connection leaves on, when it isn't the day searched: above its times. */
.pt-day { flex-basis: 100%; font-size: 12px; font-weight: 700; }
.pt-meta { font-size: 12px; color: var(--muted); }
.pt-lines { margin-top: 2px; font-size: 12px; color: var(--muted); }

/* The tickets: a link, not a button. */
.pt-book {
  flex: 0 0 auto;
  font-size: 12px;
  color: var(--accent-dark);
  white-space: nowrap;
}

/* A drive found further away than a search usually looks (search.py), and
   the sentence above the results that says so. */
.badge.wider {
  background: #fff4e5;
  color: #995c00;
  font-weight: 600;
}

.wider-note { margin-bottom: 8px; }

/* "Directions" next to a match's pickup or drop-off (meetingPointLine in app.js). */
.directions-link { white-space: nowrap; color: var(--accent-dark); }
