/* Jet2 consumer search — shared styles.
 *
 * Design tokens are taken from the approved mockups (jet2-mockup-desktop.html),
 * not invented here. The three brand-overridable ones are --primary, --secondary
 * and --accent; everything else is chrome that stays constant so an agent's
 * colours change the identity without breaking legibility.
 *
 * Every colour an agent can set is a CSS custom property. Nothing hard-codes
 * the default navy — if it did, that rule would silently ignore the agent's
 * brand and look like "branding is broken" only on their site. */

:root {
  --primary:    #0b3a53;   /* agent-overridable — header, search band */
  --secondary:  #14506f;   /* agent-overridable — the 4-star band, secondary fills */
  --accent:     #c9922e;   /* agent-overridable — CTAs, prices, logo accent */
  --accent-ink: #1a1300;   /* text ON accent; not brandable, must stay readable */

  --ink:    #15202b;
  --muted:  #5c6b7a;
  --line:   #dfe5ea;
  --bg:     #f4f6f8;
  --white:  #fff;
  --ok:     #1f7a4d;
  --warn:   #8a5a00;
  --warnbg: #fdf5e3;
  --r: 10px;

  --font-heading: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body:    system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

/* No margin on body: in an iframe a body margin becomes a permanent white
   gutter the agent cannot style away, and it inflates our reported height. */
html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .logo { font-family: var(--font-heading); }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }

/* ── agent header ─────────────────────────────────────────────────────────── */
.agent { background: var(--primary); color: var(--white); }
.agent .wrap { display: flex; align-items: center; justify-content: space-between; padding-block: 14px; }
.logo { font-size: 20px; font-weight: 600; letter-spacing: .2px; }
.logo span { color: var(--accent); }
.tel { text-align: right; font-size: 17px; font-weight: 600; line-height: 1.15; }
.tel small { display: block; font-size: 11px; font-weight: 400; opacity: .75; }

/* ── search band ──────────────────────────────────────────────────────────── */
.searchbar { background: var(--primary); border-top: 1px solid rgba(255,255,255,.12); padding-block: 14px 18px; }
.fields { display: grid; grid-template-columns: 1.4fr 1.2fr 1.2fr .7fr auto; gap: 10px; align-items: end; }
.field label { display: block; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: rgba(255,255,255,.72); margin-bottom: 5px; }
.field label .opt { text-transform: none; letter-spacing: 0; opacity: .7; }
.field select, .field input {
  width: 100%; padding: 11px 12px; border: 1px solid var(--line);
  border-radius: 8px; font: inherit; font-size: 15px; background: var(--white); color: var(--ink);
}
.btn {
  border: 0; border-radius: 8px; padding: 12px 22px; font: inherit; font-weight: 600;
  background: var(--accent); color: var(--accent-ink); cursor: pointer; font-size: 15px;
}
.btn:hover { filter: brightness(.95); }
.btn-ghost { background: var(--white); color: var(--ink); border: 1px solid var(--line); }

/* ── the 4-star standard band ─────────────────────────────────────────────── */
/* Stated as a positive. A filter that removes 60% of the catalogue reads as
   thin inventory unless the standard is named — see brief §5h. */
.standard { background: var(--secondary); color: var(--white); font-size: 13px; }
.standard .wrap { display: flex; gap: 10px; align-items: center; padding-block: 9px; flex-wrap: wrap; }
.standard .stars { color: var(--accent); letter-spacing: 1px; }
.standard b { font-weight: 600; }
.standard span { opacity: .85; }

/* ── page furniture ───────────────────────────────────────────────────────── */
.page { padding-block: 22px 40px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
h1 { font-size: 26px; margin: 0 0 4px; }
.sub { color: var(--muted); font-size: 14px; margin: 0; }

.panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; }

/* ── empty states ─────────────────────────────────────────────────────────── */
/* Three distinct states, never one. On a consumer site a wrong "no holidays
   found" is a lost customer — see brief §6. */
.empty { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 34px 22px; text-align: center; }
.empty h3 { margin: 0 0 8px; font-size: 18px; }
.empty p { margin: 0 auto; max-width: 44ch; color: var(--muted); font-size: 14px; line-height: 1.5; }
.empty .btn { margin-top: 16px; }

/* ── price honesty ────────────────────────────────────────────────────────── */
.captured { font-size: 12px; color: var(--muted); }
.captured.stale { color: var(--warn); font-weight: 600; }
/* Tourist tax is NOT in the headline price. Restated as an all-in total, which
   is the competitor pattern the brief calls better than bare disclosure. */
