/*
 * The flight card, 2026-11-18 (layout_cro_flight_card; docs/FLIGHT_CARD.md). The owner chose a mix of two previewed designs:
 * the airline with its aircraft, the journey's length at the top right, large times with the cities (option A); the price,
 * its fares and Book on a torn-off stub at the right (option C); "Only the less relevant details to be displayed in the
 * bottom of the card." And a pin in a corner: pinned cards stay on top, the rest sorts below.
 *
 * The card's markup is the one it always was (search.php); with the switch on, the list carries .fc-v2 and these rules lay
 * the same parts out on a grid. Off: the card as before.
 */

/* The list: a column, so the pinned group can sit first whatever the order of the parts. */
.fc-v2.fc-list { display: flex; flex-direction: column; gap: .75rem; }
.fc-v2.fc-list > * { margin-top: 0 !important; margin-bottom: 0 !important; }
.fc-v2 .fc-pinhead { order: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 13px; color: rgb(var(--c-neutral-800)); }
.fc-v2 .fc-pinhead-ico { color: rgb(var(--brand-1-rgb)); display: inline-flex; }
.fc-v2 .fc-pinhead-note { color: rgb(var(--c-neutral-500)); }
.fc-v2 .fc-pinhead-clear { margin-left: auto; font-size: 13px; color: rgb(var(--c-neutral-500)); text-decoration: underline; text-underline-offset: 2px; }
.fc-v2 .fc-pinhead-clear:hover { color: rgb(var(--c-neutral-900)); }
.fc-v2 .fc.is-pinned { order: 2; }
.fc-v2 .fc-resthead { order: 3; font-size: 13px; color: rgb(var(--c-neutral-500)); margin-top: 4px !important; }
.fc-v2 .fc:not(.is-pinned) { order: 4; }

/* The card: the journey on the left, the stub on the right, the details at the foot of the journey; what opens below spans both. */
.fc-v2 .fc { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 200px;
  grid-template-areas: "al stub" "route stub" "facts stub" "also also" "vendor vendor" "brand brand";
  padding: 0 !important; border-radius: calc(1rem * var(--radius-k, 1)); overflow: hidden; }
