/* earn_decision.css: F1 earn-and-credit card, drawer and posting rows
   (design section 8). Tokens only: css-hex-guard skips this directory and
   css-token-guard walks it, so every colour is a tokens.css variable.
   Verdicts are carried by a text label and a tint, never by colour alone. */

/* Card ----------------------------------------------------------------- */
.v2-edc {
  border: 1px solid var(--hairline);
  border-radius: 14px;
  padding: 16px 18px;
  margin: 12px 0;
  background: var(--paper-soft);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.v2-edc__head { display: flex; flex-direction: column; gap: 4px; }
.v2-edc__eyebrow {
  font-size: 0.73333rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--orange);
  font-weight: 600;
}
.v2-edc__title {
  margin: 0;
  font-size: 1.13333rem;
  line-height: 1.3;
  color: var(--ink-strong);
  display: flex;
  align-items: center;
  gap: 8px;
}
.v2-edc__icon { width: 22px; height: 22px; color: var(--navy); flex: 0 0 auto; }
.v2-edc__icon svg { width: 100%; height: 100%; }
.v2-edc__body { margin: 0; color: var(--ink-muted); font-size: 0.93333rem; line-height: 1.5; }
.v2-edc__note {
  margin: 0;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--orange-paper);
  color: var(--ink);
  font-size: 0.86667rem;
}
.v2-edc__note a { color: var(--navy); font-weight: 600; }
.v2-edc__actions { display: flex; gap: 8px; }

/* Drawer body ---------------------------------------------------------- */
.v2-edd { display: flex; flex-direction: column; gap: 14px; }
.v2-edd__tabs { margin-bottom: 2px; }
.v2-edd__segments { display: flex; flex-direction: column; gap: 10px; }
.v2-edd__segment {
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 12px 14px;
  margin: 0;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.v2-edd__segment legend {
  font-size: 0.73333rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  padding: 0 4px;
}
.v2-edd__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.v2-edd__grid .v2-field input,
.v2-edd__grid .v2-field select { width: 100%; text-transform: uppercase; }
.v2-edd__grid .v2-field select { text-transform: none; }
.v2-edd__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.v2-edd__check { display: flex; align-items: center; gap: 8px; font-size: 0.86667rem; color: var(--ink); }
.v2-edd__remove { align-self: flex-start; }
.v2-edd__segment-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.v2-edd__hint { font-size: 0.8rem; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.v2-edd__fare { border: 1px solid var(--hairline); border-radius: 12px; padding: 10px 14px; background: var(--paper-soft); }
.v2-edd__fare summary { cursor: pointer; font-weight: 600; color: var(--ink-strong); }
.v2-edd__fare-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.v2-edd__help { display: block; font-size: 0.73333rem; color: var(--ink-muted); margin-top: 4px; line-height: 1.4; }
.v2-edd__privacy { margin: 0; font-size: 0.8rem; color: var(--ink-muted); line-height: 1.45; }
.v2-edd__run { display: flex; justify-content: flex-end; }
.v2-edd__error { margin: 0; }
.v2-edd__notice {
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--info-paper);
  color: var(--ink);
  font-size: 0.86667rem;
}
.v2-edd__confirm { display: flex; flex-direction: column; gap: 8px; }
.v2-edd__h { margin: 0; font-size: 0.93333rem; color: var(--ink-strong); }

/* Booking form: route, airline chips, per-option details ---------------- */
/* The rules below set display on elements the script also hides with the
   hidden attribute; without this the author display would beat it. */
.v2-edd [hidden] { display: none !important; }
.v2-edd__sub { margin: 0; font-size: 0.93333rem; line-height: 1.45; color: var(--ink-muted); }
.v2-edd__label {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.66667rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.v2-edd [data-mm-edd-pane="type"] { display: flex; flex-direction: column; gap: 14px; }
.v2-edd__route { display: flex; flex-direction: column; gap: 12px; }
/* The date column is wider so dd/mm/yyyy and its picker icon are not clipped. */
.v2-edd__route-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.4fr); gap: 10px; }
.v2-edd__route-grid .v2-field input { width: 100%; }
.v2-edd__route-grid .v2-field input[data-mm-edd-autocomplete] { text-transform: uppercase; }
/* The return date shows its label only while the date itself is shown. */
.v2-edd__return-field:has(input[hidden]) { display: none; }
.v2-edd__cabin { display: flex; flex-direction: column; gap: 6px; }
.v2-edd__airlines { display: flex; flex-direction: column; gap: 8px; }
.v2-edd__chips--airlines:empty { display: none; }
.v2-edd__chip { min-height: 40px; }
.v2-edd__chip[aria-pressed="true"],
.v2-edd__chip[aria-pressed="true"]:hover {
  background: var(--info-paper);
  border-color: var(--info);
  box-shadow: inset 0 0 0 1px var(--info);
  color: var(--info);
}
.v2-edd__chip:focus-visible,
.v2-edd__exact-toggle:focus-visible,
.v2-edd__option-details > summary:focus-visible,
.v2-edd__rank-main:focus-visible { outline: 2px solid var(--atlas-deep); outline-offset: 2px; }
.v2-edd__chip-add { max-width: 12rem; }
.v2-edd__options { display: flex; flex-direction: column; gap: 8px; }
.v2-edd__options:empty { display: none; }
.v2-edd__option {
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 10px 14px;
  background: var(--paper-soft);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.v2-edd__option-name { font-weight: 600; color: var(--ink-strong); font-size: 0.93333rem; }
.v2-edd__option-details > summary { cursor: pointer; padding: 6px 0; font-size: 0.86667rem; font-weight: 600; color: var(--navy); }
.v2-edd__option-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding-top: 4px; }
.v2-edd__lab { display: flex; flex-direction: column; gap: 5px; }
.v2-edd__exact-toggle { align-self: flex-start; min-height: 40px; font-size: 0.86667rem; }
.v2-edd__exact { display: flex; flex-direction: column; gap: 10px; }

