/**
 * MPHB booking — Airbnb-style inline calendar in sidebar form.
 */

.fb-mphb-airbnb {
  --mphb-airbnb-border: #b0b0b0;
  --mphb-airbnb-radius: 8px;
}

.fb-mphb-airbnb .mphb_sc_booking_form-wrapper,
.fb-mphb-airbnb .mphb_sc_availability_calendar-wrapper {
  margin: 0;
}

/* Grid layout: dates row, calendar, guests, button */
.fb-mphb-airbnb {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.fb-mphb-airbnb > .mphb_sc_booking_form-wrapper {
  display: contents;
}

.fb-mphb-airbnb .mphb-booking-form {
  display: contents;
}

.fb-mphb-airbnb .mphb-required-fields-tip,
.fb-mphb-airbnb .mphb-booking-form input[type="hidden"] {
  display: none !important;
}

.fb-mphb-airbnb .mphb-rooms-quantity-wrapper {
  display: none !important;
}

.fb-mphb-airbnb .mphb-errors-wrapper.mphb-hide {
  display: none !important;
}

.fb-mphb-airbnb .mphb-errors-wrapper:not(.mphb-hide) {
  display: block !important;
  grid-column: 1 / -1;
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: #c13515;
}

.fb-mphb-airbnb .mphb-reserve-room-section {
  grid-column: 1 / -1;
  margin-top: 0.75rem;
}

.fb-mphb-airbnb .mphb-reserve-room-section.mphb-hide {
  display: none !important;
}

.fb-mphb-airbnb .mphb-reserve-room-section .mphb-period-price {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
}

.fb-mphb-airbnb .mphb-reserve-room-section .mphb-confirm-reservation {
  width: 100%;
  border-radius: 8px;
  background: linear-gradient(to right, #e61e4d 0%, #e31c5f 50%, #d70466 100%);
  border: none;
  color: #fff;
  font-weight: 600;
  padding: 0.85rem 1rem;
  font-size: 1rem;
  cursor: pointer;
}

/* Check-in / check-out — Airbnb split field */
.fb-mphb-airbnb .mphb-check-in-date-wrapper,
.fb-mphb-airbnb .mphb-check-out-date-wrapper {
  margin: 0;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--mphb-airbnb-border);
  background: #fff;
}

.fb-mphb-airbnb .mphb-check-in-date-wrapper {
  grid-column: 1;
  border-radius: var(--mphb-airbnb-radius) 0 0 var(--mphb-airbnb-radius);
  border-right: 0;
}

.fb-mphb-airbnb .mphb-check-out-date-wrapper {
  grid-column: 2;
  border-radius: 0 var(--mphb-airbnb-radius) var(--mphb-airbnb-radius) 0;
}

.fb-mphb-airbnb .mphb-check-in-date-wrapper label,
.fb-mphb-airbnb .mphb-check-out-date-wrapper label {
  display: block;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fb-text, #222);
  margin: 0 0 0.2rem;
  line-height: 1.2;
}

.fb-mphb-airbnb .mphb-check-in-date-wrapper label abbr,
.fb-mphb-airbnb .mphb-check-out-date-wrapper label abbr {
  display: none;
}

.fb-mphb-airbnb .mphb-check-in-date-wrapper br,
.fb-mphb-airbnb .mphb-check-out-date-wrapper br {
  display: none;
}

.fb-mphb-airbnb .mphb-booking-form .mphb-datepick {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--fb-text, #222);
  box-shadow: none;
  cursor: pointer;
  min-height: 1.25rem;
}

.fb-mphb-airbnb .mphb-booking-form .mphb-datepick:focus {
  outline: none;
}

/* Inline calendar */
.fb-mphb-airbnb .mphb_sc_availability_calendar-wrapper {
  grid-column: 1 / -1;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--fb-border, #ddd);
}

.fb-mphb-airbnb .mphb-calendar {
  --mphb-available-date-bg: #ffffff;
  --mphb-available-date-color: #222222;
  --mphb-not-available-date-bg: #ffffff;
  --mphb-not-available-date-color: #b0b0b0;
  --mphb-booked-date-bg: #ffffff;
  --mphb-booked-date-color: #b0b0b0;
  --mphb-out-of-season-date-bg: #f7f7f7;
  --mphb-out-of-season-date-color: #b0b0b0;
  --mphb-selected-date-bg: #222222;
  --mphb-selected-date-color: #ffffff;
  --mphb-unselectable-date-color: #b0b0b0;
  width: 100%;
  font-family: var(--fb-font, inherit);
  font-size: 0.8rem;
}

.fb-mphb-airbnb .mphb-calendar .datepick {
  width: 100% !important;
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}

.fb-mphb-airbnb .mphb-calendar .datepick-month {
  float: none !important;
  width: 100% !important;
  clear: both;
  border: 0 !important;
  margin: 0 0 0.75rem !important;
  overflow: visible !important;
}

.fb-mphb-airbnb .mphb-calendar .datepick-month:last-child {
  margin-bottom: 0 !important;
}

.fb-mphb-airbnb .mphb-calendar .datepick-month-row {
  display: block !important;
  clear: both;
  overflow: visible !important;
}

/* Datepick only renders a month dropdown on the first month; following months are plain text. */
.fb-mphb-airbnb .mphb-calendar .datepick-month-header {
  display: block !important;
  visibility: visible !important;
  background: transparent !important;
  border: 0 !important;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--fb-text, #222);
  padding: 0.25rem 0 0.5rem !important;
  height: auto !important;
  min-height: 1.75rem;
  line-height: 1.75rem !important;
  overflow: visible !important;
  text-align: center;
}

.fb-mphb-airbnb .mphb-calendar .datepick-month-header select {
  font-size: 0.85rem;
  font-weight: 600;
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--fb-text, #222);
}

.fb-mphb-airbnb .mphb-calendar .datepick-month-header .fb-mphb-month-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--fb-text, #222);
}

