/*
 * Car hire screens.
 *
 * Depends on the custom properties defined in flipside.css, so load that first.
 */

/* ------------------------------------------------------------------ *
 * Results layout
 * ------------------------------------------------------------------ */

.fl-results {
  display: grid;
  gap: 32px;
  grid-template-columns: 290px 1fr;
  align-items: start;
}
@media (max-width: 991px) {
  .fl-results { grid-template-columns: 1fr; }
}

.fl-results-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}
.fl-results-bar .count { font-size: 15px; }
.fl-results-bar .count strong { color: var(--fl-heading); }
.fl-results-bar .sort { display: flex; align-items: center; gap: 10px; }
.fl-results-bar .sort label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0;
  white-space: nowrap;
}
.fl-results-bar .sort select {
  height: 44px;
  padding: 0 34px 0 14px;
  border: 1px solid var(--fl-border);
  border-radius: var(--fl-radius);
  background-color: #fff;
  background-image: url("assets/images/down-arrow.svg");
  background-repeat: no-repeat;
  background-position: right 13px center;
  background-size: 10px;
  font-family: var(--fl-theme-font-sans-serif);
  font-size: 14px;
  font-weight: 500;
  color: var(--fl-heading);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

/* ------------------------------------------------------------------ *
 * Filter rail
 * ------------------------------------------------------------------ */

.fl-filters {
  background: #fff;
  border: 1px solid var(--fl-border);
  border-radius: 14px;
  padding: 24px;
  position: sticky;
  top: 20px;
}
.fl-filters h3 {
  font-size: 16px;
  margin: 0 0 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--fl-border);
}
.fl-filter-group { margin-bottom: 22px; }
.fl-filter-group:last-of-type { margin-bottom: 26px; }
.fl-filter-group > h4 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fl-text);
  margin: 0 0 12px;
}
.fl-filter-group .fl-check { display: flex; margin-bottom: 10px; font-weight: 400; font-size: 14px; }
.fl-filter-group .fl-check:last-child { margin-bottom: 0; }
.fl-filter-row { display: flex; gap: 10px; }
.fl-filter-row input,
.fl-filter-group select {
  width: 100%;
  height: 44px;
  padding: 0 13px;
  border: 1px solid var(--fl-border);
  border-radius: var(--fl-radius);
  font-family: var(--fl-theme-font-sans-serif);
  font-size: 14px;
  color: var(--fl-heading);
  background-color: #fff;
}
.fl-filter-row input:focus,
.fl-filter-group select:focus { outline: none; border-color: var(--fl-primary); }
.fl-filters-actions { display: grid; gap: 10px; }
.fl-filters-actions .btn { width: 100%; text-align: center; }

/* ------------------------------------------------------------------ *
 * Result card
 * ------------------------------------------------------------------ */

.fl-car-list { display: grid; gap: 18px; }

.fl-car {
  background: #fff;
  border: 1px solid var(--fl-border);
  border-radius: 14px;
  padding: 22px;
  display: grid;
  grid-template-columns: 210px 1fr 220px;
  gap: 24px;
  transition: box-shadow 0.25s, border-color 0.25s;
}
.fl-car:hover { box-shadow: 0 14px 36px rgba(28, 35, 31, 0.09); border-color: transparent; }
@media (max-width: 767px) {
  .fl-car { grid-template-columns: 1fr; gap: 18px; }
}

.fl-car-media { position: relative; }
.fl-car-media img {
  width: 100%;
  height: 132px;
  object-fit: contain;
  object-position: center;
}
.fl-car-media .no-image {
  height: 132px;
  border-radius: var(--fl-radius);
  background: var(--fl-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #c3c3c9;
  font-size: 44px;
}
.fl-car-media .supplier {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--fl-text);
}
.fl-car-media .supplier img { width: auto; height: 20px; object-fit: contain; }

.fl-car-body h3 { font-size: 19px; margin: 0 0 6px; line-height: 1.35; }
.fl-car-body .group {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fl-primary);
  margin-bottom: 14px;
}

.fl-car-specs { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 0 0 14px; padding: 0; list-style: none; }
.fl-car-specs li { display: flex; align-items: center; gap: 7px; font-size: 14px; }
.fl-car-specs li i { color: var(--fl-primary); font-size: 17px; }

