/* Connecting flights: a small departure board on approach and a transfer sign after landing.
   The board is a matte flip board (no glass); the action is a yellow airport wayfinding sign. */
.connect-board {
  --cb-board: #121419;
  --cb-line: rgba(255, 255, 255, 0.07);
  --cb-text: #f2f3f7;
  --cb-sub: rgba(236, 239, 247, 0.6);
  --cb-flap: #ffc83a;
  --cb-board-green: #78e3a8;
  --cb-sign: #ffcd00;
  --cb-sign-ink: #121212;
  --cb-screen-h: var(--airshow-viewport-height, 100vh);
  position: fixed;
  top: 112px;
  left: 24px;
  z-index: 1326; /* over the cockpit and cabin pictures, under the leave/upgrade dialogs (1328+) */
  display: flex;
  flex-direction: column;
  width: 404px;
  max-height: calc(var(--cb-screen-h) - 112px - 140px);
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(180deg, #171a21, var(--cb-board) 46px);
  color: var(--cb-text);
  box-shadow: 0 16px 30px rgba(3, 5, 18, 0.36), 0 1px 0 rgba(255, 255, 255, 0.06) inset;
  font-family: var(--airshow-ui-font-family, "Pretendard Variable", sans-serif);
  font-variant-numeric: tabular-nums;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 220ms ease, transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.connect-board[hidden] { display: none; }
.connect-board-head, .connect-board-foot { flex: none; }
.connect-board.is-open { opacity: 1; transform: none; }
body.ui-vertical-flip .connect-board { top: auto; bottom: 112px; }
/* A phone held upright lays the app out sideways: its height is then the screen width. */
html.airshow-force-landscape .connect-board { --cb-screen-h: var(--airshow-orientation-vh); }

.connect-board-head { display: flex; align-items: center; gap: 9px; min-height: 46px; padding: 0 6px 0 14px; }
.connect-board-glyph {
  flex: none;
  width: 20px;
  height: 16px;
  background: var(--cb-flap);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 18'><path d='M2 16.5h20' stroke='black' stroke-width='1.8' stroke-linecap='round'/><path d='M3.6 10.6l1.9.5 3.1-3 4.6 1.2-3.6 4.6 2.3.6 6.2-4.4 3.3.9c1 .3 2-.3 2.2-1.2.3-1-.3-1.9-1.2-2.2L6.7 4.1c-.9-.2-1.8.2-2.2 1L3 8.1z' fill='black' transform='rotate(-16 12 9)'/></svg>") center / contain no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 18'><path d='M2 16.5h20' stroke='black' stroke-width='1.8' stroke-linecap='round'/><path d='M3.6 10.6l1.9.5 3.1-3 4.6 1.2-3.6 4.6 2.3.6 6.2-4.4 3.3.9c1 .3 2-.3 2.2-1.2.3-1-.3-1.9-1.2-2.2L6.7 4.1c-.9-.2-1.8.2-2.2 1L3 8.1z' fill='black' transform='rotate(-16 12 9)'/></svg>") center / contain no-repeat;
}
.connect-board-title { margin: 0; flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; font-weight: 720; letter-spacing: -0.005em; }
.connect-board-where { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 550; color: var(--cb-sub); }
.connect-board-fold {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--cb-sub);
  cursor: pointer;
}
.connect-board-fold:hover { background: rgba(255, 255, 255, 0.06); color: var(--cb-text); }
.connect-board-fold i { width: 9px; height: 9px; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-2px) rotate(45deg); transition: transform 180ms ease; }
.connect-board-fold[aria-expanded="true"] i { transform: translateY(2px) rotate(-135deg); }

.connect-board-rows { flex: 0 1 auto; min-height: 0; margin: 0; padding: 0; overflow-y: auto; list-style: none; border-top: 1px solid var(--cb-line); overscroll-behavior: contain; }
.connect-board-rows li + li { border-top: 1px solid var(--cb-line); }
/* Line 1: flight, city, status. Line 2: type · code · viewers and the choice cue, so a long cue (fr, id, de)
   shortens the small line, never the city. */
