/* =============================================================
   TourOps — flights results page styles
   ============================================================= */

/* ── skeleton loader — flight-card variants (base .skel primitives live in web.css) ── */
.skel-chip { width: 74px; height: 20px; border-radius: 999px; }
.skel-logo { width: 40px; height: 40px; border-radius: 8px; flex-shrink: 0; }
.skel-btn { width: 100%; height: 38px; border-radius: var(--r-md); }

.skel-card { cursor: default; pointer-events: none; }
.skel-card:hover { border-color: var(--line-soft); box-shadow: none; }
.skel-leg + .skel-leg { margin-top: 6px; }


/* ── layout ── */
.results-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 24px;
  align-items: start;
}
@media (max-width: 1199.98px) { .results-layout { grid-template-columns: 1fr; } }

/* ── flight card ── */
.flight-card {
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  padding: 18px 20px;
  margin-bottom: 12px;
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 20px;
  cursor: pointer;
  transition: border-color .2s, box-shadow .2s;
}
.flight-card:hover { border-color: var(--ink); box-shadow: var(--shadow-md); }
.flight-card.is-selected { border-color: var(--coral); box-shadow: 0 0 0 3px rgba(255,106,77,0.12); }

.fc-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }
.fc-rating {
  display: inline-flex; align-items: center; gap: 3px;
  margin-left: auto;
  font-family: var(--ff-mono, monospace);
  font-size: 11px; color: var(--muted, #8a8a8a);
  letter-spacing: .04em;
}
.fc-rating .bi { font-size: 10px; color: var(--sand, #c9a961); }

.fc-leg {
  display: grid;
  grid-template-columns: 150px 80px 1fr 80px;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
}
.fc-leg + .fc-leg { margin-top: 2px; }
.fc-leg:first-of-type { padding-top: 0; }
.fc-leg:last-of-type { padding-bottom: 0; }

.fc-leg-airline { display: flex; align-items: center; gap: 10px; min-width: 0; }
.fc-airline-logo {
  width: 40px; height: 40px; border-radius: 8px;
  background: transparent;
  display: inline-flex; align-items: center; justify-content: center;
  overflow: hidden; flex-shrink: 0;
  color: var(--muted);
}
.fc-airline-logo img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.fc-airline-logo.is-fallback {
  background: var(--cream-2);
  font-family: var(--ff-mono); font-size: 12px; font-weight: 500; color: var(--ink);
  letter-spacing: .04em;
}
.fc-leg-airline-txt { min-width: 0; }
.fc-leg-airline-txt .name {
  font-family: var(--ff-display); font-size: 13.5px; font-weight: 500; color: var(--ink);
  line-height: 1.2;
  overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.fc-leg-airline-txt .sub {
  font-family: var(--ff-mono); font-size: 10px; color: var(--muted);
  letter-spacing: .04em; margin-top: 2px;
}

/* Preview-drawer keeps using .airline-mark for the airline strip bubble */
.airline-mark {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--cream-2); border: 1px solid var(--line);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--ff-mono); font-size: 11px; font-weight: 500; color: var(--ink);
}

.time-block .t {
  font-family: var(--ff-display); font-size: 18px; font-weight: 600; line-height: 1;
}
.time-block .city {
  font-family: var(--ff-mono); font-size: 11px; letter-spacing: .12em; color: var(--muted); text-transform: uppercase; margin-top: 2px;
}

.route-line { position: relative; }
.route-line .line {
  height: 2px; background: var(--line); border-radius: 999px; position: relative;
}
.route-line .dur {
  font-family: var(--ff-mono); font-size: 10.5px; color: var(--muted); letter-spacing: .04em;
  margin-top: 6px; text-align: center;
}
.stops-dot {
  position: absolute; top: 50%; transform: translate(-50%, -50%);
  width: 8px; height: 8px; border-radius: 999px;
  background: var(--coral); border: 2px solid #fff;
}
.stops { color: var(--coral); }
.stops.direct { color: var(--mint); }

.fc-side {
  border-left: 1px solid var(--line-soft);
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}
.fc-side .price {
  font-family: var(--ff-display); font-size: 26px; font-weight: 600; letter-spacing: -.02em;
  color: var(--ink);
}
.fc-side .pp { font-family: var(--ff-mono); font-size: 10.5px; color: var(--muted); letter-spacing: .04em; }
.fc-side .refund-info {
  margin-top: 8px;
  font-size: 11px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  line-height: 1;
}
.fc-side .refund-info i { font-size: 12px; }
.fc-side .refund-info.is-refundable { color: #2f7d5b; background: rgba(47, 125, 91, .1); }
.fc-side .refund-info.is-nonrefundable { color: var(--muted); background: rgba(0, 0, 0, .04); }
.fc-side .select-btn { border-radius: var(--r-md); }

@media (max-width: 767.98px) {
  .flight-card { grid-template-columns: 1fr; }
  .fc-side { border-left: 0; border-top: 1px solid var(--line-soft); padding-left: 0; padding-top: 14px; flex-direction: row; align-items: center; }
  .fc-leg { grid-template-columns: 1fr 80px 1fr; grid-template-areas: "airline airline airline" "dep route arr"; row-gap: 8px; }
  .fc-leg-airline { grid-area: airline; padding-bottom: 6px; }
}

/* ── preview drawer — flight content ── */
.pd-airline-strip {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 0; border-bottom: 1px solid var(--line-soft);
  margin-bottom: 4px;
}

/* Airline logo bubble — shared between .pd-airline-strip (56px) and .pd-leg summary (36px) */
.pd-airline-logo {
  width: 52px; height: 44px; border-radius: 8px;
  background: transparent;
  display: inline-flex; align-items: center; justify-content: center;
  overflow: hidden; flex-shrink: 0;
  color: var(--muted);
}
.pd-airline-logo img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.pd-airline-logo.is-fallback {
  background: var(--cream-2);
  font-family: var(--ff-mono); font-size: 12px; font-weight: 500; color: var(--ink); letter-spacing: .04em;
}
.pd-airline-logo--sm { width: 40px; height: 36px; }
.pd-airline-logo--sm.is-fallback { font-size: 11px; }

.pd-segment {
  display: grid; grid-template-columns: 80px 1fr 80px;
  align-items: center; gap: 16px;
  background: var(--cream); border-radius: var(--r-md); padding: 16px;
  margin-bottom: 8px;
}
.pd-segment .tm { font-family: var(--ff-display); font-size: 22px; font-weight: 600; }
.pd-segment .ap { font-family: var(--ff-mono); font-size: 10.5px; color: var(--muted); margin-top: 3px; letter-spacing: .08em; text-transform: uppercase; }
.pd-segment .ln { position: relative; height: 2px; background: var(--line); }
.pd-segment .ln .end-dot { position: absolute; width: 8px; height: 8px; border-radius: 999px; background: var(--ink); top: 50%; transform: translateY(-50%); }
.pd-segment .ln .end-dot.l { left: -4px; }
.pd-segment .ln .end-dot.r { right: -4px; }
.pd-segment .ln .ln-icon { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: var(--cream); padding: 0 6px; color: var(--ink); font-size: 14px; }
.pd-segment .duration { font-family: var(--ff-mono); font-size: 10.5px; color: var(--muted); text-align: center; margin-top: 8px; letter-spacing: .04em; }

.pd-totals .row-l { display: flex; justify-content: space-between; font-size: 13.5px; padding: 5px 0; }
.pd-totals .row-l.total { font-weight: 600; font-family: var(--ff-display); font-size: 16px; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px; }

/* ── preview drawer — expandable leg ── */
.pd-leg { border: 1px solid var(--line-soft); border-radius: var(--r-md); margin-bottom: 10px; overflow: hidden; background: #fff; }
.pd-leg[open] { box-shadow: var(--shadow-sm); }

.pd-leg summary { list-style: none; cursor: pointer; padding: 12px 14px; display: grid; grid-template-columns: 40px 1fr auto 20px; gap: 12px; align-items: center; }
.pd-leg summary::-webkit-details-marker { display: none; }

.pd-leg-title { font-family: var(--ff-mono); font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.pd-leg-route { font-family: var(--ff-display); font-size: 15px; font-weight: 500; margin-top: 2px; }
.pd-leg-route .arrow { color: var(--muted); margin: 0 6px; font-size: 12px; }
.pd-leg-airline { font-size: 12px; color: var(--ink); margin-top: 3px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pd-leg-partners { font-family: var(--ff-mono); font-size: 10px; letter-spacing: .04em; padding: 1px 6px; border-radius: 999px; background: var(--cream-2); border: 1px solid var(--line); color: var(--muted); }
.pd-leg-meta { font-family: var(--ff-mono); font-size: 10.5px; color: var(--muted); text-align: right; letter-spacing: .04em; }
.pd-leg-meta .stops { color: var(--ink); }
.pd-leg-meta .stops.direct { color: var(--mint-strong, #2f7d5c); }
.pd-leg-chev { color: var(--muted); font-size: 14px; transition: transform .18s ease; text-align: right; }
.pd-leg[open] .pd-leg-chev { transform: rotate(180deg); }

.pd-leg-body { padding: 4px 14px 14px; border-top: 1px dashed var(--line); }

/* Slimmer segment card when nested inside a leg body */
.pd-leg-body .pd-segment { background: var(--cream); margin-top: 12px; margin-bottom: 0; }

.pd-seg-meta { display: grid; grid-template-columns: 120px 1fr; column-gap: 12px; row-gap: 0; margin: 10px 0 0; padding: 4px 0 0; border-top: 1px dashed var(--line); }
.pd-seg-meta dt, .pd-seg-meta dd { padding: 6px 0; margin: 0; font-size: 12.5px; border-top: 1px dashed var(--line); }
.pd-seg-meta dt:first-of-type, .pd-seg-meta dd:first-of-type { border-top: 0; }
.pd-seg-meta dt { color: var(--muted); font-family: var(--ff-mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; align-self: center; }
.pd-seg-meta dt i { font-size: 12px; margin-right: 6px; opacity: .8; }
.pd-seg-meta dd { color: var(--ink); }
.pd-seg-meta dd.mono { font-family: var(--ff-mono); font-size: 12px; letter-spacing: .04em; }
.pd-seg-meta dd .muted { color: var(--muted); font-size: 11.5px; }

.pd-seg-warn { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 8px 12px; background: #fff8ea; border: 1px solid #f0d8a1; border-radius: var(--r-sm, 8px); color: #8a5b00; font-size: 12.5px; }
.pd-seg-warn i { font-size: 14px; }

@media (max-width: 480px) {
  .pd-seg-meta { grid-template-columns: 100px 1fr; }
}

.pd-sectors { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.pd-sectors-title { font-family: var(--ff-mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.pd-sector-row { display: grid; grid-template-columns: 46px 1fr auto; gap: 10px; align-items: center; padding: 6px 0; font-size: 12.5px; }
.pd-sector-row + .pd-sector-row { border-top: 1px dashed var(--line); }
.pd-sector-row .tm { font-family: var(--ff-mono); font-weight: 600; font-size: 12px; letter-spacing: .04em; }
.pd-sector-row .route { display: flex; gap: 6px; align-items: center; }
.pd-sector-row .route .ap { font-family: var(--ff-mono); font-size: 11px; color: var(--muted); letter-spacing: .06em; }
.pd-sector-row .route .arrow { color: var(--muted); font-size: 11px; }
.pd-sector-row .meta { font-family: var(--ff-mono); font-size: 10.5px; color: var(--muted); letter-spacing: .04em; }

.pd-layover { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 0; font-family: var(--ff-mono); font-size: 11px; letter-spacing: .06em; color: var(--muted); }
.pd-layover .dots { flex: 1; border-top: 1px dashed var(--line); }

/* ── hotel recommendations strip ── */
.hotel-rec-card {
  background: #fff; border: 1px solid var(--line-soft); border-radius: var(--r-lg);
  overflow: hidden; transition: box-shadow .2s;
}
.hotel-rec-card:hover { box-shadow: var(--shadow-md); }
.hotel-rec-card .img { aspect-ratio: 16/9; background-size: cover; background-position: center; }
.hotel-rec-card .body { padding: 14px; }
.hotel-rec-card h5 { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.hotel-rec-card .loc { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.hotel-rec-card .stars { color: var(--sand); font-size: 12px; margin-bottom: 8px; }
.hotel-rec-card .rate { display: flex; justify-content: space-between; align-items: center; }
.hotel-rec-card .price { font-family: var(--ff-display); font-size: 17px; font-weight: 600; }
.hotel-rec-card .price small { font-size: 11px; color: var(--muted); font-weight: 400; }

/* ── "Show all results" — reveals the full list when the shortlisted subset is on ── */
.flight-showmore { display: flex; justify-content: center; margin: 28px 0 8px; }
.flight-showmore-btn {
  border-radius: 999px;
  padding: 10px 24px;
  font-size: 13.5px; font-weight: 500;
  display: inline-flex; align-items: center;
  transition: transform .15s ease, box-shadow .15s ease;
}
.flight-showmore-btn:hover:not([disabled]) { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.flight-showmore-btn.is-loading { opacity: .7; cursor: wait; }