.fl-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.fl-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 5px 10px;
  border-radius: 100px;
  background: var(--fl-gray);
  color: var(--fl-text);
  white-space: nowrap;
}
.fl-tag.is-good { background: rgba(99, 171, 69, 0.12); color: #3f7a28; }
.fl-tag.is-warn { background: rgba(247, 146, 30, 0.14); color: #a9640c; }

.fl-car-price {
  border-left: 1px solid var(--fl-border);
  padding-left: 22px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: right;
}
@media (max-width: 767px) {
  .fl-car-price { border-left: 0; border-top: 1px solid var(--fl-border); padding: 18px 0 0; text-align: left; }
}
.fl-car-price .day-rate { font-size: 13px; color: var(--fl-text); margin-bottom: 2px; }
.fl-car-price .total {
  font-family: var(--fl-theme-heading-font-family);
  font-size: 30px;
  font-weight: 700;
  color: var(--fl-heading);
  line-height: 1.15;
}
.fl-car-price .total-note { font-size: 12px; color: var(--fl-text); margin-bottom: 16px; }
.fl-car-price .btn { width: 100%; text-align: center; }
.fl-car-price .pay-note { font-size: 12px; margin-top: 10px; color: var(--fl-text); }

/* ------------------------------------------------------------------ *
 * Offer detail and booking
 * ------------------------------------------------------------------ */

.fl-offer { display: grid; gap: 32px; grid-template-columns: 1fr 380px; align-items: start; }

/* A grid item defaults to min-width:auto, which means content wider than the
   track pushes the track wider rather than wrapping — which is how a long
   fare condition ended up printed outside the summary card instead of inside
   it. Nothing but this line keeps the 380px column at 380px. */
.fl-offer > * { min-width: 0; }

/* Fare conditions are supplier prose: airline names, penalty currencies and
   occasionally a long unbroken token. It wraps rather than escaping. */
.fl-fare-conditions {
  margin: 0;
  padding-left: 18px;
  font-size: 14px;
  line-height: 1.9;
  overflow-wrap: anywhere;
}
.fl-fare-conditions li { margin: 0 0 4px; }
@media (max-width: 991px) { .fl-offer { grid-template-columns: 1fr; } }

.fl-panel {
  background: #fff;
  border: 1px solid var(--fl-border);
  border-radius: 14px;
  padding: 28px;
  margin-bottom: 20px;
}
.fl-panel:last-child { margin-bottom: 0; }
.fl-panel > h2 {
  font-size: 19px;
  margin: 0 0 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--fl-border);
}
.fl-panel > h3 { font-size: 16px; margin: 26px 0 14px; }

.fl-aside { position: sticky; top: 20px; }

.fl-summary-line {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  font-size: 15px;
  border-bottom: 1px dashed var(--fl-border);
}
.fl-summary-line:last-of-type { border-bottom: 0; }
.fl-summary-line dt { font-weight: 400; margin: 0; color: var(--fl-text); }
.fl-summary-line dd { margin: 0; font-weight: 600; color: var(--fl-heading); text-align: right; }
.fl-summary-line.is-conditional dd { font-weight: 500; color: var(--fl-text); }
.fl-summary-line.is-total {
  border-top: 2px solid var(--fl-border);
  border-bottom: 0;
  margin-top: 10px;
  padding-top: 16px;
  font-size: 17px;
}
.fl-summary-line.is-total dt { color: var(--fl-heading); font-weight: 700; }
.fl-summary-line.is-total dd {
  font-family: var(--fl-theme-heading-font-family);
  font-size: 25px;
  font-weight: 700;
}

.fl-route { display: grid; gap: 18px; }
.fl-route-point { display: flex; gap: 14px; }
.fl-route-point .pin {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(99, 171, 69, 0.11);
  color: var(--fl-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex: 0 0 auto;
}
.fl-route-point .when {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fl-text);
  margin-bottom: 3px;
}
.fl-route-point .where { font-family: var(--fl-theme-heading-font-family); font-weight: 700; color: var(--fl-heading); margin-bottom: 3px; }
.fl-route-point .detail { font-size: 14px; line-height: 1.6; }

/* Extras chosen on the booking form */
.fl-extra {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px dashed var(--fl-border);
}
.fl-extra:last-child { border-bottom: 0; }
.fl-extra-body { flex: 1 1 auto; }
.fl-extra-body strong { display: block; color: var(--fl-heading); font-family: var(--fl-theme-heading-font-family); }
.fl-extra-body span { font-size: 13px; }
.fl-extra select {
  width: 84px;
  height: 44px;
  padding: 0 10px;
  border: 1px solid var(--fl-border);
  border-radius: var(--fl-radius);
  font-family: var(--fl-theme-font-sans-serif);
  font-size: 14px;
  color: var(--fl-heading);
  background: #fff;
}

/* Booking status pill */
.fl-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 8px 16px;
  border-radius: 100px;
}
.fl-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.fl-status.is-pending { background: rgba(247, 146, 30, 0.14); color: #a9640c; }
.fl-status.is-confirmed { background: rgba(99, 171, 69, 0.14); color: #3f7a28; }
.fl-status.is-cancelled { background: rgba(130, 130, 138, 0.14); color: #6a6a72; }
.fl-status.is-failed { background: rgba(216, 71, 63, 0.12); color: #b3342d; }

/* The empty state carries a real suggestion, so it gets real room. */
.fl-empty { text-align: center; padding: 70px 24px; }
.fl-empty i { font-size: 56px; color: var(--fl-border); display: block; margin-bottom: 20px; }
.fl-empty h3 { font-size: 21px; margin: 0 0 10px; }
.fl-empty p { max-width: 460px; margin: 0 auto 24px; line-height: 1.75; }
