/* The terminals' pages (#509): /terminals, every terminal on its postcard, and /terminals/<slug>, one terminal's
   page. Laid out from the live pages' parts (site.css's .departure, .tag, .band, .card), as the design canvas has them. */

/* ── A terminal's page ─────────────────────────────────────────────────── */

.terminal-banner {
  margin-bottom: var(--space-4);
}

.terminal-back {
  margin: 0;
}

.terminal-back a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
}

/* Its name, what's wrong and how fresh it is, at the top of the first column. */
.terminal-title {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.terminal-title h1 {
  margin: 0;
  font-size: var(--step-5);
}

.terminal-trouble,
.terminal-actions {
  margin: 0;
}

.terminal-actions {
  margin-top: var(--space-2);
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--space-4);
  border: 1.5px solid var(--sound);
  border-radius: 999px;
  font-family: var(--display);
  font-weight: 700;
  text-decoration: none;
}

/* What's leaving and arriving under its name, with its postcard, getting there and WSF's news beside them, or under
   them on a phone (#547): the times first. */
.terminal-body {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--space-5);
}

.terminal-main {
  flex: 999 1 32rem;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.terminal-side,
.terminal-aside {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.terminal-side {
  flex: 1 1 24rem;
}

.terminal-side .postcard {
  max-width: 36rem;
}

.live-page .card h2,
.terminal-news h2 {
  margin: 0 0 var(--space-2);
  font-size: var(--step-2);
}

.terminal-destination-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0 var(--space-4);
  margin-top: var(--space-4);
}

.terminal-destination-head h3,
.terminal-extras h3 {
  margin: 0;
  color: var(--evergreen-ink);
}

.terminal-destination-head .caption,
.terminal-destination > .caption {
  margin: 0;
}

.terminal-route {
  margin: var(--space-2) 0 0;
}

.terminal-route a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
}

.terminal-extras {
  margin-top: var(--space-5);
}

/* Over an extra boat's time: "At the dock", "Left". */
.departure-label {
  font-family: var(--body);
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--ink-2);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Getting there: the small map on top of the card, the address and the links under it. */
.terminal-there {
  padding: 0;
  overflow: hidden;
}

.live-page .fleet-map.terminal-map {
  position: relative;
  top: auto;
  height: 15rem;
  min-height: 0;
}

.live-page .fleet-map.terminal-map.unavailable {
  height: auto;
}

.terminal-there-body {
  padding: var(--space-4) var(--space-4) var(--space-5);
}

.terminal-there address {
  margin-bottom: var(--space-3);
  font-style: normal;
}

.terminal-there p {
  margin: 0;
}

.terminal-there a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
}

.terminal-bulletins {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.bulletin h3 {
  margin: var(--space-1) 0;
  font-size: var(--step-1-display);
}

.bulletin p {
  margin: var(--space-2) 0 0;
}

.bulletin summary {
  min-height: 32px;
  color: var(--sound);
  font-weight: 600;
  cursor: pointer;
}

.terminal-credit {
  margin-top: var(--space-7);
}

/* ── /terminals ────────────────────────────────────────────────────────── */

.terminal-region h2 {
  margin-top: var(--space-7);
}

.terminal-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
  gap: var(--space-5);
  margin: var(--space-4) 0 0;
  padding: 0;
  list-style: none;
}

/* A terminal on its postcard: the art flat on the card, its name the link, which opens it from anywhere on the card. */
.terminal-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid transparent;
  border-radius: var(--radius);
  overflow: hidden;
}

.postcard.compact {
  gap: 0;
}

.postcard.compact .postcard-frame {
  padding: 0;
  border-radius: 0;
  box-shadow: none;
  transform: none;
}

.postcard.compact .postcard-art {
  border-radius: 0;
}

.postcard.compact .postcard-play {
  display: none;
}

.terminal-card-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4) var(--space-4);
}

.terminal-card h3 {
  margin: 0;
  font-size: var(--step-1-display);
  font-weight: 800;
}

.terminal-card h3 a {
  color: var(--ink);
  text-decoration: none;
}

.terminal-card h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.terminal-card h3 a:hover {
  text-decoration: underline;
}

.terminal-card-place,
.terminal-card-quiet {
  margin: 0;
  color: var(--ink-2);
  font-size: var(--step--1);
}

.terminal-card-tag {
  margin: 0;
}

.terminal-card-next {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--step--1);
}

.terminal-card-next li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1) var(--space-2);
}

@media (forced-colors: active) {
  .terminal-card {
    border-color: CanvasText;
  }
}

/* ── Find, on the indexes (#509, #510) ────────────────────────────────── */

/* The page's heading, and the box beside it where there's room, under it where there isn't. */
.index-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-4) var(--space-6);
}

.find {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  flex: 0 1 20rem;
  min-width: min(100%, 14rem);
}

.find label {
  font-weight: 600;
}

.find input {
  min-height: 44px;
  box-sizing: border-box;
  padding: 0 var(--space-3);
  border: 1.5px solid var(--ink-2);
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
}

.find input::placeholder {
  color: var(--ink-2);
  opacity: 1;
}

/* Room for the count, so the page doesn't move when it comes. */
.find-count {
  min-height: 1.5em;
  margin: 0;
  color: var(--ink-2);
}
