@keyframes booking-spin {
  to { transform: rotate(360deg); }
}

@keyframes sk-chase {
  100% { transform: rotate(360deg); }
}

@keyframes sk-chase-dot {
  80%, 100% { transform: rotate(360deg); }
}

@keyframes sk-chase-dot-before {
  50% { transform: scale(0.4); }
  100%, 0% { transform: scale(1); }
}

.booking-loading-icon {
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 8px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  vertical-align: -2px;
  animation: booking-spin 0.7s linear infinite;
}

#booking_form_request {
  position: relative;
}

#booking_form_request.booking-form-is-loading {
  pointer-events: none;
}

.booking-loading-overlay {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 140px;
  padding: 24px 16px;
  background: rgba(255, 255, 255, 0.88);
  box-sizing: border-box;
}

.booking-loading-overlay .sk-chase-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  width: auto;
}

.booking-loading-overlay .sk-chase {
  width: 48px;
  height: 48px;
  position: relative;
  animation: sk-chase 2.5s infinite linear both;
}

.booking-loading-overlay .sk-chase-dot {
  width: 100%;
  height: 100%;
  position: absolute;
  left: 0;
  top: 0;
  animation: sk-chase-dot 2s infinite ease-in-out both;
}

.booking-loading-overlay .sk-chase-dot:before {
  content: "";
  display: block;
  width: 25%;
  height: 25%;
  background-color: #c3a152;
  border-radius: 100%;
  animation: sk-chase-dot-before 2s infinite ease-in-out both;
}

.booking-loading-overlay .sk-chase-dot:nth-child(1) { animation-delay: -1.1s; }
.booking-loading-overlay .sk-chase-dot:nth-child(2) { animation-delay: -1.0s; }
.booking-loading-overlay .sk-chase-dot:nth-child(3) { animation-delay: -0.9s; }
.booking-loading-overlay .sk-chase-dot:nth-child(4) { animation-delay: -0.8s; }
.booking-loading-overlay .sk-chase-dot:nth-child(5) { animation-delay: -0.7s; }
.booking-loading-overlay .sk-chase-dot:nth-child(6) { animation-delay: -0.6s; }
.booking-loading-overlay .sk-chase-dot:nth-child(1):before { animation-delay: -1.1s; }
.booking-loading-overlay .sk-chase-dot:nth-child(2):before { animation-delay: -1.0s; }
.booking-loading-overlay .sk-chase-dot:nth-child(3):before { animation-delay: -0.9s; }
.booking-loading-overlay .sk-chase-dot:nth-child(4):before { animation-delay: -0.8s; }
.booking-loading-overlay .sk-chase-dot:nth-child(5):before { animation-delay: -0.7s; }
.booking-loading-overlay .sk-chase-dot:nth-child(6):before { animation-delay: -0.6s; }

.booking-loading-overlay__text {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #5a5a5a;
  text-align: center;
}

#fabrega_avantio_demo_book.is-loading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.fabrega-avantio-calendar-notice {
  margin: 8px 0 12px;
  font-size: 13px;
  color: #b42318;
}

.fabrega-avantio-range-note {
  margin: 2px 0 14px;
  padding: 11px 12px 11px 14px;
  border-left: 3px solid #c3a152;
  border-radius: 2px;
  background: #faf6ee;
  color: #5c5346;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 400;
}

.all-front-calendars.fabrega-avantio-availability-empty {
  min-height: 0 !important;
  height: auto;
}

.all-front-calendars.fabrega-avantio-availability-empty .fabrega-avantio-range-note {
  margin: 0;
}

body.fabrega-avantio-no-inventory #booking_form_request .has_calendar,
body.fabrega-avantio-no-inventory #booking_form_request .submit_booking_front_wrapper {
  display: none !important;
}

.fabrega-avantio-contact-note {
  margin: -6px 0 14px;
  color: #5c5346;
  font-size: 13px;
  line-height: 1.45;
}

.fabrega-avantio-contact-note a {
  color: #8a7040;
  text-decoration: underline;
}