.fb-mphb-airbnb .mphb-calendar .datepick-month table {
  width: 100%;
}

.fb-mphb-airbnb .mphb-calendar .datepick-month th {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--fb-muted, #717171);
  padding: 0.25rem 0;
}

.fb-mphb-airbnb .mphb-calendar .datepick-month td {
  width: 14.28%;
  height: 2.1rem;
  text-align: center;
  vertical-align: middle;
}

.fb-mphb-airbnb .mphb-calendar .datepick-month td span,
.fb-mphb-airbnb .mphb-calendar .datepick-month td a {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 2rem !important;
  height: 2rem !important;
  margin: 0 auto !important;
  border-radius: 50% !important;
  line-height: 1 !important;
  font-size: 0.8rem !important;
  font-weight: 500;
  text-decoration: none;
}

.fb-mphb-airbnb .mphb-calendar td .mphb-booked-date,
.fb-mphb-airbnb .mphb-calendar td .mphb-mark-as-unavailable {
  text-decoration: line-through;
}

.fb-mphb-airbnb .mphb-calendar td .mphb-past-date {
  opacity: 0.35;
}

.fb-mphb-airbnb .mphb-calendar .datepick-month td .mphb-date-cell__price {
  display: none !important;
}

/* Guests */
.fb-mphb-airbnb .mphb-adults-wrapper,
.fb-mphb-airbnb .mphb-children-wrapper {
  grid-column: 1 / -1;
  margin: 0.75rem 0 0;
  padding: 0.65rem 0.7rem;
  border: 1px solid var(--mphb-airbnb-border);
  border-radius: var(--mphb-airbnb-radius);
}

.fb-mphb-airbnb .mphb-capacity-wrapper label {
  display: block;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.2rem;
}

.fb-mphb-airbnb .mphb-capacity-wrapper br {
  display: none;
}

.fb-mphb-airbnb .mphb-capacity-wrapper select {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  font-size: 0.875rem;
}

/* Reserve button */
.fb-mphb-airbnb .mphb-reserve-btn-wrapper {
  grid-column: 1 / -1;
  margin: 1rem 0 0;
}

.fb-mphb-airbnb .mphb-reserve-btn-wrapper .mphb-reserve-btn {
  width: 100%;
  border-radius: 8px;
  background: linear-gradient(to right, #e61e4d 0%, #e31c5f 50%, #d70466 100%);
  border: none;
  color: #fff;
  font-weight: 600;
  padding: 0.85rem 1rem;
  font-size: 1rem;
  cursor: pointer;
}

.fb-mphb-airbnb .mphb-reserve-btn-wrapper .mphb-reserve-btn:hover {
  filter: brightness(1.05);
}

/* Hide popup datepicker — use inline calendar only */
.fb-mphb-airbnb ~ .datepick-popup,
body .datepick-popup {
  z-index: 99999;
}

/* Period price when dates selected */
.fb-mphb-airbnb .mphb-period-price:not(.mphb-hide) {
  grid-column: 1 / -1;
  margin: 0.75rem 0 0;
  font-size: 0.95rem;
  color: var(--fb-text, #222);
}

@media (max-width: 960px) {
  .fb-mphb-airbnb .mphb-calendar .datepick-month-row {
    display: block !important;
  }
}
