/* The first search row stays compact. Fare families are revealed only after
   Select, and the choices intentionally scroll horizontally rather than wrap. */
.passenger-price { display: inline-flex; flex-direction: column; gap: 5px; cursor: help; }
.flight .fare .passenger-price { display: inline-flex; margin: 0; color: inherit; }
.passenger-price > small { font-size: 11px; font-weight: 400; color: #65758c; }
.fare-family-price .passenger-price > strong { display: block; font-size: 20px; font-weight: 750; color: #0866ff; }
.passenger-price:focus-visible { outline: 2px solid #087cff; outline-offset: 4px; border-radius: 4px; }
.passenger-price-tooltip { display: none; }
.passenger-price-popover { position: fixed; z-index: 10000; width: min(340px, calc(100vw - 16px)); padding: 16px; border: 1px solid #d5deeb; border-radius: 14px; background: #fff; color: #172b4d; box-shadow: 0 12px 36px #10213c30; pointer-events: none; font-size: 12px; }
.passenger-price-popover[hidden] { display: none; }
.passenger-price-line { display: flex; justify-content: space-between; gap: 14px; padding: 5px 0; }
.passenger-price-line:last-child { border-top: 1px solid #d5deeb; margin-top: 8px; }
.fare-price-pending { font-size: 12px; color: #65758c; }
.fare-family-choice:disabled { opacity: .65; cursor: not-allowed; }
html[data-theme="dark"] .passenger-price-popover { background: #20242d; color: #edf3ff; border-color: #454d5c; }
html[data-theme="dark"] .passenger-price > small, html[data-theme="dark"] .fare-price-pending { color: #afbdd4; }
html[data-theme="dark"] .fare-family-price .passenger-price > strong { color: #85baff; }
.fare-carousel {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 22px 56px;
  background: #f6f8fc;
}

.fare-choice-grid {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 2px;
  width: 100%;
  scrollbar-width: thin;
}

.fare-family-choice {
  flex: 0 0 min(290px, 84vw);
  min-height: 300px;
  scroll-snap-align: start;
  position: relative;
}

.fare-choice-item {
  flex: 0 0 min(290px, 84vw);
  scroll-snap-align: start;
  display: grid;
  justify-items: start;
  gap: 3px;
}

.fare-choice-item .fare-family-choice {
  width: 100%;
  min-height: 300px;
}

.fare-choice-item .fare-rule-details { padding: 5px 2px; font-size: 12px; }
.shared-fare-actions { display: flex; gap: 14px; padding: 5px 2px; }
.shared-fare-actions .text-btn { padding: 4px 0; font-size: 12px; }

.fare-family-top {
  min-height: 28px;
}

.fare-radio {
  width: 21px;
  height: 21px;
  border: 2px solid #8793a8;
  border-radius: 50%;
  display: inline-block;
}

.fare-family-choice.recommended .fare-radio {
  border-color: #2362e9;
  box-shadow: inset 0 0 0 4px #fff;
  background: #2362e9;
}

.fare-recommended {
  align-self: flex-start;
  margin-top: 9px;
  padding: 4px 7px;
  border-radius: 4px;
  color: #fff;
  background: #03899c;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}

.fare-scroll {
  z-index: 1;
  flex: 0 0 39px;
  width: 39px;
  height: 39px;
  border: 1px solid #dce4ef;
  border-radius: 50%;
  background: #fff;
  color: #173965;
  box-shadow: 0 3px 10px #152c5820;
  cursor: pointer;
  font-size: 32px;
  line-height: 25px;
}

.fare-scroll:hover { border-color: #2461df; color: #2461df; }

.fare-family-price > span { max-width: 120px; line-height: 1.25; }
.fare-choice-screen > header { display: block; }
.fare-selected-flights { display: grid; grid-template-columns: minmax(0, 1fr); gap: 9px; margin-top: 16px; }
.fare-selection-card { margin-top: 0; background: #fff; }
.fare-selection-card .fare-selection-carrier strong { font-size: 13px; }
.fare-selection-card .fare-selection-carrier span { display: block; margin-top: 5px; color: #6e7f97; font-size: 11px; }
.fare-selection-card .fare-selection-carrier span b { color: #2259d3; font-weight: 800; }
.fare-selection-route strong { display: block; color: #19355f; font-size: 12px; }
.fare-selection-route span { display: block; margin-top: 4px; color: #68758c; font-size: 11px; }
.fare-selection-route small { display: block; margin-top: 3px; color: #2357ba; font-size: 11px; font-weight: 700; }
.fare-selected-flight { display: grid; grid-template-columns: 92px minmax(150px, 1fr) minmax(205px, 1.25fr) minmax(120px, .7fr); align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid #dce5f1; border-radius: 8px; background: #fafcff; }
.fare-selected-label { align-self: start; padding: 4px 7px; border-radius: 4px; background: #2863e8; color: #fff; font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.fare-selected-carrier { display: flex; min-width: 0; align-items: center; gap: 8px; }
.fare-selected-carrier > i { display: grid; flex: 0 0 28px; width: 28px; height: 28px; place-items: center; overflow: hidden; border-radius: 50%; background: #eef4ff; color: #2460e2; font-style: normal; }
.fare-selected-carrier img { width: 22px; max-height: 22px; object-fit: contain; }
.fare-selected-carrier b, .fare-selected-carrier small, .fare-selected-route b, .fare-selected-route small, .fare-selected-duration b, .fare-selected-duration small { display: block; }
.fare-selected-carrier b, .fare-selected-route b { color: #19355f; font-size: 12px; }
.fare-selected-carrier small, .fare-selected-route small, .fare-selected-duration small { margin-top: 3px; color: #71819a; font-size: 10px; line-height: 1.25; }
.fare-selected-duration { color: #2760dc; text-align: center; font-size: 10px; }
.fare-selected-duration i { display: block; position: relative; height: 1px; margin: 6px 0; background: #a9bfeb; }
.fare-selected-duration i::after { content: '›'; position: absolute; right: -1px; top: -9px; color: #2760dc; font-size: 16px; font-style: normal; }
.fare-choice-screen > footer.fare-choice-footer { align-items: flex-start; }
.fare-choice-footer > div { width: min(500px, 100%); }
.fare-choice-footer > .primary { align-self: center; white-space: nowrap; }
.fare-price-breakdown { display: grid; gap: 0; width: min(480px, 100%); margin-top: 10px; overflow: hidden; border: 1px solid #dce5f0; border-radius: 8px; background: #fafcff; }
.fare-breakdown-title { padding: 8px 11px; color: #71819a; font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.fare-breakdown-row, .fare-breakdown-total { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 9px 11px; border-top: 1px solid #e3e9f1; color: #233a5b; font-size: 12px; }
.fare-breakdown-row small { display: block; margin-top: 3px; color: #718099; font-size: 11px; font-weight: 500; }
.fare-breakdown-row > b { color: #183f91; white-space: nowrap; }
.fare-breakdown-group { padding: 9px 11px; border-top: 1px solid #e3e9f1; }
.fare-breakdown-group .fare-breakdown-row { padding: 3px 0; border-top: 0; align-items: baseline; gap: 12px; }
.fare-breakdown-detail { color: #61728c; font-weight: 400; }
.fare-breakdown-detail > span:last-child { white-space: nowrap; text-align: right; }
.fare-breakdown-row.pending > b { color: #6f7d92; font-size: 11px; font-weight: 600; }
.fare-breakdown-total { background: #f2f6fd; font-weight: 800; }
.fare-breakdown-total b { color: #1960e6; }

.bound-fare-picker { border-top: 1px solid #e2e8f1; }
.bound-fare-picker > header { padding: 18px 24px 0; }
.bound-fare-picker > header h2 { margin: 3px 0; color: #173661; }
.bound-fare-picker > header p:last-child { margin: 0; color: #6d7d95; font-size: 12px; }
.round-fare-choice > footer { align-items: center; }
.fare-rule-modal { padding: 26px; position: relative; max-width: 680px; }
.fare-rule-modal h2 { margin: 5px 0 10px; font-size: 20px; }
.fare-rule-block { margin: 16px 0; border: 1px solid #e0e7f1; border-radius: 8px; overflow: hidden; }
.fare-rule-block h3 { margin: 0; padding: 11px 13px; background: #f3f6fb; color: #1b385f; font-size: 13px; }
.fare-rule-block div { display: flex; justify-content: space-between; gap: 18px; padding: 9px 13px; border-top: 1px solid #edf1f6; color: #63728a; font-size: 12px; }
.fare-rule-block strong { color: #173762; white-space: nowrap; }
.fare-details-dialog { width: min(1180px, calc(100vw - 36px)); max-width: 1180px; max-height: calc(100dvh - 36px); overflow: auto; overscroll-behavior: contain; }
.fare-details-dialog .round-fare-modal { width: 100%; max-width: none; max-height: none; overflow: visible; }
.round-fare-modal::after { content: ''; display: block; height: 2px; }
.fare-detail-tabs { display: flex; gap: 2px; border-bottom: 1px solid #dce4ef; margin: 20px -26px 20px; padding: 0 26px; }
.fare-detail-tabs button { border: 0; border-bottom: 2px solid transparent; background: transparent; padding: 10px 13px; color: #536987; cursor: pointer; font-weight: 700; }
.fare-detail-tabs button.active { color: #1c5ee8; border-bottom-color: #1c5ee8; }
.fare-policy-direction, .baggage-detail-direction { border: 1px solid #dce5f0; border-radius: 9px; overflow: hidden; margin: 15px 0; }
.fare-policy-direction > h3, .baggage-detail-direction > h3 { margin: 0; padding: 11px 14px; background: #f4f7fb; color: #193b68; font-size: 14px; }
.fare-policy-direction > h3 span, .baggage-detail-direction > h3 span { display: inline-block; margin-right: 8px; padding: 3px 7px; border-radius: 4px; background: #2863e8; color: #fff; font-size: 11px; text-transform: uppercase; }
.fare-policy-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.fare-policy-table th { padding: 9px 12px; color: #233f68; text-align: left; background: #fafbfd; }
.fare-policy-table td { padding: 10px 12px; border-top: 1px solid #e2e8f0; color: #556a86; }
.fare-policy-table th + th, .fare-policy-table td + td { border-left: 1px solid #e2e8f0; }
.fare-policy-table tr.current-rule td { color: #075de7; background: #eef4ff; font-weight: 600; }
.policy-title { margin: 25px 0 6px; color: #162f54; font-size: 16px; }
.policy-title small { margin-left: 5px; color: #6d7d95; font-size: 12px; font-weight: 500; }
.baggage-detail-row { display: grid; grid-template-columns: 170px 1fr; gap: 12px; padding: 12px 14px; border-top: 1px solid #e5ebf3; }
.baggage-detail-row p { margin: 0; color: #526986; line-height: 1.55; }
.baggage-detail-direction small { display: block; padding: 0 14px 13px; color: #6d7d95; }
.baggage-allowance-item { display: grid; grid-template-columns: 48px 1fr; gap: 12px; padding: 15px 16px 0; }
.baggage-allowance-item > i { display: grid; place-items: start center; color: #1d62e8; font-size: 28px; font-style: normal; line-height: 1; filter: saturate(.8); }
.baggage-allowance-item strong { color: #162e52; font-size: 14px; }
.baggage-allowance-item p { margin: 4px 0 0; color: #526986; line-height: 1.5; }
.baggage-detail-direction .baggage-dimension-note { padding: 14px 16px; }

@media (max-width: 620px) {
  .fare-carousel { padding: 14px 10px; gap: 6px; }
  .fare-scroll { flex-basis: 32px; width: 32px; height: 32px; font-size: 27px; }
  .fare-family-choice, .fare-choice-item { flex-basis: min(270px, calc(100vw - 95px)); }
  .baggage-detail-row { grid-template-columns: 1fr; gap: 4px; }
  .fare-detail-tabs { margin-left: -16px; margin-right: -16px; padding: 0 16px; overflow-x: auto; }
  .fare-choice-screen > footer.fare-choice-footer { align-items: stretch; }
  .fare-choice-footer > .primary { align-self: stretch; }
  .fare-selected-flight { grid-template-columns: auto 1fr 1fr; }
  .fare-selected-route { grid-column: 2 / -1; }
  .fare-selected-duration { display: none; }
  .fare-selection-card .selection-main { grid-template-columns: 1fr; gap: 8px; }
}
