/* Empty legs share the aircraft card's photo, title and amenity hierarchy. */
.empty-leg-card.result-card {
  border-radius: 12px;
}
.empty-leg-card.result-card:where(:not(.is-selected, .is-unavailable)) {
  border-color: var(--line);
  box-shadow: 0 3px 12px #101b2603;
}
.empty-leg-card.result-card.is-selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
.empty-leg-card.result-card .empty-leg-photo {
  aspect-ratio: 1.8;
  max-height: 200px;
  background: #e6edf2;
}
.empty-leg-card.result-card .empty-leg-body { padding: 20px; }
.empty-leg-card.result-card .result-card-category { margin-bottom: 9px; }
.empty-leg-card.result-card .empty-leg-body > h2 {
  font-size: 26px;
  font-weight: 600;
  line-height: 1.2;
  min-height: 0;
  margin: 0 0 12px;
  letter-spacing: -.035em;
}
.empty-leg-card.result-card .result-inclusions {
  padding-block: 12px;
  margin: 0 0 14px;
  gap: 9px;
}
.empty-leg-card.result-card .result-inclusions .amenity-item { padding: 0; gap: 3px; }
.empty-leg-card.result-card .result-inclusions .amenity-item svg { width: 20px; height: 20px; margin: 0 auto 6px; }
.empty-leg-card.result-card .result-inclusions .amenity-item strong { font-size: 11px; line-height: 1.5; font-weight: 600; }
.empty-leg-card.result-card .result-inclusions .amenity-item span { font-size: 9px; line-height: 1.5; }
.result-card .result-sector-times.flight-itinerary > ol { margin: 0 0 14px; }
.result-card .flight-itinerary { container-type: inline-size; }
/* The date leads the sector, followed by two stops and their local clocks. */
.result-sector-times.flight-itinerary > ol > li {
  padding: 0;
  border: 1px solid #cddbe4;
  border-radius: 10px;
  overflow: hidden;
  background: #fcfdfe;
}
.result-sector-times.flight-itinerary .sector-time-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-transform: none;
  text-align: left;
  margin: 0;
  padding: 7px 12px;
  gap: 8px;
  background: #edf3f7;
  border-bottom: 1px solid #cddbe4;
}
.flight-itinerary .sector-time-heading .flight-leg-date {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #24465c;
  font-weight: 650;
  font-size: 14px;
  line-height: 1.3;
  letter-spacing: -.02em;
  text-transform: none;
}
.flight-leg-date svg { width: 15px; height: 15px; color: #57768b; }
.flight-itinerary .sector-time-heading .flight-leg-label {
  padding: 0;
  border: 0;
  background: transparent;
  color: #526d80;
  font-size: 10px;
  line-height: 1.4;
  letter-spacing: .07em;
  text-transform: uppercase;
  font-weight: 650;
  white-space: nowrap;
}
.flight-leg-journey {
  display: grid;
  grid-template-columns: minmax(0, 1fr) min(22%, 80px) minmax(0, 1fr);
  gap: 3px 7px;
  padding: 9px 12px 10px;
}
.flight-leg-endpoint {
  display: grid;
  grid-row: 1 / span 3;
  grid-template-rows: subgrid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  justify-items: start;
  align-items: center;
  text-align: left;
}
.flight-leg-endpoint.is-origin { grid-column: 1; }
.flight-leg-endpoint.is-destination { grid-column: 3; justify-items: end; text-align: right; }
.flight-itinerary .flight-leg-endpoint .sector-clock-label {
  color: #536f82;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: .08em;
}
.flight-leg-airport {
  color: #182f40;
  font-size: 16px;
  font-weight: 650;
  line-height: 1.18;
  letter-spacing: -.025em;
  overflow-wrap: anywhere;
}
.flight-leg-local-time {
  align-self: start;
  max-width: 100%;
  overflow-wrap: anywhere;
  color: #24465c;
  font-size: 19px;
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -.025em;
  font-variant-numeric: tabular-nums;
}
.flight-leg-local-time .sector-timezone, .flight-leg-arrival-day, .flight-leg-local-time.is-pending {
  color: #536b7d;
  font-size: 11px;
  line-height: 1.3;
  font-weight: 500;
  letter-spacing: 0;
}
.flight-leg-local-time .sector-timezone { font-size: 10px; }
.flight-leg-arrival-day { display: block; }
.flight-leg-journey > .sector-flight-center {
  display: grid;
  grid-column: 2;
  grid-row: 1 / span 3;
  grid-template-rows: subgrid;
  justify-items: center;
  align-items: center;
  row-gap: inherit;
}
.flight-itinerary .flight-leg-journey .sector-flight-center > b { grid-row: 1; color: #345569; font-size: 12px; line-height: 1.2; }
.flight-itinerary .flight-leg-journey .sector-flight-center .sector-flight-path { grid-row: 2; gap: 3px; height: 20px; color: #42677d; }
.flight-leg-journey .sector-flight-path::before, .flight-leg-journey .sector-flight-path::after {
  content: '';
  position: static;
  height: 0;
  flex: 1;
  border-top: 1px dashed #9bb0c0;
}
.flight-itinerary .flight-leg-journey .sector-flight-center .sector-flight-path svg { flex: none; width: 19px; height: 19px; padding: 1px; background: transparent; }
.flight-itinerary .flight-leg-journey .sector-flight-center .sector-distance { grid-row: 3; align-self: start; padding-top: 3px; color: #526d80; font-size: 11px; line-height: 1.3; }
@media (max-width: 600px) and (orientation: portrait) {
  .result-sector-times.flight-itinerary > ol { gap: 6px; }
  .result-sector-times.flight-itinerary .sector-time-heading { padding-block: 3px; }
  .flight-itinerary .flight-leg-journey { padding-block: 5px; row-gap: 1px; }
}
/* A card can be narrower inside a carousel than on the catalogue page. */
@container (max-width: 235px) {
  .flight-itinerary .flight-leg-journey {
    grid-template-columns: minmax(0, 1fr) 18% minmax(0, 1fr);
    column-gap: 3px;
    padding-inline: 6px;
  }
}
/* A charter quote, an aircraft promotion and an empty leg use the same fare panel. */
.result-card .offer-price-panel {
  container-type: inline-size;
  margin: 0 0 12px;
  padding: 11px 13px;
}
.result-card .offer-price-panel .offer-price-row {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  align-items: start;
  gap: 8px;
}
.result-card .offer-price-panel .offer-price-original { min-width: 0; text-align: left; }
.result-card .offer-price-panel .offer-price-current { min-width: 0; text-align: right; }
.result-card .offer-price-panel .offer-price-row > div > span {
  display: block;
  color: #516b7d;
  font-size: 10px;
  line-height: 14px;
  font-weight: 600;
}
.result-card .offer-price-panel .price-saving,
.result-card .offer-price-panel .fare-charter-detail {
  display: grid;
  justify-content: start;
  justify-items: start;
  gap: 3px;
  margin: 3px 0 0;
  text-align: left;
}
.result-card .offer-price-panel .price-saving del,
.result-card .offer-price-panel .fare-charter-detail strong {
  color: #4b6373;
  font-size: clamp(15px, 6.5cqi, 20px);
  font-weight: 550;
  line-height: 1.2;
  letter-spacing: -.035em;
  font-variant-numeric: tabular-nums;
}
.result-card .offer-price-panel .price-saving > span,
.result-card .offer-price-panel .fare-charter-detail small {
  background: none;
  border: 0;
  padding: 0;
  color: #526b7c;
  font-size: 10px;
  font-weight: 500;
  line-height: 14px;
  letter-spacing: 0;
}
.result-card .offer-price-panel .offer-price-current .result-price {
  color: #1c3b50;
  margin: 3px 0 0;
  font-size: clamp(20px, 10cqi, 32px);
  line-height: 1.08;
  white-space: normal;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}
.result-card.is-unavailable .offer-price-panel .offer-price-current .result-price { color: #657783; }
.result-card .offer-price-panel.has-saving .offer-price-current .result-price { color: #167045; }
.result-card .offer-price-panel .offer-price-current .result-price.is-unpriced { font-size: 16px; }
.result-card .offer-price-panel .offer-price-current .result-price > small {
  display: block;
  margin: 3px 0 0;
  color: #526b7c;
  font-size: 10px;
  line-height: 14px;
}
.result-card .offer-price-panel .result-price-note {
  margin: 7px 0 0;
  padding-top: 6px;
  border-top: 1px solid #cddbe3;
  color: #526b7c;
  font-size: 10px;
  line-height: 14px;
  text-align: left;
}
@media (max-width: 760px) and (orientation: portrait) {
  /* Share three rows so the labels, amounts and savings read across the card. */
  .result-card .offer-price-panel.has-saving .offer-price-row {
    grid-template-rows: auto auto auto;
    row-gap: 3px;
    align-items: stretch;
  }
  .result-card .offer-price-panel.has-saving :is(.offer-price-original, .offer-price-current) {
    display: grid;
    grid-row: 1 / span 3;
    grid-template-rows: subgrid;
  }
  .result-card .offer-price-panel.has-saving .offer-price-row > div > span { font-size: 11px; }
  .result-card .offer-price-panel.has-saving :is(.price-saving, .result-price) {
    display: grid;
    grid-row: 2 / span 2;
    grid-template-rows: subgrid;
    justify-content: stretch;
    align-items: end;
    margin: 0;
  }
  .result-card .offer-price-panel.has-saving .price-saving del {
    font-size: clamp(18px, 8.6cqi, 28px);
    overflow-wrap: anywhere;
  }
  .result-card .offer-price-panel.has-saving .result-price > small { margin: 0; }
}
.empty-leg-card.result-card .empty-leg-body > .button {
  min-height: 48px;
  padding: 13px 17px;
  font-size: 13px;
  font-weight: 700;
}
.empty-leg-card.result-card .empty-leg-body > .button:not(:disabled) {
  box-shadow: 0 4px 12px #17384f24;
}
.empty-leg-card.result-card .empty-leg-body>.button svg{width:18px;height:18px}
/* Savings and departure are the photo's primary labels; sold stays unmistakable. */
.empty-leg-card.result-card .empty-leg-offer-badges{top:11px;right:11px;bottom:auto;left:auto;z-index:2;display:grid;align-items:stretch;gap:4px;min-width:112px;max-width:calc(100% - 22px)}
.empty-leg-card.result-card .empty-leg-offer-badges .empty-leg-special{display:flex;align-items:center;justify-content:center;gap:7px;min-height:34px;padding:5px 9px;font-size:14px;font-weight:800;line-height:1.35;letter-spacing:.01em;color:#fff;background:linear-gradient(125deg,#125b42,#1a7555);border:1px solid #0f5a40;border-radius:8px;box-shadow:0 3px 10px #123b302b}
.empty-leg-card.result-card .empty-leg-countdown{display:flex;align-items:center;justify-content:center;gap:7px;min-height:34px;padding:5px 9px;font-size:12px;font-weight:700;line-height:1.4;letter-spacing:0;color:#21455b;background:#fffffff7;border:1px solid #d4e2eb;border-radius:8px;box-shadow:0 3px 10px #102b3c20}
.empty-leg-card.result-card .empty-leg-offer-badges .offer-badge-icon{width:15px;height:15px;flex:0 0 15px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.empty-leg-card.result-card .empty-leg-special .offer-badge-icon{color:#e1faec}
.empty-leg-card.result-card .empty-leg-countdown .offer-badge-icon{color:#54778c}
.empty-leg-card.result-card .empty-leg-offer-badges>span>span{white-space:nowrap}
.empty-leg-card.result-card .result-photo-status{top:11px;left:11px;right:auto;max-width:calc(100% - 145px);font-size:10px;line-height:1.35;white-space:normal}
.result-card .flight-status-ribbon{position:absolute;z-index:3;top:25px;left:-45px;display:block;width:185px;padding:7px 15px;transform:rotate(-35deg);text-align:center;background:#aa2937;color:#fff;border-block:1px solid #ffffff6b;box-shadow:0 3px 10px #4f142d35;font-size:15px;font-weight:800;line-height:1.35;letter-spacing:.15em;pointer-events:none}
@media(max-width:760px){
 .empty-leg-card.result-card .empty-leg-offer-badges{top:10px;right:10px;gap:4px;min-width:108px}
 .empty-leg-card.result-card .empty-leg-offer-badges .empty-leg-special{min-height:32px;font-size:13px;padding:5px 9px}
 .empty-leg-card.result-card .empty-leg-countdown{min-height:32px;font-size:12px;padding:5px 9px}
 .empty-leg-card.result-card .result-photo-status{top:10px;left:10px;max-width:calc(100% - 137px)}
 .empty-leg-card.result-card .empty-leg-body { padding: 18px; }
 .empty-leg-card.result-card .empty-leg-body > h2 { font-size: 24px; line-height: 1.25; margin-bottom: 16px; }
 .empty-leg-card.result-card .result-inclusions { padding-block: 9px; margin-bottom: 12px; column-gap: 0; }
 .empty-leg-card.result-card .result-inclusions .amenity-item strong { line-height: 1.45; }
 .empty-leg-card.result-card .result-inclusions .amenity-item + .amenity-item {
   border-inline-start: 1px solid #dce5eb;
   border-radius: 0;
 }
 .result-card .result-sector-times.flight-itinerary > ol { margin-bottom: 12px; }
}
@media(max-width:360px){
 .flight-leg-journey{column-gap:4px;padding-inline:9px}
 .flight-leg-airport{font-size:15px}
 .result-sector-times.flight-itinerary .sector-time-heading{padding-inline:9px}
 .result-card .flight-status-ribbon{width:165px;left:-43px;top:23px;font-size:13px}
 .empty-leg-card.result-card .empty-leg-body { padding: 15px; }
 .empty-leg-card.result-card .empty-leg-body > h2 { font-size: 22px; }
 .empty-leg-card.result-card .result-inclusions .amenity-item strong { font-size: 10px; }
}

/* Lead phone cards with the aircraft name immediately below the photograph. */
@media (max-width: 600px) and (orientation: portrait) {
  .result-card .result-card-body > .result-card-category { display: none; }
  .results-grid .result-card-body,
  .empty-leg-card.result-card .empty-leg-body { padding-top: 11px; }
  .results-grid .result-card-body > h3,
  .empty-leg-card.result-card .empty-leg-body > h2 { margin-block: 0 10px; }
}

/* Mobile aircraft photographs keep their full composition, including wide in-flight shots. */
@media (max-width: 760px), (max-width: 980px) and (max-height: 500px) and (orientation: landscape) {
  .results-grid .result-card-image,
  .empty-leg-card.result-card .empty-leg-photo {
    aspect-ratio: 3 / 2;
    max-height: none;
  }
  .results-grid .result-photo-trigger > img,
  .empty-leg-card.result-card .empty-leg-photo > img {
    object-fit: contain;
    object-position: center;
  }
  .results-grid .result-photo-trigger:hover > img { transform: none; }
}
@media (max-width: 760px) {
  :is(body[data-page="aircraft"], .aircraft-dialog) .aircraft-gallery .profile-photo {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "caption controls" "photo photo";
    align-items: center;
    height: auto;
    aspect-ratio: auto;
    background: #f0f5f8;
    overflow: hidden;
  }
  :is(body[data-page="aircraft"], .aircraft-dialog) .aircraft-gallery .profile-photo > img {
    grid-area: photo;
    display: block;
    width: 100%;
    height: auto;
    max-height: 68svh;
    object-fit: contain;
  }
  :is(body[data-page="aircraft"], .aircraft-dialog) .aircraft-gallery .profile-photo-caption {
    grid-area: caption;
    display: block;
    position: static;
    padding: 8px 12px;
    margin: 0;
    min-width: 0;
    background: transparent;
    backdrop-filter: none;
    color: #395468;
    font-size: 12px;
    line-height: 1.3;
    font-weight: 600;
  }
  :is(body[data-page="aircraft"], .aircraft-dialog) .aircraft-gallery .gallery-navigation {
    grid-area: controls;
    position: static;
    padding: 0 3px;
    gap: 0;
    border: 0;
    box-shadow: none;
    background: transparent;
    backdrop-filter: none;
  }
  :is(body[data-page="aircraft"], .aircraft-dialog) .aircraft-gallery .gallery-navigation button {
    width: 44px;
    height: 44px;
    min-width: 44px;
  }
}
@media (min-width: 761px) and (max-width: 980px) and (max-height: 500px) and (orientation: landscape) {
  body[data-page="aircraft"] .aircraft-profile .profile-photo > img,
  .aircraft-dialog .profile-photo img { object-fit: contain; }
}

/* Upright phones use a shallow strip; only the known fleet photos are cropped. */
@media (max-width: 600px) and (orientation: portrait) {
  .results-grid .result-card-image,
  .empty-leg-card.result-card .empty-leg-photo { aspect-ratio: 11 / 5; }

  :is(.result-card-image, .profile-photo) img:is(
    [src*="/static/website/assets/da62.webp"], [src*="/static/website/assets/da62-cabin.webp"],
    [src*="/static/website/assets/mustang.webp"], [src*="/static/website/assets/mustang-cabin.jpg"],
    [src*="/static/website/assets/mustang-front.webp"], [src*="/static/website/assets/cj3.jpg"],
    [src*="/static/website/assets/cj3-cabin.jpg"], [src*="/static/website/assets/baron.jpg"],
    [src*="/static/website/assets/baron-cabin.jpg"], [src*="/static/website/assets/hero-"],
    [src*="/static/website/assets/new-flights/"]
  ) { --aircraft-phone-fit: cover; }
  :is(.result-card-image, .profile-photo) img[src*="/assets/da62.webp"] { --aircraft-phone-focus: 60%; }
  :is(.result-card-image, .profile-photo) img[src*="/assets/cj3.jpg"] { --aircraft-phone-focus: 48%; }
  .results-grid .result-photo-trigger > img,
  .empty-leg-card.result-card .empty-leg-photo > img,
  :is(body[data-page="aircraft"], .aircraft-dialog) .aircraft-gallery .profile-photo > img {
    object-fit: var(--aircraft-phone-fit, contain);
    object-position: 50% var(--aircraft-phone-focus, 54%);
  }
  :is(body[data-page="aircraft"], .aircraft-dialog) .aircraft-gallery .profile-photo {
    container-type: inline-size;
  }
  :is(body[data-page="aircraft"], .aircraft-dialog) .aircraft-gallery .profile-photo > img {
    max-height: min(68svh, 45.45cqi);
  }
  :is(body[data-page="aircraft"], .aircraft-dialog) .aircraft-gallery .profile-photo > img[src*="/assets/hero-11.jpg"] {
    max-height: min(68svh, 53cqi);
    object-position: 50% 79%;
  }
}