.fc-v2 .fc.is-pinned { box-shadow: 0 0 0 2px rgb(var(--brand-1-rgb) / .55), 0 6px 20px rgb(15 23 42 / .07); }
.fc-v2 .fc-row { display: contents; }
.fc-v2 .fc-al { grid-area: al; padding: 16px 104px 0 20px; min-width: 0; }
.fc-v2 .fc-al > div:last-child { min-width: 0; }
.fc-v2 .fc-al .text-sm.font-semibold { font-size: 16px; color: rgb(var(--c-neutral-900)); }
.fc-v2 .fc-fno { display: none; }
.fc-v2 .fc-sub { font-size: 12.5px; color: rgb(var(--c-neutral-500)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fc-v2 .fc-dur { grid-area: al; justify-self: end; align-self: start; margin: 18px 20px 0 0; display: inline-flex; align-items: center; gap: 5px;
  font-size: 13px; font-weight: 600; color: rgb(var(--c-neutral-500)); }
.fc-v2 .fc-route { grid-area: route; min-width: 0 !important; padding: 16px 20px 14px; gap: 18px !important; }
.fc-v2 .fc-time { font-family: inherit !important; font-size: 30px !important; font-weight: 700 !important; letter-spacing: -.02em; color: rgb(var(--c-neutral-900)); }
.fc-v2 .fc-end { text-align: left; }
.fc-v2 .fc-end-to { text-align: right; }
.fc-v2 .fc-code { margin-top: 6px; font-size: 13px; font-weight: 700; color: rgb(var(--c-neutral-700)); white-space: nowrap; }
.fc-v2 .fc-city { margin-left: 5px; font-weight: 500; color: rgb(var(--c-neutral-500)); }
.fc-v2 .fc-day { display: none; }
.fc-v2 .fc-mid-dur { display: none; }
.fc-v2 .fc-facts { grid-area: facts; margin: 0 20px !important; padding: 12px 0 16px; border-top: 1px dashed rgb(var(--c-neutral-200)); align-self: end; }
.fc-v2 .fc-date { display: inline-flex; align-items: center; gap: 5px; margin-right: 4px; font-size: 12.5px; color: rgb(var(--c-neutral-500)); }
.fc-v2 .fc-stale { display: inline-flex; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: calc(999px * var(--radius-k, 1)); background: rgb(254 243 199); color: rgb(146 64 14); }

/* The stub: a dashed tear with a notch at the top and the bottom, the price over Book. */
.fc-v2 .fc-stub { grid-area: stub; position: relative; flex-direction: column; justify-content: center; align-items: center; gap: 10px !important;
  margin: 0 !important; padding: 20px 14px !important; border-left: 2px dashed rgb(var(--c-neutral-200)) !important; text-align: center; }
.fc-v2 .fc-stub::before, .fc-v2 .fc-stub::after { content: ''; position: absolute; left: -11px; width: 20px; height: 20px; border-radius: 50%;
  background: rgb(var(--c-neutral-50)); border: 1px solid rgb(var(--c-neutral-200)); }
.fc-v2 .fc-stub::before { top: -11px; }
.fc-v2 .fc-stub::after { bottom: -11px; }
.fc-v2 .fc-price { text-align: center !important; }
.fc-v2 .fc-price .ml-auto { margin-left: auto; margin-right: auto; }
.fc-v2 .fc-price .ui-price { font-family: inherit !important; font-size: 24px !important; font-weight: 800 !important; letter-spacing: -.01em; }
.fc-v2 .fc-acts { align-items: center; }
.fc-v2 .fc-acts button { min-width: 112px; }

/* What opens under the card ("N fares", the same flight from another source) runs the full width. */
.fc-v2 .fc-more { margin: 0 20px 16px !important; }
.fc-v2 .fc-more-also { grid-area: also; }
.fc-v2 .fc-more-vendor { grid-area: vendor; }
.fc-v2 .fc-more-brand { grid-area: brand; }

/* The pin: a small button in the top-right corner. Pinned: gold, tilted. */
.fc-pin { position: absolute; z-index: 2; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  color: rgb(var(--c-neutral-400)); border: 1px solid transparent; background: transparent; transition: color .15s, border-color .15s, background-color .15s, transform .15s; }
.fc-pin:hover { color: rgb(var(--c-neutral-700)); border-color: rgb(var(--c-neutral-200)); background: rgb(255 255 255 / .9); }
.fc-pin[aria-pressed="true"] { color: rgb(var(--brand-1-rgb)); background: rgb(var(--brand-1-rgb) / .12); border-color: rgb(var(--brand-1-rgb) / .5); transform: rotate(-30deg); }
.fc-pin:focus-visible { outline: 2px solid rgb(var(--brand-1-rgb)); outline-offset: 1px; }

/* A phone: the stub narrower, the times smaller, the cities left out (the codes stay), the length back over the line. */
@media (max-width: 639px) {
  .fc-v2 .fc { grid-template-columns: minmax(0, 1fr) 118px; }
  .fc-v2 .fc-al { padding: 14px 10px 0 14px; }
  .fc-v2 .fc-dur { display: none; }
  .fc-v2 .fc-route { padding: 12px 10px 10px 14px; gap: 8px !important; }
  .fc-v2 .fc-time { font-size: 22px !important; }
  .fc-v2 .fc-city { display: none; }
  .fc-v2 .fc-mid { min-width: 40px !important; padding: 0 !important; }
  .fc-v2 .fc-mid-dur { display: block; }
  .fc-v2 .fc-facts { margin: 0 10px 0 14px !important; padding: 10px 0 14px; }
  .fc-v2 .fc-stub { padding: 40px 8px 14px !important; gap: 8px !important; }
  .fc-v2 .fc-price .ui-price { font-size: 18px !important; }
  .fc-v2 .fc-acts button { min-width: 0; padding-left: 16px; padding-right: 16px; }
  .fc-v2 .fc-acts [data-display-only] { font-size: 11px; padding: 6px 8px; line-height: 1.25; }
  .fc-v2 .fc-more { margin: 0 12px 12px !important; }
}

/* Dark */
.dark .fc-v2 .fc-al .text-sm.font-semibold, .dark .fc-v2 .fc-time { color: rgb(var(--c-neutral-50)); }
.dark .fc-v2 .fc-code { color: rgb(var(--c-neutral-200)); }
.dark .fc-v2 .fc-stub { border-left-color: rgb(var(--c-neutral-700)) !important; }
.dark .fc-v2 .fc-stub::before, .dark .fc-v2 .fc-stub::after { background: rgb(var(--c-neutral-950, 2 6 23)); border-color: rgb(var(--c-neutral-700)); }
.dark .fc-v2 .fc-facts { border-top-color: rgb(var(--c-neutral-700)); }
.dark .fc-v2 .fc-pinhead { color: rgb(var(--c-neutral-100)); }
.dark .fc-pin:hover { background: rgb(var(--c-neutral-800)); border-color: rgb(var(--c-neutral-700)); color: rgb(var(--c-neutral-100)); }
.dark .fc-v2 .fc-stale { background: rgb(120 53 15 / .4); color: rgb(253 230 138); }
