/*
 * Item 88 (2026-12-03): the "Flight details" pop-up on the results page (search.php), opened from a card's foot.
 * The owner saw it as a preview on 3 December and approved it ("Go with your suggestions on A to E and build it").
 * On a computer: a dialog in the middle of the page. On a phone: a sheet from the bottom, the price and Book always in
 * reach. The page behind is held still while it is open (html.fd-open).
 */

/* The link, at the right of the card's foot (after the date, the bags and the refund chip). */
.fd-link { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600;
  color: rgb(var(--brand-2-rgb, 40 71 176)); background: none; border: 0; padding: 2px; cursor: pointer; }
.fd-link:hover { text-decoration: underline; text-underline-offset: 2px; }
.fd-link:focus-visible { outline: 2px solid rgb(var(--brand-2-rgb, 40 71 176)); outline-offset: 2px; border-radius: 6px; }
.dark .fd-link { color: #9db2ff; }

html.fd-open { overflow: hidden; }

.fd-back { position: fixed; inset: 0; z-index: 70; background: rgb(11 22 48 / .55); backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center; }
.fd-dlg { width: min(640px, calc(100vw - 32px)); max-height: calc(100vh - 56px); display: flex; flex-direction: column; background: #fff; color: #0b1630;
  border-radius: 18px; box-shadow: 0 24px 64px rgb(11 22 48 / .35); overflow: hidden; font-family: var(--font-body, Inter, system-ui, sans-serif); text-align: left; }
.dark .fd-dlg { background: rgb(14 20 38); color: #e8ecf8; box-shadow: 0 24px 64px rgb(0 0 0 / .6); border: 1px solid rgb(38 47 74); }

.fd-head { padding: 18px 22px 14px; border-bottom: 1px solid #e6dfd1; display: flex; gap: 12px; align-items: flex-start; }
.fd-head > div:first-child { flex: 1; min-width: 0; }
.dark .fd-head { border-color: rgb(38 47 74); }
.fd-eyebrow { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; color: #7a5a12; }
.dark .fd-eyebrow { color: #e7cf8f; }
.fd-title { font-family: var(--font-display, Georgia, serif); font-size: 23px; line-height: 1.2; font-weight: 600; margin: 2px 0 0; }
.fd-sub { font-size: 13px; color: #57607a; margin-top: 4px; }
.dark .fd-sub { color: #9aa5c0; }
.fd-x { margin-left: auto; width: 34px; height: 34px; border-radius: 10px; border: 1px solid #e6dfd1; background: none; color: inherit;
  display: inline-grid; place-items: center; cursor: pointer; flex: none; }
.fd-x:hover { background: #f6f3ec; }
.dark .fd-x { border-color: rgb(38 47 74); }
.dark .fd-x:hover { background: rgb(38 47 74); }

.fd-body { padding: 16px 22px 6px; overflow: auto; overscroll-behavior: contain; }

/* A flight. */
.fd-leg { border: 1px solid #e6dfd1; border-radius: 14px; padding: 14px 16px; }
.dark .fd-leg { border-color: rgb(38 47 74); background: rgb(20 28 52 / .5); }
.fd-leghead { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 13px; }
.fd-al { display: inline-grid; place-items: center; min-width: 30px; height: 22px; padding: 0 5px; border-radius: 6px; background: #f1ebdf; color: #0b1630; font-size: 11px; font-weight: 700; }
.dark .fd-al { background: rgb(38 47 74); color: #e8ecf8; }
.fd-alname { font-weight: 600; }
.fd-meta { margin-left: auto; color: #57607a; font-size: 12px; }
.dark .fd-meta { color: #9aa5c0; }
.fd-op { flex-basis: 100%; font-size: 12px; color: #57607a; }
.dark .fd-op { color: #9aa5c0; }

/* Its timeline: time | dot and dashed line | place. */
.fd-tl { display: grid; grid-template-columns: 80px 18px minmax(0, 1fr); column-gap: 8px; margin-top: 12px; }
.fd-time { font-family: var(--font-display, Georgia, serif); font-size: 19px; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
.fd-day { font-size: 11px; color: #57607a; margin-top: 2px; white-space: nowrap; }
.dark .fd-day { color: #9aa5c0; }
.fd-plus { color: #d97706; font-weight: 700; }
.fd-dot { width: 11px; height: 11px; border-radius: 50%; border: 2px solid rgb(var(--brand-2-rgb, 40 71 176)); background: #fff; margin: 5px auto 0; }
.dark .fd-dot { background: rgb(14 20 38); border-color: #8ea4ff; }
.fd-line { width: 2px; background: repeating-linear-gradient(to bottom, #b7c2e0 0 4px, transparent 4px 8px); margin: 0 auto; min-height: 34px; height: 100%; }
.fd-place { font-size: 14px; font-weight: 600; line-height: 1.25; }
.fd-place b { font-weight: 700; }
.fd-apt { font-size: 12px; color: #57607a; margin-top: 1px; }
.dark .fd-apt { color: #9aa5c0; }
.fd-term { display: inline-block; margin-left: 6px; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 5px; background: #eef2ff; color: #1e3a8a; vertical-align: 1px; }
.dark .fd-term { background: rgb(47 85 216 / .25); color: #c9d4ff; }
.fd-dur { font-size: 12px; color: #57607a; padding: 6px 0 10px; }
.dark .fd-dur { color: #9aa5c0; }

/* The bags, on each flight. */
.fd-bags { margin-top: 12px; padding-top: 10px; border-top: 1px dashed #e6dfd1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; font-size: 12px; color: #3b4560; }
.dark .fd-bags { border-color: rgb(38 47 74); color: #c3cbe0; }
.fd-bags > span { display: inline-flex; align-items: center; gap: 5px; }
.fd-peradult { color: #7f8aa6; }

/* A wait between two flights. */
.fd-lay { margin: 10px 0; padding: 10px 14px; border-radius: 12px; background: #faf7f1; border: 1px solid #efe6d2; }
.dark .fd-lay { background: rgb(20 28 52); border-color: rgb(38 47 74); }
.fd-laytop { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.fd-laytop svg { color: #7a5a12; flex: none; }
.dark .fd-laytop svg { color: #e7cf8f; }
.fd-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.fd-chip { font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 99px; border: 1px solid #e2dccd; background: #fff; color: #3b4560; }
.fd-chip.warn { border-color: #f3cf9f; background: #fff4e0; color: #8a4b06; }
.fd-chip.bad { border-color: #f5b5bd; background: #fdecee; color: #a3162c; }
.dark .fd-chip { background: rgb(14 20 38); border-color: rgb(62 73 104); color: #c3cbe0; }
.dark .fd-chip.warn { background: #2f2412; border-color: #5e4220; color: #f4b860; }
.dark .fd-chip.bad { background: #351b19; border-color: #6b2b2b; color: #f08b82; }
.fd-hint { font-size: 12px; color: #57607a; margin-top: 6px; }
.dark .fd-hint { color: #9aa5c0; }

/* The transit-visa note, and the small print. */
.fd-note { margin: 12px 0 4px; padding: 10px 14px; border-radius: 12px; font-size: 12.5px; line-height: 1.45; background: #eef2ff; color: #1e2b5a; display: flex; gap: 8px; }
.fd-note > svg { flex: none; margin-top: 1px; }
.dark .fd-note { background: rgb(47 85 216 / .16); color: #d4dcf8; }
.fd-small { font-size: 11.5px; color: #7f8aa6; margin: 10px 0 12px; }

/* The foot: the price, "Fare rules and more", Book. */
.fd-foot { border-top: 1px solid #e6dfd1; padding: 12px 22px; display: flex; align-items: center; gap: 14px; }
.dark .fd-foot { border-color: rgb(38 47 74); }
.fd-price { font-family: var(--font-display, Georgia, serif); font-size: 22px; font-weight: 600; line-height: 1; }
.fd-per { font-size: 11px; color: #57607a; margin-top: 3px; }
.dark .fd-per { color: #9aa5c0; }
.fd-more { font-size: 12.5px; font-weight: 600; color: rgb(var(--brand-2-rgb, 40 71 176)); text-decoration: none; margin-left: auto; }
.fd-more:hover { text-decoration: underline; }
.dark .fd-more { color: #9db2ff; }
.fd-more[style*="display: none"] + .fd-book { margin-left: auto; }
.fd-book { min-width: 96px; }
/* A fare that cannot be booked: says so, with its reason in words under it (as the cards do, C2). */
.fd-nbwrap { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; max-width: 220px; text-align: right; }
.fd-more[style*="display: none"] ~ .fd-nbwrap { margin-left: auto; }
.fd-nb { font-size: 12px; font-weight: 600; color: #57607a; }
.fd-nbnote { font-size: 11px; line-height: 1.35; color: #57607a; }
.dark .fd-nb, .dark .fd-nbnote { color: #9aa5c0; }

/* A phone: a sheet from the bottom. */
@media (max-width: 639px) {
  .fd-back { align-items: flex-end; }
  .fd-dlg { width: 100vw; max-height: 92vh; border-radius: 18px 18px 0 0; }
  .fd-head { padding: 10px 16px 12px; position: relative; }
  .fd-head::before { content: ""; position: absolute; top: 6px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 4px; background: #d6cfbf; }
  .dark .fd-head::before { background: rgb(62 73 104); }
  .fd-head > div:first-child { margin-top: 10px; }
  .fd-x { margin-top: 10px; }
  .fd-title { font-size: 20px; }
  .fd-body { padding: 12px 16px 4px; }
  .fd-leg { padding: 12px; }
  .fd-tl { grid-template-columns: 74px 18px minmax(0, 1fr); }
  .fd-meta { margin-left: 0; flex-basis: 100%; }
  .fd-foot { padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); gap: 12px; }
}