.connect-row {
  position: relative;
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) auto;
  grid-template-areas: "flight dest status" "flight line line";
  align-items: center;
  column-gap: 12px;
  row-gap: 2px;
  width: 100%;
  min-height: 58px;
  padding: 8px 14px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color 150ms ease;
}
.connect-row:hover:not(:disabled) { background: rgba(255, 255, 255, 0.04); }
.connect-row:disabled { cursor: default; color: inherit; }
.connect-row.is-chosen { background: rgba(255, 200, 58, 0.07); }
.connect-row.is-chosen::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--cb-flap); }
.connect-row-flight { grid-area: flight; font-size: 19px; font-weight: 760; letter-spacing: 0.02em; color: var(--cb-flap); white-space: nowrap; }
.connect-row-dest { grid-area: dest; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; font-weight: 650; }
.connect-row-status { grid-area: status; justify-self: end; font-size: 14px; font-weight: 680; white-space: nowrap; }
.connect-row[data-status="boarding"] .connect-row-status { color: var(--cb-board-green); }
.connect-row-line { grid-area: line; display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.connect-row-meta { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 550; color: var(--cb-sub); }
.connect-row-meta span + span::before { content: "\00a0\00b7\00a0"; }
.connect-row-watch { color: rgba(255, 214, 120, 0.85); }
.connect-row-cue { flex: none; max-width: 62%; overflow: hidden; text-overflow: ellipsis; font-size: 12px; font-weight: 600; color: var(--cb-sub); white-space: nowrap; }
.connect-row.is-chosen .connect-row-cue { color: var(--cb-flap); }
.connect-row.is-chosen .connect-row-cue::before { content: "\2713\00a0"; }
.connect-board-sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.connect-row:focus-visible,
.connect-board-fold:focus-visible,
.connect-board-stay:focus-visible { outline: 2px solid var(--cb-flap); outline-offset: -2px; }

/* The board flips its rows in when it first appears, like split-flap modules turning over. */
.connect-board-rows.is-flipping li { animation: connect-flap 200ms cubic-bezier(0.3, 0.7, 0.4, 1) backwards; transform-origin: 50% 0; }
.connect-board-rows.is-flipping li:nth-child(2) { animation-delay: 70ms; }
.connect-board-rows.is-flipping li:nth-child(3) { animation-delay: 140ms; }
@keyframes connect-flap {
  from { opacity: 0.2; transform: perspective(500px) rotateX(-80deg); }
  to { opacity: 1; transform: none; }
}

.connect-board-foot { position: relative; display: grid; gap: 4px; padding: 10px 14px 12px; border-top: 1px solid var(--cb-line); }
.connect-board-note { margin: 0; font-size: 13px; font-weight: 520; color: var(--cb-sub); }
.connect-board-go[hidden],
.connect-board-stay[hidden],
.connect-board-note[hidden] { display: none; }
/* Airport wayfinding sign: yellow plate, black type, arrow first. */
.connect-board-go {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 50px;
  padding: 0 16px;
  border: 0;
  border-radius: 6px;
  overflow: hidden;
  background: var(--cb-sign);
  color: var(--cb-sign-ink);
  font: inherit;
  font-size: 17px;
  font-weight: 760;
  text-align: left;
  cursor: pointer;
}
.connect-board-go:hover:not(:disabled) { filter: brightness(1.04); }
.connect-board-go:disabled { cursor: default; }
.connect-board-go:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.connect-board-go-fill { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.13); transform: scaleX(0); transform-origin: 0 50%; transition: transform 1000ms linear; }
.connect-board-go-arrow {
  position: relative;
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 4px;
  background: var(--cb-sign-ink);
}
.connect-board-go-arrow::after {
  content: "";
  position: absolute;
  inset: 5px;
  background: var(--cb-sign);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M2 8h10M8.5 3.5 13 8l-4.5 4.5' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='square'/></svg>") center / contain no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M2 8h10M8.5 3.5 13 8l-4.5 4.5' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='square'/></svg>") center / contain no-repeat;
}
.connect-board-go-text { position: relative; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.connect-board-stay {
  justify-self: center;
  min-height: 32px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  color: var(--cb-sub);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.connect-board-stay:hover { color: var(--cb-text); text-decoration: underline; text-underline-offset: 3px; }
.connect-board.is-collapsed .connect-board-rows,
.connect-board.is-collapsed[data-phase="approach"] .connect-board-foot { display: none; }

/* Transfer announcement: the cabin screen goes to the airline colour while the next flight is boarded. */
.connect-transfer {
  position: fixed;
  inset: 0;
  z-index: 2400;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--airshow-theme-color, #1D0D78);
  background-image: radial-gradient(120% 90% at 50% 35%, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0) 70%);
  color: #fff;
  font-family: var(--airshow-ui-font-family, "Pretendard Variable", sans-serif);
  text-align: center;
  opacity: 0;
  transition: opacity 240ms ease;
  pointer-events: none;
}
.connect-transfer[hidden] { display: none; }
.connect-transfer.is-on { opacity: 1; pointer-events: auto; }
.connect-transfer-inner { display: grid; justify-items: center; gap: 8px; transform: translateY(10px); transition: transform 250ms cubic-bezier(0.2, 0.8, 0.2, 1); }
.connect-transfer.is-on .connect-transfer-inner { transform: none; }
.connect-transfer.is-still .connect-transfer-inner { transform: none; transition: none; }
.connect-transfer p { margin: 0; }
.connect-transfer-eyebrow { font-size: 18px; font-weight: 650; color: rgba(255, 255, 255, 0.74); }
.connect-transfer-flight { font-size: 92px; font-weight: 780; line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.connect-transfer-route { font-size: 26px; font-weight: 620; }
.connect-transfer-note { font-size: 16px; font-weight: 550; color: rgba(255, 255, 255, 0.74); }

/* Phones (used rotated): a narrower board under the close button, kept above the flight card or the band. */
html.airshow-mobile-runtime .connect-board { top: 74px; left: 12px; width: 320px; max-height: calc(var(--cb-screen-h) - 74px - 104px); border-radius: 9px; }
html.airshow-mobile-runtime body.airshow-phone-card-layout .connect-board { top: 74px; max-height: calc(var(--cb-screen-h) - 74px - 136px); }
html.airshow-mobile-runtime body.ui-vertical-flip .connect-board { top: auto; bottom: 74px; }
html.airshow-mobile-runtime .connect-board-head { min-height: 36px; gap: 7px; padding-left: 11px; }
html.airshow-mobile-runtime .connect-board-glyph { width: 16px; height: 13px; }
html.airshow-mobile-runtime .connect-board-title { font-size: 14px; }
html.airshow-mobile-runtime .connect-board-where { font-size: 12px; }
html.airshow-mobile-runtime .connect-board-fold { width: 34px; height: 34px; }
html.airshow-mobile-runtime .connect-row { grid-template-columns: 60px minmax(0, 1fr) auto; column-gap: 9px; row-gap: 0; min-height: 40px; padding: 3px 11px; }
html.airshow-mobile-runtime .connect-row-flight { font-size: 15px; }
html.airshow-mobile-runtime .connect-row-dest { font-size: 13.5px; }
html.airshow-mobile-runtime .connect-row-meta,
html.airshow-mobile-runtime .connect-row-cue,
html.airshow-mobile-runtime .connect-row-status,
html.airshow-mobile-runtime .connect-board-note,
html.airshow-mobile-runtime .connect-board-stay { font-size: 12px; }
html.airshow-mobile-runtime .connect-row-code { display: none; }
html.airshow-mobile-runtime .connect-board-foot { gap: 0; padding: 6px 11px 5px; }
html.airshow-mobile-runtime .connect-board-go { min-height: 40px; gap: 9px; padding: 0 11px; font-size: 14px; }
html.airshow-mobile-runtime .connect-board-go-arrow { width: 21px; height: 21px; }
html.airshow-mobile-runtime .connect-board-stay { min-height: 28px; }
html.airshow-mobile-runtime .connect-transfer-flight { font-size: 54px; }
html.airshow-mobile-runtime .connect-transfer-route { font-size: 18px; }
html.airshow-mobile-runtime .connect-transfer-eyebrow,
html.airshow-mobile-runtime .connect-transfer-note { font-size: 14px; }

@media (prefers-reduced-motion: reduce) {
  .connect-board,
  .connect-transfer,
  .connect-transfer-inner,
  .connect-board-go-fill { transition: none; }
  .connect-board { transform: none; }
  .connect-board-rows.is-flipping li { animation: none; }
}
