/* Rentfidence guest calendar, scoped to the direct booking form. */
#booking-form .rfcal-replaced,
#booking-form.rfcal-needs-dates button[type=submit],
#booking-form .rfcal-date-action[hidden],
#booking-form .rfcal [hidden] { display: none !important; }

#booking-form .rfcal {
  --rf-ink: #192b39;
  --rf-muted: #52616d;
  --rf-line: #d3d9de;
  --rf-rule: #e4e8eb;
  --rf-coral: #ff385c;
  --rf-accent: #ad1c43;
  --rf-wash: #fff2f5;
  --rf-range: #e8eef3;
  --rf-green: #14634d;
  --rf-mint: #e4f4ea;
  --rf-sold: #77515b;
  color: var(--rf-ink);
  background: #fff;
  border: 1px solid var(--rf-line);
  border-radius: 16px;
  padding: clamp(8px, 2%, 20px);
  margin: 12px 0 18px;
  min-width: 0;
  font-family: inherit;
  font-variant-numeric: tabular-nums;
  scroll-margin-top: 75px;
}
.rfcal, .rfcal * { box-sizing: border-box; }
#booking-form .rfcal button {
  color: inherit;
  font: inherit;
  background: transparent;
  border: 0;
  box-shadow: none;
  border-radius: 8px;
  cursor: pointer;
  text-transform: none;
  letter-spacing: normal;
}
#booking-form .rfcal button:disabled { cursor: default; }
#booking-form .rfcal :is(button,summary):focus-visible {
  outline: 3px solid var(--rf-accent);
  outline-offset: 1px;
  z-index: 2;
}
.rfcal-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 3px;
  margin: 0 0 8px;
  border: 1px solid var(--rf-line);
  border-radius: 12px;
}
#booking-form .rfcal .rfcal-field {
  width: 100%;
  min-height: 54px;
  border: 2px solid transparent;
  padding: 6px 9px;
  text-align: start;
  line-height: 1.35;
}
#booking-form .rfcal .rfcal-field[aria-pressed=true] { border-color: var(--rf-ink); }
.rfcal-field span, .rfcal-field strong { display: block; }
.rfcal-field span { color: var(--rf-muted); font-size: .78rem; }
.rfcal-field[aria-pressed=true] span { color: var(--rf-accent); }
.rfcal-field strong { color: var(--rf-ink); font-size: .95rem; }
.rfcal-nav { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.rfcal-nav-label { min-width: 0; text-align: center; font-size: .88rem; font-weight: 600; }
#booking-form .rfcal .rfcal-arrow {
  display: grid;
  place-items: center;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  font: 24px/1 system-ui,sans-serif;
}
#booking-form .rfcal .rfcal-arrow:disabled { opacity: .32; }
#booking-form .rfcal .rfcal-arrow:enabled:hover { background: #f2f5f7; }
.rfcal-months { display: grid; grid-template-columns: minmax(0,1fr); }
.rfcal[data-month-count="2"] .rfcal-months, .rfcal-months:has(> .rfcal-month:nth-child(2)) {
  grid-template-columns: repeat(2, minmax(0,1fr)); gap: 20px;
}
.rfcal-month { min-width: 0; }
#booking-form .rfcal-month-title { text-align: center; font-size: 1rem; font-weight: 650; margin: 4px 0 8px; }
.rfcal-grid { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 3px 0; margin: 0 0 8px; }
.rfcal-weekday { padding: 3px 0; text-align: center; color: var(--rf-muted); font-size: .71rem; }
#booking-form .rfcal .rfcal-day {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  position: relative; gap: 2px; width: 100%; min-width: 0; min-height: 48px;
  padding: 3px 0; border: 1px solid transparent; border-radius: 8px;
  line-height: 1.15; color: var(--rf-ink); font-size: .94rem; font-weight: 600;
}
.rfcal-price { display: block; max-width: 100%; font-size: clamp(.57rem, 1.8vw, .73rem); font-weight: 500; line-height: 1.15; color: var(--rf-green); }
#booking-form .rfcal .rfcal-day[aria-disabled="false"]:hover { background: var(--rf-mint); border-color: #4f826b; }
#booking-form .rfcal .rfcal-day[aria-disabled="true"] { cursor: default; color: var(--rf-muted); opacity: 1; }
.rfcal-day[aria-disabled="true"] .rfcal-price { color: var(--rf-muted); }
.rfcal-day.rfcal-blocked .rfcal-day-number, .rfcal-day.rfcal-past .rfcal-day-number { text-decoration: line-through; }
.rfcal-day.rfcal-blocked .rfcal-price { color: var(--rf-sold); }
#booking-form .rfcal .rfcal-day.rfcal-checkout-only { background: var(--rf-mint); color: var(--rf-green); border: 1px dashed #4f826b; }
.rfcal-day.rfcal-checkout-only .rfcal-day-number { text-decoration: none; }
.rfcal-day.rfcal-checkout-only .rfcal-price { color: var(--rf-green); }
#booking-form .rfcal .rfcal-day.rfcal-range { border-radius: 0; background: var(--rf-range); }
.rfcal-day.rfcal-range .rfcal-price { color: var(--rf-ink); }
#booking-form .rfcal .rfcal-day.rfcal-endpoint {
  color: #fff; background: var(--rf-ink); border: 1px solid var(--rf-ink);
  border-bottom: 3px solid var(--rf-coral); padding-bottom: 1px;
}
.rfcal-day.rfcal-endpoint .rfcal-day-number { text-decoration: none; }
.rfcal-day.rfcal-endpoint .rfcal-price { color: #fff; }
#booking-form .rfcal :is(.rfcal-clear,.rfcal-retry), #booking-form .rfcal summary {
  color: var(--rf-accent); cursor: pointer; text-decoration: underline;
  text-underline-offset: 3px; font-size: .81rem; font-weight: 550;
}
#booking-form .rfcal :is(.rfcal-clear,.rfcal-retry) { min-height: 36px; padding: 4px 6px; }
#booking-form .rfcal :is(.rfcal-clear,.rfcal-retry):enabled:hover { background: var(--rf-wash); }
#booking-form .rfcal .rfcal-clear:disabled { color: var(--rf-muted); opacity: .7; }
#booking-form .rfcal :is(.rfcal-note,.rfcal-rates,.rfcal-legend) {
  margin: 6px 0 0; color: var(--rf-muted); font-size: .77rem; line-height: 1.45;
}
.rfcal-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 5px 12px; }
.rfcal-legend span { white-space: nowrap; }
.rfcal-legend b { display: inline-block; width: .6em; height: .6em; border-radius: 50%; border: 1px solid currentColor; background: currentColor; vertical-align: middle; }
.rfcal-legend .rfcal-blocked { height: 2px; border-radius: 0; }
.rfcal-legend .rfcal-unpriced, .rfcal-legend .rfcal-unknown { background: transparent; }
.rfcal-subtotal { display: block; font-size: .97rem; }
.rfcal-legend .rfcal-available { color: var(--rf-green); }
.rfcal-legend .rfcal-blocked { color: var(--rf-sold); }
.rfcal-estimate { margin: 12px 0 0; padding: 12px 0 0; border-top: 1px solid var(--rf-rule); font-size: .88rem; line-height: 1.45; }
.rfcal-estimate summary { padding: 4px 0; }
.rfcal-estimate ul, .rfcal-estimate dl { list-style: none; margin: 4px 0 0; padding: 0; }
.rfcal-estimate li, .rfcal-estimate .rfcal-estimate-row { display: flex; justify-content: space-between; gap: 9px; padding: 5px 0; border-top: 1px solid var(--rf-rule); }
@media (prefers-contrast: more) {
  #booking-form .rfcal .rfcal-day[aria-disabled="false"] { border-inline-color: currentColor; }
}

@media (max-width: 760px) {
  .detail-layout > .booking-card { order: -1; }
  .booking-card.rfcal-mobile-booking { padding: 0; border: 0; box-shadow: none; }
  .rfcal-mobile-booking > .eyebrow, .rfcal-mobile-booking > .muted { display: none; }
  .rfcal-mobile-booking .booking-nightly { padding-bottom: 0; border: 0; margin-bottom: 10px; }
  .rfcal-mobile-booking .detail-content { margin: 24px 0; border-top: 1px solid var(--line); padding-top: 24px; }
  .rfcal-mobile-booking .rfcal-guest-link { display: none; }
  .rfcal-mobile-booking form:has(#booking-terms:not([hidden])) .rfcal-guest-link {
    display: inline-flex; align-items: center; min-height: 44px; text-decoration: underline;
  }
  .rfcal-mobile-booking input[name=name] { scroll-margin-top: 48px; }
}
