/* Results: destination banner + months tile, filter tile, segmented sort, date strip, flight cards. */

.results-page { padding-top: var(--space-8); }

/* What the "Ask" box understood, shown above the results. */
.ask-note { display: flex; align-items: center; gap: var(--space-3); width: fit-content; max-width: 100%; margin-bottom: var(--space-3); padding: 6px var(--space-5) 6px 6px; border-radius: var(--r-pill); background: var(--tile); }
.ask-note p { font-size: var(--fs-sm); font-weight: 500; }

/* ---------- Banner row: photo tile (8) + cheapest months (4) ---------- */

.results-head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--bento-gap); margin-bottom: var(--space-6); }
.results-head > * { grid-column: span 8; min-width: 0; }
.results-head > .rh-months { grid-column: span 4; }
.results-head > :only-child { grid-column: 1 / -1; }

.rh-banner { min-height: 320px; color: #fff; }
.rh-country { position: absolute; z-index: 2; top: 20px; left: 20px; }
.rh-body { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; display: grid; justify-items: start; gap: var(--space-2); padding: 28px; }
.rh-title { font-size: var(--fs-h1); font-weight: 500; line-height: 1.1; letter-spacing: -0.03em; }
/* Glass behind the title keeps it readable on any photo. */
.rh-banner .rh-title { max-width: 100%; padding: 6px 20px 8px; border-radius: var(--r-card); background: rgb(17 17 19 / 0.55); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.rh-facts { max-width: 100%; }

.rh-plain { align-self: end; padding: var(--space-4) 0 var(--space-2); }
.rh-sub { margin-top: var(--space-2); color: var(--ink-2); }

.rh-months { display: flex; flex-direction: column; gap: var(--space-4); }
.rh-months-title { font-size: var(--fs-lg); font-weight: 500; letter-spacing: -0.01em; }
.rh-months .months-chart { flex: 1; min-height: 190px; }

/* ---------- Layout: filters (3) + results (9) ---------- */

.results-layout { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--bento-gap); align-items: start; }
.results-main { display: grid; grid-column: span 9; grid-template-columns: minmax(0, 1fr); gap: var(--space-4); min-width: 0; }

/* ---------- Filters ---------- */

.filters {
  position: sticky;
  top: var(--space-6);
  grid-column: span 3;
  display: grid;
  max-height: calc(100vh - 2 * var(--space-6));
  overflow-y: auto;
  padding: var(--space-6);
  border-radius: var(--r-tile);
  background: var(--tile);
  scrollbar-width: thin;
}
.filters-head { display: flex; align-items: center; gap: var(--space-3); padding-bottom: var(--space-4); }
.filters-head h2 { margin-right: auto; font-size: var(--fs-lg); font-weight: 500; }
.filters-close { display: none; }
.fg { display: grid; gap: var(--space-1); padding: var(--space-4) 0; border-top: 1px solid var(--line); }
.fg-title { margin-bottom: var(--space-1); font-size: var(--fs-sm); font-weight: 600; }
.fg-sub { display: grid; }
.fg-sub + .fg-sub { margin-top: var(--space-3); }
.fg-subtitle { color: var(--ink-3); font-size: var(--fs-xs); }
.range { width: 100%; accent-color: var(--black); }
.range-value { font-weight: 600; font-variant-numeric: tabular-nums; }
.range-ends { display: flex; justify-content: space-between; color: var(--ink-3); font-size: var(--fs-xs); }
.sheet-backdrop { position: fixed; z-index: 84; inset: 0; background: rgb(17 17 19 / 0.4); animation: fade-in var(--t-base) var(--ease); }
@keyframes fade-in { from { opacity: 0; } }

/* ---------- Toolbar: segmented sort + count ---------- */

.results-toolbar { display: flex; align-items: center; gap: var(--space-3); min-width: 0; }
/* On the canvas the track needs a little more tone than --sunk. */
.sort-tabs.segmented { flex: 0 1 auto; min-width: 0; background: var(--line); }
.sort-tab { display: inline-flex; align-items: center; gap: 6px; }
.st-value { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.sort-tab[aria-selected='true'] .st-value { color: var(--ink-2); }
.results-count { margin-left: auto; color: var(--ink-3); font-size: var(--fs-sm); white-space: nowrap; }
.filters-toggle { display: none; flex: none; background: var(--tile); }
.filters-toggle .icon { width: 16px; height: 16px; }

/* ---------- Date strip ---------- */

.strip-wrap { display: flex; align-items: center; gap: var(--space-2); min-width: 0; }
.strip { position: relative; display: flex; flex: 1; gap: var(--space-2); min-width: 0; overflow-x: auto; scrollbar-width: none; }
.strip::-webkit-scrollbar { display: none; }
.strip-nav { flex: none; }
.strip-day {
  display: grid;
  align-content: center;
  flex: 0 0 auto;
  min-width: 104px;
  height: 56px;
  padding: 0 var(--space-4);
  border: 0;
  border-radius: 16px;
  background: var(--tile);
  text-align: left;
  transition: background-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.strip-day:hover:not(:disabled) { box-shadow: inset 0 0 0 1px var(--ink-4); }
.strip-day:focus-visible { outline-offset: -2px; }
.strip-day:disabled { opacity: 0.45; }
.sd-day { color: var(--ink-3); font-size: var(--fs-xs); line-height: 1.3; }
.sd-price { font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.3; }
.strip-day.is-cheapest .sd-price { color: var(--cheap); }
.strip-day.is-selected { background: var(--black); }
.strip-day.is-selected .sd-day,
.strip-day.is-selected .sd-price { color: #fff; }

.calendar-toggle { margin-top: var(--space-3); }
.calendar-toggle > summary { width: fit-content; cursor: pointer; list-style: none; }
.calendar-toggle > summary::-webkit-details-marker { display: none; }
.calendar-toggle[open] > summary .orb .icon { transform: rotate(90deg); }
.calendar-panel { margin-top: var(--space-3); }

/* ---------- Flight cards ---------- */

.result-list { display: grid; gap: var(--bento-gap); }
.rc { display: grid; grid-template-columns: minmax(0, 1fr) 13.5rem; border-radius: var(--r-tile); background: var(--tile); }
.rc-legs { display: grid; gap: var(--space-5); padding: var(--space-6) 28px; }
.leg { display: grid; grid-template-columns: 12rem 4.75rem minmax(6rem, 1fr) 4.75rem; align-items: center; gap: var(--space-4); }
.leg-airline { display: flex; align-items: center; gap: var(--space-3); min-width: 0; }
.al-badge { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--sunk); font-size: var(--fs-xs); font-weight: 600; }
.leg-meta { display: grid; min-width: 0; line-height: 1.3; }
.leg-meta strong { font-size: var(--fs-sm); font-weight: 500; }
.leg-meta span { overflow: hidden; color: var(--ink-3); font-size: var(--fs-xs); white-space: nowrap; text-overflow: ellipsis; }
.leg-point { display: grid; line-height: 1.15; }
.leg-point strong { font-size: var(--fs-xl); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.leg-point strong sup { margin-left: 2px; color: var(--high); font-size: 0.6rem; }
.leg-point span { color: var(--ink-3); font-size: var(--fs-sm); }
.leg-point.is-end { text-align: right; }
.leg-path { display: grid; justify-items: center; gap: 2px; color: var(--ink-3); font-size: var(--fs-xs); }
.leg-line { position: relative; display: grid; place-items: center; width: 100%; height: 16px; }
.leg-line::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px dashed var(--ink-4); }
.leg-plane { position: relative; box-sizing: content-box; width: 14px; height: 14px; padding: 0 3px; background: var(--tile); color: var(--ink-2); transform: rotate(45deg); }
.leg-stops { color: var(--ink-2); }

.rc-side { display: grid; align-content: center; gap: 2px; padding: var(--space-6); border-left: 1px solid var(--line); }
.rc-tags { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin-bottom: var(--space-2); }
.rc-price { font-size: var(--fs-price); font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.05; letter-spacing: -0.02em; }
.rc-meta { color: var(--ink-2); font-size: var(--fs-sm); }
.rc-side .btn-select { margin-top: var(--space-3); }

.results-more { display: grid; justify-items: center; margin-top: var(--space-2); }
.btn-more span { color: var(--ink-3); }

.empty { display: grid; justify-items: center; gap: var(--space-3); padding: var(--space-12) var(--space-6); text-align: center; }
.empty h3 { font-size: var(--fs-xl); font-weight: 500; letter-spacing: -0.015em; }
.empty p { color: var(--ink-2); }
.empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-2); margin-top: var(--space-2); }