/* Results -------------------------------------------------------------- */
.v2-edd__results { display: flex; flex-direction: column; gap: 10px; }
.v2-edd__headline { margin: 0; font-size: 1rem; color: var(--ink-strong); }
.v2-edd__group {
  margin: 6px 0 0;
  font-size: 0.73333rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
}
.v2-edd__rows { display: flex; flex-direction: column; gap: 8px; }
.v2-edd__row {
  border: 1px solid var(--hairline);
  border-left-width: 3px;
  border-radius: 12px;
  padding: 12px 14px;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.v2-edd__row.is-held { background: var(--paper-soft); }
.v2-edd__row--earns { border-left-color: var(--pace-on-track); }
.v2-edd__row--elite_only,
.v2-edd__row--award_only { border-left-color: var(--pace-on-track); }
.v2-edd__row--range { border-left-color: var(--pace-amber); }
.v2-edd__row--ask { border-left-color: var(--pace-amber); background: var(--pace-amber-paper); }
.v2-edd__row--earns_nothing { border-left-color: var(--hairline-strong); color: var(--ink-muted); }
.v2-edd__row--not_covered { border-left-color: var(--hairline-strong); border-style: dashed; }
.v2-edd__row-head { display: flex; align-items: center; gap: 8px; }
.v2-edd__logo {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--navy-50);
  color: var(--navy);
  font-size: 0.73333rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.v2-edd__name { font-weight: 600; color: var(--ink-strong); }
.v2-edd__verdict {
  margin-left: auto;
  font-size: 0.73333rem;
  color: var(--ink-muted);
  white-space: nowrap;
}
.v2-edd__tier {
  margin-left: 0;
  font-size: 0.73333rem;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--orange-soft);
  color: var(--ink-strong);
}
.v2-edd__fig { display: flex; gap: 10px; align-items: baseline; font-variant-numeric: tabular-nums; color: var(--ink-strong); }
.v2-edd__fig-l { font-size: 0.73333rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-muted); min-width: 84px; }
.v2-edd__line { margin: 0; font-size: 0.86667rem; color: var(--ink); line-height: 1.45; }
.v2-edd__gap { display: flex; flex-direction: column; gap: 4px; }
.v2-edd__gap-bar { height: 6px; border-radius: 999px; background: var(--hairline); overflow: hidden; }
.v2-edd__gap-fill { height: 100%; background: var(--pace-on-track); transition: width 320ms var(--ease-out); }
.v2-edd__gap-text { font-size: 0.8rem; color: var(--ink-muted); }
.v2-edd__companion { font-size: 0.86667rem; color: var(--ink-strong); display: flex; flex-direction: column; gap: 2px; }
.v2-edd__companion small { color: var(--ink-muted); font-size: 0.73333rem; }
.v2-edd__asks { display: flex; flex-wrap: wrap; gap: 6px; }
.v2-edd__ask {
  border: 1px solid var(--pace-amber);
  background: var(--paper);
  color: var(--ink-strong);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.8rem;
  cursor: pointer;
}
.v2-edd__ask:hover,
.v2-edd__ask:focus-visible { background: var(--pace-amber-paper); }
.v2-edd__notes { margin: 0; padding-left: 18px; font-size: 0.8rem; color: var(--ink-muted); line-height: 1.45; }
.v2-edd__foot { font-size: 0.73333rem; color: var(--ink-muted); display: flex; flex-wrap: wrap; gap: 6px; }
.v2-edd__foot a { color: var(--navy); }
/* Report and coverage are buttons (they POST), styled as the footer links. */
.v2-edd__link { background: none; border: 0; padding: 0; font: inherit; color: var(--navy); text-decoration: underline; cursor: pointer; }
.v2-edd__link[disabled] { color: var(--ink-faint); cursor: default; }
.v2-edd__pick { display: flex; align-items: center; gap: 8px; font-size: 0.86667rem; color: var(--ink-strong); margin-top: 2px; }
.v2-edd__pick input[disabled] + * { color: var(--ink-faint); }
.v2-edd__gate { display: flex; flex-direction: column; gap: 8px; }
.v2-edd__gate-count { margin: 0; font-size: 0.86667rem; color: var(--ink-strong); }

