/* ---------- Results page ---------- */
.results-page { min-height: 100vh; background: #f5f6f8; }

.trip-bar { background: #191919; color: #fff; }
.trip-bar-inner {
  width: min(1300px, calc(100% - 36px));
  min-height: 58px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 13px;
}
.trip-back { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: #fff; }
.trip-back:hover { background: #ffffff20; }
.trip-bus-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #e85d04; }
.trip-bar-text { display: flex; flex-direction: column; gap: 3px; }
.trip-bar-text strong { font-size: 14px; letter-spacing: .2px; }
.trip-bar-text span { color: #c9c9c9; font-size: 11px; }

.results-wrap { width: min(1300px, calc(100% - 36px)); margin: 24px auto 48px; }
.filters { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.modify-btn, .filter-btn {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 14px;
  border: 1px solid #e3e5e8;
  border-radius: 8px;
  background: #fff;
  color: #282828;
  font: 600 12px/1 Lato, Inter, sans-serif;
  white-space: nowrap;
}
.modify-btn { border-color: #e85d04; background: #e85d04; color: #fff; }
.modify-btn:hover { background: #b84600; }
.filter { position: relative; }
.filter-btn { cursor: pointer; }
.filter-btn:hover, .filter.open .filter-btn, .filter.has-active .filter-btn { border-color: #e85d04; }
.filter.has-active .filter-btn { color: #e85d04; }
.f-icon { display: inline-flex; align-items: center; color: #e85d04; }
.chev { transition: transform .18s ease; }
.filter.open .chev { transform: rotate(180deg); }
.filter-panel {
  display: none;
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  left: 0;
  min-width: 220px;
  max-height: 280px;
  overflow: auto;
  padding: 8px;
  border: 1px solid #e3e5e8;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 10px 28px #0000001a;
}
.filter.open .filter-panel { display: grid; gap: 2px; }
.filter-panel label { display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 5px; color: #333; font-size: 12px; cursor: pointer; }
.filter-panel label:hover { background: #f5f6f8; }
.filter-panel input { margin: 0; accent-color: #e85d04; }

.results-head { display: flex; align-items: baseline; gap: 8px; margin: 0 0 12px; color: #222; font: 700 16px/1.3 Lato, Inter, sans-serif; }
.results-head #foundCount { color: #737983; font: 500 12px/1.3 Inter, sans-serif; }
.itinerary-summary { display: grid; grid-template-columns: 1fr 1fr auto; margin: 0 0 20px; border: 1px solid #e2e4e8; background: #fff; }
.itinerary-summary[hidden] { display: none; }
.itinerary-summary > div { display: grid; gap: 4px; padding: 12px 16px; border-right: 1px solid #e8e9ec; }
.itinerary-summary > div > span { color: #717781; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.itinerary-summary strong { color: #252525; font-size: 12px; }
.itinerary-summary b { color: #e85d04; font-size: 13px; }
.itinerary-summary .itinerary-total { min-width: 150px; align-content: center; border-right: 0; background: #fff9ef; }
.itinerary-summary .itinerary-total b { font-size: 17px; }
.results-trips { min-width: 0; display: grid; gap: 24px; }
.leg-results[hidden] { display: none; }
.leg-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 10px; }
.leg-heading h2 { margin: 0; color: #242424; font: 700 15px/1.25 Lato, Inter, sans-serif; }
.leg-heading h2 span { color: #737983; font-weight: 500; }
.leg-heading p { margin: 4px 0 0; color: #747a83; font-size: 11px; }
.leg-count { flex: 0 0 auto; color: #737983; font-size: 11px; }
.trip-card.has-selection { border-color: #e85d04; box-shadow: inset 3px 0 #e85d04, 0 3px 12px #18203308; }
.results-layout { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; gap: 20px; }
#tripList, #returnTripList { display: grid; gap: 12px; min-width: 0; }
.trip-card {
  position: relative;
  min-width: 0;
  min-height: 126px;
  display: flex;
  align-items: center;
  gap: 14px;
  overflow: hidden;
  padding: 20px 18px 16px;
  border: 1px solid #e8e9ec;
  border-radius: 0;
  background: #fff;
  box-shadow: 0 3px 12px #18203308;
  transition: border-color .16s ease, box-shadow .16s ease;
  animation: trip-card-enter .38s cubic-bezier(.2,.75,.25,1) both;
}
.trip-card:nth-child(2) { animation-delay: 55ms; }
.trip-card:nth-child(3) { animation-delay: 110ms; }
.trip-card:nth-child(4) { animation-delay: 165ms; }
@keyframes trip-card-enter { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: translateY(0); } }
.trip-card:hover { border-color: #d2d4d8; box-shadow: 0 5px 18px #18203310; }
.ribbon { position: absolute; top: 0; left: 0; padding: 4px 9px 4px 12px; border-radius: 0 0 8px 0; background: #e85d04; color: #fff; font-size: 9px; font-weight: 700; }
.t-logo { flex: 0 0 52px; width: 52px; height: 44px; display: grid; place-items: center; }
.t-logo { overflow: hidden; border: 1px solid #f2dfd1; border-radius: 0; background: #fff7ef; }
.t-logo span { color: #b84600; font-size: 8px; font-weight: 900; letter-spacing: .25px; }
.t-type { flex: 0 0 94px; color: #515761; font-size: 10px; font-weight: 700; line-height: 1.4; }
.t-dep, .t-arr { flex: 0 0 120px; display: flex; flex-direction: column; gap: 4px; }
.t-code { color: #737983; font-size: 10px; font-weight: 600; }
.t-dep strong, .t-arr strong { color: #1c1c1c; font: 700 16px/1.15 Lato, Inter, sans-serif; white-space: nowrap; }
.t-dep small, .t-arr small { overflow: hidden; color: #777e88; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.t-dur { flex: 1 1 80px; min-width: 55px; display: flex; align-items: center; gap: 7px; color: #737983; font-size: 10px; white-space: nowrap; }
.t-dur i { flex: 1; height: 1px; background: #d7d9dd; }
.t-rate { flex: 0 0 94px; display: flex; flex-direction: column; gap: 5px; }
.rating { color: #9a6a00; font-size: 12px; font-weight: 700; }
.seats { color: #737983; font-size: 10px; }
.t-price { flex: 0 0 88px; display: grid; gap: 3px; color: #606773; font-size: 10px; }
.t-price b { color: #222; font-size: 11px; }
.view-seats { flex: 0 0 auto; min-height: 42px; padding: 0 15px; border: 0; border-radius: 2px; background: #e88a00; color: #201608; font: 700 11px Lato, Inter, sans-serif; cursor: pointer; white-space: nowrap; transition: background .18s ease, transform .18s ease, box-shadow .18s ease; }
.view-seats { transition: background .18s ease, transform .18s ease, box-shadow .18s ease; }
.view-seats:hover { background: #e85d04; transform: translateY(-2px); box-shadow: 0 5px 14px #e85d0430; }
.price-one { display: none; margin-left: auto; color: #e85d04; font: 700 15px/1 Lato, Inter, sans-serif; white-space: nowrap; }

.empty { padding: 30px 22px; border: 1px solid #e8e9ec; border-radius: 0; background: #fff; color: #565d67; text-align: center; font-size: 13px; }
.empty a { color: #e85d04; font-weight: 700; text-decoration: underline; }
.skeleton-card { pointer-events: none; }
.sk { display: block; border-radius: 2px; background: linear-gradient(90deg, #f0e5d3 20%, #fff9ed 42%, #ead9bd 64%); background-size: 300% 100%; animation: skeleton-shimmer 1.3s ease infinite; }
.sk-logo { flex: 0 0 68px; width: 68px; height: 42px; }
.sk-line { height: 11px; }
.sk-line.w1 { width: 90px; }
.sk-line.w2 { width: 110px; }
.sk-line.w3 { width: 70px; }
.sk-btn { width: 95px; height: 38px; border-radius: 2px; }
@keyframes skeleton-shimmer { to { background-position: -150% 0; } }
.toast { position: fixed; z-index: 60; left: 50%; bottom: 24px; max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 8px; background: #202124; color: #fff; font-size: 12px; line-height: 1.45; text-align: center; box-shadow: 0 8px 24px #0003; opacity: 0; pointer-events: none; transform: translate(-50%, 12px); transition: opacity .2s ease, transform .2s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1100px) {
  .trip-card { gap: 10px; padding-right: 13px; padding-left: 13px; }
  .t-logo { flex-basis: 60px; width: 60px; }
  .t-type { flex-basis: 76px; }
  .t-dep, .t-arr { flex-basis: 100px; }
  .t-rate { flex-basis: 78px; }
  .t-price { flex-basis: 76px; }
}
@media (max-width: 860px) {
  .trip-bar-inner, .results-wrap { width: calc(100% - 28px); }
  .results-wrap { margin-top: 18px; }
  .filters { gap: 7px; margin-bottom: 18px; }
  .modify-btn, .filter-btn { min-height: 42px; padding: 0 10px; font-size: 11px; }
  .trip-card { flex-wrap: wrap; min-height: 0; gap: 10px 12px; padding: 25px 12px 13px; }
  .ribbon { top: 0; }
  .t-logo { flex: 0 0 60px; width: 60px; height: 36px; }
  .t-type { flex: 1 1 75px; }
  .t-dep, .t-arr { flex: 1 1 80px; }
  .t-dur { order: 5; flex-basis: 100px; }
  .t-rate { order: 6; flex: 1 1 70px; }
  .t-price { order: 7; flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: 4px 12px; }
  .view-seats { order: 8; margin-left: auto; }
}
@media (max-width: 520px) {
  .trip-bar-inner, .results-wrap { width: calc(100% - 22px); }
  .trip-card { column-gap: 8px; }
  .t-type { flex-basis: calc(100% - 72px); }
  .t-dep, .t-arr { flex-basis: calc(50% - 8px); }
  .t-dur { order: 7; flex: 1 1 95px; }
  .t-rate { order: 6; flex: 1 1 80px; }
  .t-price { order: 5; flex: 1 1 100%; }
  .view-seats { order: 8; }
  .filter-panel { min-width: 190px; }
  .itinerary-summary { grid-template-columns: 1fr 1fr; }
  .itinerary-summary .itinerary-total { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  .trip-card, .view-seats, .sk { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Tahmeed visual finish: crisp cards, clear brand marks and touch feedback. */
.trip-card { border-radius: 0; }
.empty { border-radius: 0; }
.t-logo { flex: 0 0 68px; width: 68px; height: 42px; overflow: hidden; display: grid; place-items: center; border: 1px solid #eee5da; border-radius: 0; background: #fff; }
.t-logo img { display: block; width: 100%; height: 100%; object-fit: contain; }
.view-seats:hover { background: #ffb321; transform: translateY(-1px); box-shadow: 0 5px 14px #e88a0030; }
.view-seats:active { transform: translateY(0); }
.view-seats:focus-visible, .filter-btn:focus-visible, .modify-btn:focus-visible { outline: 3px solid #ffca61; outline-offset: 2px; }
@media (max-width: 1100px) {
  .t-logo { flex-basis: 60px; width: 60px; }
}
@media (max-width: 860px) {
  .modify-btn, .filter-btn { min-height: 42px; }
  .t-logo { flex: 0 0 60px; width: 60px; height: 36px; }
}
@media (max-width: 520px) {
  .t-type { flex-basis: calc(100% - 72px); }
}
@media (prefers-reduced-motion: reduce) {
  .sk { animation: none; }
}
