/* Keep the same native price and link nodes throughout quote refreshes. With a
   confirmed amount, the price disclosures can follow the channel comparison. */
body[data-wg-estate-page] #wg-price-review-nav .wg-trip-copy:has([data-wg-review-amount][data-wg-confirmed-stay]:not([hidden])) {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

body[data-wg-estate-page] #wg-price-review-nav .wg-trip-price:has(> [data-wg-review-amount][data-wg-confirmed-stay]:not([hidden])),
body[data-wg-estate-page] #wg-price-review-nav .wg-trip-price > [data-wg-review-amount][data-wg-confirmed-stay]:not([hidden]) {
  display: contents;
}

body[data-wg-estate-page] #wg-price-review-nav [data-wg-confirmed-stay] > :not(.wg-trip-deposit) {
  order: 1;
}

body[data-wg-estate-page] #wg-price-review-nav .wg-trip-price ~ :not(a),
body[data-wg-estate-page] #wg-price-review-nav .wg-trip-price > [data-wg-review-status] {
  order: 2;
}

body[data-wg-estate-page] #wg-price-review-nav [data-wg-confirmed-stay] > .wg-trip-deposit,
body[data-wg-estate-page] #wg-price-review-nav [data-wg-count-payment-timing] {
  order: 3;
}

body[data-wg-estate-page] #wg-price-review-nav .wg-trip-price ~ a,
body[data-wg-estate-page] #wg-price-review-nav .wg-trip-price ~ .wg-action-position {
  order: 4;
}

.booking-sidebar .wghp-direct-guarantee {
  margin: 1rem 0;
  color: #102d43;
  font-size: 1rem;
  line-height: 1.5;
}
.booking-sidebar .wghp-direct-guarantee a {
  color: inherit;
  text-decoration: underline;
}

/* The coupon precedes the grand total in the checkout form's source. Restore
   that order visually, leaving the direct and supplier totals next to each other. */
body[data-wg-stay-checkout] .booking-sidebar #homey_booking_cost .payment-list-price-detail > details[data-wg-visible-coupon] {
  order: -1;
  grid-row: 1;
  grid-column: 1 / -1;
}

body[data-wg-stay-checkout] .booking-sidebar #homey_booking_cost .payment-list-price-detail:has(> details[data-wg-visible-coupon]) > :is(.pull-left, .pull-right) {
  grid-row: 2;
}