/* The verdict is one sentence in the trip overlay's lede style, over the
   ranking. Empty slots collapse, so nothing shows before a comparison. */
.v2-edd__decision {
  margin: 0;
  font-family: 'Bricolage Grotesque', 'Public Sans', system-ui, sans-serif;
  font-size: 1.2rem;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--ink-strong);
}
.v2-edd__decision b,
.v2-edd__decision strong { font-weight: 600; }
.v2-edd__booked,
.v2-edd__stale { margin: 0; font-size: 0.8rem; line-height: 1.45; color: var(--ink-muted); }
.v2-edd__decision:empty,
.v2-edd__booked:empty,
.v2-edd__stale:empty,
.v2-edd__ranking:empty { display: none; }
.v2-edd__rank-act,
.v2-edd__stale [data-mm-qualifying-update] {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--navy);
  text-decoration: underline;
  cursor: pointer;
}
.v2-edd__rank-act { font-size: 0.86667rem; align-self: flex-start; }
/* A ranking row's asks sit beside its other actions, in the same look: the wrapper drops out of the layout. */
.v2-edd__rank-acts .v2-edd__asks { display: contents; }
/* An ask no box in the drawer can answer is a note, not a control. */
.v2-edd__ask-note { font-size: 0.86667rem; color: var(--ink-muted); align-self: flex-start; }
/* The row is a plain container; the radio inside it (rank, title, detail) is what is focused and checked, and the
   action buttons sit under it, indented past the rank. */
.v2-edd__ranking .v2-edd__row { flex-direction: column; align-items: stretch; gap: 4px; cursor: pointer; }
.v2-edd__ranking .v2-edd__row:hover:not(.is-selected) { border-color: var(--hairline-strong); }
.v2-edd__rank-main { display: flex; align-items: flex-start; gap: 10px; border-radius: 8px; }
.v2-edd__rank-acts { display: flex; flex-wrap: wrap; gap: 2px 14px; padding-left: 28px; }
.v2-edd__row.is-selected { border-color: var(--navy-300); border-left-color: var(--orange); background: var(--paper-soft); }
.v2-edd__rank-n { flex: 0 0 18px; color: var(--ink-faint); font-weight: 600; font-variant-numeric: tabular-nums; }
.v2-edd__rank-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.v2-edd__rank-title { font-weight: 600; color: var(--ink-strong); }
.v2-edd__rank-detail { font-size: 0.86667rem; color: var(--ink-muted); line-height: 1.45; }

/* Drawer foot: the log button stays reachable on the bottom sheet ------ */
.v2-drawer--earn-decision .v2-drawer__foot {
  position: sticky;
  bottom: 0;
  background: var(--paper);
  border-top: 1px solid var(--hairline);
}
.v2-drawer--earn-decision .v2-drawer__foot .actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.v2-drawer--earn-decision .v2-drawer__foot .info { font-size: 0.8rem; color: var(--ink-muted); margin-bottom: 8px; }

/* Posting rows --------------------------------------------------------- */
.v2-pcr { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.v2-pcr__row {
  border: 1px solid var(--hairline);
  border-left: 3px solid var(--pace-amber);
  border-radius: 12px;
  padding: 10px 12px;
  background: var(--paper-soft);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.v2-pcr__row.is-done { border-left-color: var(--pace-on-track); }
.v2-pcr__q { margin: 0; font-size: 0.86667rem; color: var(--ink-strong); line-height: 1.45; }
.v2-pcr__actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.v2-pcr__done { font-size: 0.86667rem; color: var(--pace-on-track); font-weight: 600; }
.v2-pcr__short { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.v2-pcr__short .v2-field { min-width: 140px; }
.v2-pcr__claim { font-size: 0.8rem; color: var(--ink-muted); }
.v2-pcr__claim a { color: var(--navy); font-weight: 600; }

/* Phone ---------------------------------------------------------------- */
@media (max-width: 767px) {
  .v2-edd__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v2-edd__fare-grid { grid-template-columns: 1fr; }
  .v2-edd__route-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v2-edd__route-grid .v2-field:last-child { grid-column: 1 / -1; }
  .v2-edd__option-grid { grid-template-columns: 1fr; }
  .v2-edd__chip-add { max-width: none; }
  .v2-edd__decision { font-size: 1.1rem; }
  .v2-edd__fig { flex-direction: column; gap: 2px; }
  .v2-edd__fig-l { min-width: 0; }
  .v2-edd__verdict { margin-left: 0; white-space: normal; }
  .v2-edd__row-head { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  .v2-edd__gap-fill { transition: none; }
}