.taxline { background: var(--warnbg); color: var(--warn); font-size: 12.5px; padding: 8px 14px; border-top: 1px solid var(--line); }

.skeleton { background: linear-gradient(90deg,#eceff2 25%,#f5f7f9 37%,#eceff2 63%); background-size: 400% 100%; animation: sk 1.4s ease infinite; border-radius: 8px; }
@keyframes sk { 0% { background-position: 100% 50% } 100% { background-position: 0 50% } }

/* ── footer ───────────────────────────────────────────────────────────────── */
.foot { color: var(--muted); font-size: 12px; padding-block: 18px 6px; line-height: 1.6; }

/* ── mobile ───────────────────────────────────────────────────────────────── */
/* Per the mobile mockup: four search fields collapse to one summary line that
   opens a sheet. Phase 1 ships the collapsed layout; the sheet arrives with
   the real search in phase 3. */
@media (max-width: 760px) {
  .fields { grid-template-columns: 1fr; gap: 8px; }
  .agent .wrap { padding-block: 11px; }
  .logo { font-size: 17px; }
  .tel { font-size: 14px; }
  .tel small { display: none; }
  h1 { font-size: 21px; }
  .page { padding-block: 16px 28px; }
  .btn { width: 100%; }
}

/* ── departure date picker ───────────────────────────────────────────────────
   Three states, and they must stay visually distinct:
     .j2c-on   available  — solid, selectable, carries a price
     .j2c-off  not sold   — greyed, NOT a button, only inside the probed window
     .j2c-unk  not known  — selectable and UNSTYLED, so it reads as "no claim"
   The unknown state deliberately looks like a plain cell rather than a
   half-disabled one: anything resembling grey would be read as "unavailable",
   which is the assertion we are not entitled to make. */

.j2c { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; }
.j2c-bar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.j2c-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.j2c-seg button { border: 0; background: var(--white); font: inherit; font-size: 13px; padding: 6px 14px; cursor: pointer; color: var(--muted); }
.j2c-seg button.on { background: var(--primary); color: #fff; }
.j2c-seg button[disabled] { opacity: .45; cursor: not-allowed; }
.j2c-horizon { font-size: 12.5px; color: var(--muted); flex: 1; min-width: 180px; }

/* 330px min is derived, not chosen: seven columns must clear the 46px cell
   floor the picker falls back at (7 x 46 = 322px, plus gaps). At 260px each
   month produced 30px cells, so a wide desktop panel silently rendered as a
   list — the fallback firing correctly on a layout that should never have
   triggered it. */
/* min(330px, 100%) rather than a bare 330px: a bare minimum OVERFLOWS a
   narrower container instead of shrinking, which made a 330px panel render a
   330px grid of squeezed cells while measuring as if it had room. */
.j2c-months { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(330px, 100%), 1fr)); }
.j2c-mh { font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.j2c-dow { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; margin-bottom: 3px; }
.j2c-dow span { text-align: center; font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.j2c-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.j2c-pad { aspect-ratio: 1 / .82; }

.j2c-cell {
  aspect-ratio: 1 / .82; border: 1px solid transparent; border-radius: 6px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font: inherit; line-height: 1.05; padding: 0; background: none; cursor: pointer;
}
.j2c-d { font-size: 12px; }
.j2c-p { font-size: 10.5px; font-weight: 600; }

.j2c-on  { background: color-mix(in srgb, var(--accent) 16%, #fff); border-color: color-mix(in srgb, var(--accent) 45%, #fff); color: var(--ink); }
.j2c-on:hover { background: color-mix(in srgb, var(--accent) 28%, #fff); }
.j2c-on .j2c-p { color: var(--warn); }
.j2c-unk { background: var(--white); border-color: var(--line); color: var(--ink); }
.j2c-unk:hover { border-color: var(--muted); }
.j2c-off { background: #f1f3f5; color: #b6bec6; cursor: default; }

.j2c-key { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 12px; font-size: 12px; color: var(--muted); }
.j2c-key i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; vertical-align: -1px; margin-right: 5px; border: 1px solid var(--line); }
.j2c-key .k-on  { background: color-mix(in srgb, var(--accent) 16%, #fff); border-color: color-mix(in srgb, var(--accent) 45%, #fff); }
.j2c-key .k-off { background: #f1f3f5; }
.j2c-key .k-unk { background: var(--white); }

/* list fallback */
.j2c-pattern { font-size: 13px; color: var(--ink); background: var(--bg); border-radius: 6px; padding: 8px 10px; margin: 0 0 10px; }
.j2c-lmon { font-size: 13px; font-weight: 600; padding: 10px 0 4px; }
.j2c-row { display: flex; width: 100%; justify-content: space-between; align-items: center; gap: 10px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--white);
  padding: 9px 12px; margin-bottom: 5px; font: inherit; cursor: pointer; text-align: left; }
.j2c-row.j2c-on { border-color: color-mix(in srgb, var(--accent) 45%, #fff); }
.j2c-rd { font-size: 13.5px; }
.j2c-rp { font-size: 14px; font-weight: 600; }
.j2c-rp em { font-style: normal; font-weight: 400; font-size: 13px; color: var(--muted); }
.j2c-none { font-size: 13px; color: var(--muted); margin: 6px 0 0; }

/* ── results ─────────────────────────────────────────────────────────────── */
.results-head { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; flex-wrap:wrap; margin-bottom:14px; }
.results-layout { display:grid; grid-template-columns:250px 1fr; gap:18px; align-items:start; }
@media (max-width: 860px) { .results-layout { grid-template-columns:1fr; } }

.facets { background:var(--white); border:1px solid var(--line); border-radius:var(--r); padding:14px; }
.facet + .facet { margin-top:16px; padding-top:14px; border-top:1px solid var(--line); }
.facet h4 { margin:0 0 8px; font-size:13.5px; }
.facet label { display:flex; align-items:center; gap:8px; font-size:13.5px; padding:3px 0; cursor:pointer; }
.facet label .n { margin-left:auto; color:var(--muted); font-size:12.5px; }

.hcards { display:grid; gap:14px; }
.hcard { display:grid; grid-template-columns:190px 1fr 210px; background:var(--white);
  border:1px solid var(--line); border-radius:var(--r); overflow:hidden; }
.hcard__img { width:100%; height:100%; min-height:150px; object-fit:cover; display:block; }
.hcard__img--none { background:#ececed; }
/* An orphan carries Jet2's own imagery, which is thinner. Marked quietly —
   the price is just as real. */
.hcard--thin .hcard__img--none { background:repeating-linear-gradient(45deg,#ececed,#ececed 8px,#e4e4e6 8px,#e4e4e6 16px); }
.hcard__body { padding:14px 16px; }
.hcard__body h3 { margin:0 0 3px; font-size:17px; }
.hcard__crumb { color:var(--muted); font-size:12.5px; margin-bottom:4px; }
.hcard__stars { color:var(--accent); font-size:13px; letter-spacing:1px; }
.hcard__desc { font-size:13.5px; color:#3d4a56; margin:7px 0; line-height:1.45; }
.chips { display:flex; flex-wrap:wrap; gap:5px; margin-top:6px; }
.chip { font-size:11.5px; background:var(--bg); border:1px solid var(--line); border-radius:20px; padding:2px 9px; color:#3d4a56; }
.hcard__airline { font-size:12px; color:var(--muted); margin-top:6px; }
.muted { color:var(--muted); font-weight:400; }

.hcard__price { padding:14px 16px; border-left:1px solid var(--line); display:flex;
  flex-direction:column; align-items:flex-end; justify-content:center; gap:2px; text-align:right; }
.hcard__price .from { font-size:12px; color:var(--muted); }
.hcard__price .amount { font-size:26px; font-weight:700; line-height:1; }
.hcard__price .pp { font-size:12px; color:var(--muted); }
.hcard__prov, .hcard__dates { font-size:12px; color:var(--muted); }
.hcard__dates { color:var(--ok); }
.hcard__nocache { font-size:14px; font-weight:600; color:var(--muted); }
.hcard__price .btn { margin-top:8px; }
.hcard .taxline { grid-column:1 / -1; }

@media (max-width: 720px) {
  .hcard { grid-template-columns:1fr; }
  .hcard__img { height:170px; min-height:0; }
  .hcard__price { border-left:0; border-top:1px solid var(--line); align-items:stretch; text-align:left; }
}

/* Mobile: a sticky pill row that opens a bottom sheet, per the mobile mockup. */
.pillbar { display:none; }
@media (max-width: 860px) {
  .facets { display:none; }
  .facets.open { display:block; position:fixed; inset:auto 0 0 0; z-index:50; max-height:78vh;
    overflow:auto; border-radius:14px 14px 0 0; box-shadow:0 -8px 40px rgba(0,0,0,.25); }
  .pillbar { display:flex; gap:8px; overflow-x:auto; padding:8px 0; position:sticky; top:0; z-index:20;
    background:var(--bg); -webkit-overflow-scrolling:touch; }
  .pill { flex:0 0 auto; border:1px solid var(--line); background:var(--white); border-radius:20px;
    padding:7px 14px; font:inherit; font-size:13.5px; cursor:pointer; }
  .pill.on { background:var(--primary); color:#fff; border-color:var(--primary); }
  .sheet-close { display:block; width:100%; margin-top:12px; }
}

.cheaper { background:var(--white); border:1px dashed var(--line); border-radius:var(--r);
  padding:14px 16px; margin-top:14px; font-size:13.5px; display:flex; gap:12px;
  align-items:center; flex-wrap:wrap; }
.cheaper .btn { margin-left:auto; }

/* ── hotel page ──────────────────────────────────────────────────────────── */
.hotel__img { width:100%; max-height:300px; object-fit:cover; border-radius:var(--r); }
.hotel h1 { margin:14px 0 2px; }
.hotel__crumb { color:var(--muted); font-size:13px; }
.hotel__desc { max-width:62ch; font-size:14.5px; line-height:1.55; }
.note { font-size:13px; color:var(--muted); background:var(--bg); border-radius:6px; padding:8px 10px; max-width:62ch; }
.ksp { columns:2; max-width:52ch; font-size:13.5px; color:#3d4a56; }
@media (max-width:640px){ .ksp { columns:1; } }

.apbar { display:flex; gap:8px; flex-wrap:wrap; margin:10px 0; }
.ap { border:1px solid var(--line); background:var(--white); border-radius:8px; padding:8px 14px;
  font:inherit; font-size:14px; cursor:pointer; }
.ap.on { background:var(--primary); color:#fff; border-color:var(--primary); }
.ap__p { opacity:.8; font-size:12.5px; margin-left:4px; }
.cheapest { background:color-mix(in srgb, var(--accent) 12%, #fff);
  border:1px solid color-mix(in srgb, var(--accent) 40%, #fff);
  border-radius:8px; padding:9px 12px; font-size:14px; margin-bottom:12px; }
.cheapest__l { color:var(--muted); font-size:12.5px; }

/* ── seasonality (§5i) ────────────────────────────────────────────────────
   Three states, and they must not look interchangeable. "Not flying" is a
   statement of fact and reads calm and factual; "still checking" must never
   borrow its styling, or an unknown starts looking like a no. */
.seas{border-radius:12px;padding:18px 20px;margin:0 0 20px}
.seas h3{margin:0 0 6px;font-size:19px;line-height:1.3}
.seas__fact{margin:0;font-size:15px;color:#334155}
.seas--closed{background:#f1f5f9;border:1px solid #cbd5e1}
.seas--thin{background:#fffbeb;border:1px solid #fde68a}
.seas--ok{background:transparent;border:0;padding:0 0 4px}
.seas__oklead{margin:0;font-size:14px;color:#475569}
.seas__thinlead{margin:0 0 6px;font-size:15px;color:#78350f}
.seas__thinask{margin:0 0 12px;font-size:14px;color:#92400e}
.seas__altlead{margin:14px 0 8px;font-size:14px;color:#475569}
.seas__chips{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:14px}
.seas__chip{background:#fff;border:1px solid #cbd5e1;border-radius:999px;
  padding:8px 14px;font:inherit;font-size:14px;cursor:pointer}
.seas__chip:hover{border-color:#0f172a}
.seas__chipp{color:#0f766e;font-weight:600}
.seas__none{margin:12px 0;font-size:14px;color:#475569}

/* Month strip on the hotel calendar. */
.mstrip{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 8px}
.mstrip__m{min-width:52px;padding:8px 10px;border:1px solid #cbd5e1;background:#fff;
  border-radius:8px;font:inherit;font-size:13px;cursor:pointer}
.mstrip__m.is-unknown{border-style:dashed;color:#64748b}
.mstrip__m.is-closed{background:#e2e8f0;color:#94a3b8;cursor:not-allowed;
  text-decoration:line-through;border-color:#cbd5e1}
.mstrip__key{margin:0 0 16px;font-size:12px;color:#64748b}
.mkey{display:inline-block;width:10px;height:10px;border-radius:2px;
  vertical-align:middle;margin-right:3px;border:1px solid #cbd5e1}
.mkey--ok{background:#fff}
.mkey--closed{background:#e2e8f0}
.mkey--unknown{background:#fff;border-style:dashed}