/* Stay-total search: hide WP /night suffix so cards match Quote/Avaibook stay totals. */
body.fabrega-stay-search .price_unit .pernight {
  display: none !important;
}

/* Soft nudge (missing dates) — overrides theme #booking_errors red alert */
#booking_form_request #booking_errors.fabrega-avantio-hint {
  clear: both;
  margin: 0 0 12px;
}

#booking_form_request #booking_errors.fabrega-avantio-hint > div {
  margin: 0;
  padding: 10px 12px;
  border: 0;
  border-left: 3px solid #c3a152;
  border-radius: 4px;
  background: #f7f3ea;
  color: #6b5c3e;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 400;
}

#booking_form_request #booking_errors.fabrega-avantio-hint:has(+ .fabrega-avantio-occupation-rules) {
  margin-bottom: 6px;
}

#booking_form_request .fabrega-avantio-occupation-rules {
  clear: both;
  margin: 0 0 12px;
  padding: 8px 10px;
  border: 0;
  border-left: 2px solid #e4d3a8;
  border-radius: 2px;
  background: #faf6ee;
  color: #8a7d68;
  font-size: 11px;
  line-height: 1.35;
  font-weight: 400;
}

#booking_form_request .fabrega-avantio-occupation-rules__title {
  margin: 0 0 3px;
  color: #6b5c3e;
  font-size: 11px;
  font-weight: 600;
}

#booking_form_request .fabrega-avantio-occupation-rules ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.daterangepicker td.fabrega-changeover-closed {
  background: transparent !important;
  color: #b9b3a8 !important;
  text-decoration: line-through;
  cursor: not-allowed;
}

#booking_form_request .fabrega-avantio-occupation-rules li {
  margin: 0 0 6px;
  font-size: 12px;
  line-height: 1.4;
}

#booking_form_request .fabrega-avantio-occupation-rules li:last-child {
  margin-bottom: 0;
}

#booking_form_request .fabrega-avantio-occupation-rules__dates {
  display: block;
  color: #6b5c3e;
  font-size: 13px;
  font-weight: 600;
}

#booking_form_request .fabrega-avantio-occupation-rules__detail {
  display: block;
  font-size: 12px;
}

#booking_form_request:has(#booking_errors.fabrega-avantio-hint) #booking_form_request_mess,
#booking_form_request:has(#booking_errors.fabrega-avantio-alert) #booking_form_request_mess {
  display: none !important;
}

/*
 * Map pin infobox: long demo titles + stay totals must not share one row
 * (theme puts #infobox_title left and .prop_pricex right → overlap).
 */
.info_details #infobox_title {
  top: auto;
  right: auto;
  bottom: 78px;
  left: 0;
  width: calc(100% - 24px);
  max-width: none;
  padding: 0 15px;
  line-height: 1.25;
  white-space: normal;
  z-index: 2;
}

.info_details .prop_pricex {
  top: auto;
  right: auto;
  bottom: 52px;
  left: 15px;
  line-height: 1.2;
  z-index: 2;
}

/*
 * Availabilities failed: reserved days must not stay clickable.
 * The theme re-enables the first reserved day (.start_reservation).
 */
body.fabrega-avantio-calendar .daterangepicker td.calendar-reserved,
body.fabrega-avantio-calendar .booking-calendar td.calendar-reserved,
body.fabrega-avantio-calendar .calendar-reserved.start_reservation,
body.fabrega-avantio-calendar-locked .daterangepicker td.calendar-reserved,
body.fabrega-avantio-calendar-locked .booking-calendar td.calendar-reserved,
body.fabrega-avantio-calendar-locked .calendar-reserved.start_reservation {
  pointer-events: none !important;
  cursor: not-allowed !important;
}

.listing_main_image_price.fabrega-avantio-price-hidden {
  display: none !important;
}

.listing_main_image_price.fabrega-avantio-price-prompt {
  font-size: 15px;
  line-height: 1.35;
  font-weight: 400;
  padding: 12px 16px;
}
