/* =====================================================
   Flight Review — loading skeleton styles
   =====================================================

   This file previously held a 452-line draft of this page's component styles.
   That draft was imported nowhere, and 49 of its 77 selectors had since been
   superseded by rules in the globally linked stylesheets — with different
   values (`.review-flight-airline-logo` was 38px here against the live 56px,
   `.fb-circle` a bordered white disc against the live filled one). Since both
   sides are single-class selectors, importing it would have restyled the page
   with the winner decided by stylesheet order rather than by intent.

   So it is replaced rather than extended. The original is in git history
   (`git show HEAD:components/flight-review/flight-review.css`) if any of it is
   ever wanted back.

   Deliberately small: almost everything the skeleton needs already exists.
     .skeleton-box       custom-fixes.css   the shimmer + reduced-motion stop
     .flight-timeline*   flights.css        itinerary rail geometry
     Bootstrap utilities + <Skeleton>       everything else
   ===================================================== */

/* A placeholder is not content: it should not take clicks, focus or a text
   selection while the real page is still on its way. */
.fr-skeleton {
  pointer-events: none;
  user-select: none;
}

/**
 * The itinerary skeleton reuses the real `.flight-timeline` classes rather than
 * re-creating them, so the 28px indent, the rail, and the 24px item rhythm are
 * identical to the loaded card — that exactness is the point, since it is what
 * stops the layout moving on swap.
 *
 * Only the dot colour has to change. The live rule paints it green
 * (`--color-green-600`), which reads as a real, meaningful status rather than a
 * placeholder. The rail itself is already grey, so it is left alone.
 */
.fr-skeleton .flight-timeline-item::before,
.fr-skeleton .flight-timeline-item.dark-green-dot::before,
.fr-skeleton .flight-timeline-stop::before {
  background: #e0e0e0;
}

/* The currency code on a fee the airline filed in something other than the
   fare's currency. A quiet pill rather than a warning: this is a normal,
   correct state — an Indian carrier files its cancellation fee in INR — and
   the job is to stop "5000" being skimmed as dollars on a page of dollars,
   not to alarm anyone. Sized and coloured to sit under the amount it prefixes,
   never to compete with it. */
.policy-foreign-currency {
  display: inline-block;
  margin-inline-end: 6px;
  padding: 1px 6px;
  border: 1px solid var(--color-blue-light2, #d6e2e8);
  border-radius: 4px;
  background-color: var(--color-blue-light, #eef4f7);
  color: var(--color-first);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  vertical-align: middle;
}

/* ── Indicative converted fee: the rate disclosure (LEIS-917) ───────────────
 *
 * The estimate itself needs no rule — it uses .color-text-muted (#6c757d,
 * ~4.6:1 on white) from custom-fixes.css, which exists precisely because the
 * shared .color-text-gray is ~2:1 and fails WCAG AA.
 */

/* 44x44 hit area from a 14px glyph: the icon stays visually small beside the
   amount while the touch target meets the minimum, via padding that does not
   affect layout. */
.policy-fx-info__trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: -15px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--color-first);
  cursor: pointer;
  vertical-align: middle;
}

.policy-fx-info__trigger:focus-visible {
  outline: 2px solid var(--color-first);
  outline-offset: 2px;
  border-radius: 50%;
}

/*
 * Portalled to <body> and fixed, so nothing clips it.
 *
 * The panel used to be absolutely positioned inside the row, where
 * .table-responsive's `overflow-x: auto` cut it off and gave the cell a
 * scrollbar instead. An ancestor's overflow cannot clip a fixed element in the
 * body, which is why the position is computed in JS rather than declared here.
 *
 * It is hoverable, not inert: it carries the provider attribution link, and a
 * link inside a `pointer-events: none` panel cannot be clicked.
 *
 * THREE TYPE TIERS, AND WHY NONE OF THEM IS PALER
 * Hierarchy here is carried by size, weight and a rule — never by fading the
 * lower lines. #6c757d is ~4.68:1 on white, barely over the 4.5:1 floor for
 * normal text, so anything lighter would buy separation by failing WCAG AA.
 *
 *   rate    11px / 600 / --color-dark   the answer, and the only bold line
 *   meta    10px / 400 / #6c757d        when, and the bank caveat
 *   credit   10px / 400 / #6c757d       licence credit, below a hairline rule
 */
.policy-fx-tooltip {
  position: fixed;
  z-index: 1080; /* above Bootstrap's modal backdrop (1050), below toasts */
  width: max-content;
  max-width: min(14rem, calc(100vw - 1rem));
  padding: 8px 10px;
  border: 1px solid var(--color-blue-light2, #d6e2e8);
  border-radius: 6px;
  background-color: var(--color-white, #fff);
  box-shadow: 0 4px 14px rgb(0 0 0 / 14%);
  text-align: left;
  white-space: normal;
}

.policy-fx-tooltip__rate {
  color: var(--color-dark, #333);
  font-size: 0.6875rem; /* 11px */
  font-weight: 600;
  line-height: 1.4;
  /* Lining figures so the rate does not wobble against the amount above it. */
  font-variant-numeric: tabular-nums;
}

.policy-fx-tooltip__meta {
  margin-top: 3px;
  color: #6c757d;
  font-size: 0.625rem; /* 10px */
  font-weight: 400;
  line-height: 1.45;
}

.policy-fx-tooltip__credit {
  display: block;
  margin-top: 7px;
  padding-top: 5px;
  border-top: 1px solid var(--color-blue-light2, #d6e2e8);
  color: #6c757d;
  font-size: 0.625rem; /* 10px */
  font-weight: 400;
  line-height: 1.4;
  text-decoration: none;
}

.policy-fx-tooltip__credit:hover,
.policy-fx-tooltip__credit:focus-visible {
  color: var(--color-first);
  text-decoration: underline;
}
