/*
 * The availability form (lib/booking.php). Plain CSS: the theme's gulp build has not
 * run since 2017. The look is the one the theme gave the old Pinpoint booking calendar
 * in this column (assets/styles/pages/_apartment-detail.scss, .booking-form): fields
 * with a 2px #2C2C2C border and 4px corners, a soft grey shadow, round buttons,
 * uppercase Montserrat 600, and a yellow (#F3BB00) button.
 */
.mp-book { display: grid; gap: 12px; text-align: left; }
.mp-book__field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.mp-book label, .mp-book__guest-label { margin: 0; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.mp-book input, .mp-book select {
  width: 100%; height: 44px; padding: 0 10px; border: 2px solid #2C2C2C; border-radius: 4px;
  background: #fff; color: #2C2C2C; font: inherit; font-size: 15px;
}
.mp-book input:focus, .mp-book select:focus { outline: 2px solid #F3BB00; outline-offset: 0; border-color: #F3BB00; }
.mp-book__go.btn { height: 48px; cursor: pointer; font-family: inherit; display: inline-flex; align-items: center; justify-content: center; }
.mp-book .btn-primary, .mp-book-dock .btn-primary { color: #000; }
.mp-book .btn-primary:hover, .mp-book .btn-primary:focus,
.mp-book-dock .btn-primary:hover, .mp-book-dock .btn-primary:focus { background: #2C2C2C; border-color: #2C2C2C; color: #fff; text-decoration: none; }

/*
 * The apartment's Book column: a card. One box holds both dates, split by a line; the
 * nights count under it; guests as steppers; the button; a line on what comes next.
 * On a wide screen it stays in view while the page scrolls.
 */
.mp-book--side {
  max-width: 380px; margin: 0 auto 40px; padding: 24px; gap: 16px;
  border: 0; border-radius: 4px; background: #fff; box-shadow: 0 0 10px rgba(153, 153, 153, .34);
}
/* Sticky below the theme's fixed nav (its height, which booking.js keeps in --mp-nav-h,
   includes the gradient shadow under it), plus 32px. */
@media (min-width: 768px) { .mp-book--side { position: sticky; top: calc(var(--mp-nav-h, 89px) + 32px); } }
/* The column's "Book" heading, inside the card: the theme's h2 (yellow line under it), smaller. */
body.apartment-template-default .booking-form .mp-book__title { margin: 0 0 4px; font-size: 1.25rem; text-align: center; }
body.apartment-template-default .booking-form .mp-book__title::after { width: 64px; }
.mp-book--side label, .mp-book__guest-label { color: #2C2C2C; }
.mp-book--side .mp-book__dates {
  display: grid; grid-template-columns: 1fr 1fr; border: 1px solid #e0e0e0; border-radius: 4px; overflow: hidden;
  transition: border-color .2s;
}
.mp-book--side .mp-book__dates:hover { border-color: #bdbdbd; }
.mp-book--side .mp-book__dates .mp-book__field { position: relative; padding: 10px 14px 8px; transition: background-color .2s; }
.mp-book--side .mp-book__dates .mp-book__field:hover { background: #fafafa; }
/* The half whose date the picker is choosing: a yellow line under it. */
.mp-book--side .mp-book__dates .mp-book__field::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: #F3BB00; transform: scaleX(0); transition: transform .2s;
}
.mp-book--side .mp-book__dates .mp-book__field:has([aria-expanded="true"])::after { transform: scaleX(1); }
.mp-book--side .mp-book__dates label { font-size: 11px; color: #666; }
.mp-book--side .mp-book__dates .mp-book__field + .mp-book__field { border-left: 1px solid #e0e0e0; }
.mp-book--side .mp-book__dates input { height: 32px; padding: 0; border: 0; font-weight: 600; }

.mp-book--side .mp-book__dates input:focus { outline: 0; }
.mp-book__nights { margin: -8px 0 0; font-size: 13px; color: #666; }
.mp-book__nights[data-set] { color: #2C2C2C; font-weight: 600; }
/*
 * Guests: each line its own light box (label left, stepper right), 8px apart; the
 * steppers are lighter than the date box so the dates and the button lead. The
 * button sits a step further down (24px) than the fields sit from each other (16px).
 */
.mp-book__guests { display: grid; gap: 8px; }
.mp-book__guest {
  display: grid; grid-template-columns: 1fr 32px 40px 32px; align-items: center; gap: 4px;
  min-height: 56px; padding: 8px 10px 8px 14px; border: 1px solid #e0e0e0; border-radius: 4px; background: #fff;
  transition: border-color .2s;
}
.mp-book__guest:hover, .mp-book__guest:focus-within { border-color: #bdbdbd; }
.mp-book__step {
  width: 32px; height: 32px; padding: 0; display: flex; align-items: center; justify-content: center;
  border: 1px solid #bdbdbd; border-radius: 50%; background: #fff; color: #2C2C2C;
  font-family: inherit; font-weight: 500; font-size: 18px; line-height: 1; cursor: pointer;
  transition: background-color .2s, border-color .2s, color .2s;
}
.mp-book__step:hover:not(:disabled), .mp-book__step:focus-visible { background: #F3BB00; border-color: #F3BB00; color: #000; }
.mp-book__step:disabled { color: #bdbdbd; border-color: #e5e5e5; cursor: default; }
.mp-book__guest input { height: 32px; padding: 0; border: 0; text-align: center; font-weight: 600; font-size: 16px; -moz-appearance: textfield; }
.mp-book__guest input::-webkit-inner-spin-button, .mp-book__guest input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.mp-book--side .mp-book__go { width: 100%; margin-top: 8px; }
.mp-book__note { margin: -4px 0 0; font-size: 12px; color: #666; text-align: center; }

/* The phone's booking bar, shown until the form is on screen. */
.mp-book-dock { display: none; }
@media (max-width: 767px) {
  .mp-book-dock:not([hidden]) {
    display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: #fff; box-shadow: 0 -4px 16px rgba(0, 0, 0, .12);
    transition: transform .25s;
  }
  .mp-book-dock[data-off] { transform: translateY(110%); }
  .mp-book-dock .mp-book__go { width: 100%; }
  .mp-book--side { margin-left: 0; margin-right: 0; max-width: none; }
}

/*
 * The home page: a white card that overlaps the bottom of the hero photo by 64px
 * (the band is transparent there), on the theme's dark band. Inside it, the heading
 * and one search bar: check-in | check-out | guests, split by thin lines, labels
 * inside the fields as on the apartment card, then the yellow button.
 */
body.home section.check-availability, .mp-search-band {
  position: relative; z-index: 2; margin-top: -64px; padding-top: 0; padding-bottom: 48px;
  background: linear-gradient(transparent 64px, #2C2C2C 64px);
}
.mp-book--bar {
  display: block; max-width: 1040px; margin: 0 auto; padding: 20px 24px 24px; text-align: left;
  background: #fff; border-radius: 4px; box-shadow: 0 0 10px rgba(153, 153, 153, .34), 0 16px 40px rgba(0, 0, 0, .18);
}
body .mp-book--bar .mp-book__title {
  margin: 0 0 14px; color: #2C2C2C; font-size: 15px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em;
}
body .mp-book--bar .mp-book__title::after { display: none; }
.mp-book__bar { display: grid; grid-template-columns: 2fr 1fr auto; align-items: stretch; gap: 12px; }
.mp-book--bar .mp-book__dates,
.mp-book--bar .mp-book__field--guests { border: 1px solid #e0e0e0; border-radius: 4px; transition: border-color .2s; }
.mp-book--bar .mp-book__dates:hover, .mp-book--bar .mp-book__field--guests:hover { border-color: #bdbdbd; }
.mp-book--bar .mp-book__dates { display: grid; grid-template-columns: 1fr 1fr; }
.mp-book--bar .mp-book__field { position: relative; padding: 10px 14px 8px; gap: 2px; transition: background-color .2s; }
.mp-book--bar .mp-book__field:hover { background: #fafafa; }
.mp-book--bar .mp-book__dates .mp-book__field + .mp-book__field { border-left: 1px solid #e0e0e0; }
.mp-book--bar label { font-size: 11px; color: #666; }
.mp-book--bar .mp-book__field::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: #F3BB00; transform: scaleX(0); transition: transform .2s;
}
.mp-book--bar .mp-book__field:has([aria-expanded="true"])::after { transform: scaleX(1); }
.mp-book--bar .mp-book__date, .mp-book__gsum {
  height: 28px; padding: 0 0 0 24px; border: 0; outline: 0; background: none; color: #2C2C2C;
  font: inherit; font-size: 15px; font-weight: 600; text-align: left; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 100%;
}
.mp-book--bar .mp-book__date {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%232C2C2C' stroke-width='1.8'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3C/svg%3E") left center no-repeat;
}
.mp-book__gsum {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%232C2C2C' stroke-width='1.8'%3E%3Ccircle cx='9' cy='8' r='3.5'/%3E%3Cpath d='M2.5 20c.6-3.6 3.2-5.5 6.5-5.5s5.9 1.9 6.5 5.5'/%3E%3Cpath d='M16 4.8a3.3 3.3 0 0 1 0 6.4M18 14.8c2 .7 3.2 2.5 3.5 5.2'/%3E%3C/svg%3E") left center no-repeat;
}
.mp-book--bar .mp-book__date::after, .mp-book__gsum::after { content: ''; position: absolute; inset: 0; } /* the whole field opens it */
.mp-book--bar .mp-book__field:has(:focus-visible) { background: #fafafa; }
.mp-book--bar .mp-book__go.btn { height: auto; min-height: 58px; padding: 0 32px; }

/* The guests popover, under the Guests field. */
.mp-book__gpop {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 20; width: 300px; padding: 16px;
  display: grid; gap: 12px; background: #fff; border-radius: 4px; box-shadow: 0 0 10px rgba(153, 153, 153, .34), 0 12px 32px rgba(0, 0, 0, .08);
}
.mp-book__gpop[hidden] { display: none; }
.mp-book__gpop .mp-book__guest-label { color: #2C2C2C; }
.mp-book__gdone.btn { height: 40px; color: #000; font-family: inherit; cursor: pointer; }
.mp-book__gdone.btn:hover, .mp-book__gdone.btn:focus { background: #2C2C2C; border-color: #2C2C2C; color: #fff; }

/* Tablet: dates across, then guests and the button. Phone: dates, guests, button stacked. */
@media (max-width: 991px) {
  .mp-book__bar { grid-template-columns: 1fr 1fr; }
  .mp-book--bar .mp-book__dates { grid-column: 1 / -1; }
}
@media (max-width: 767px) {
  body.home section.check-availability, .mp-search-band { margin-top: -40px; padding-bottom: 32px; background: linear-gradient(transparent 40px, #2C2C2C 40px); }
  body.home section.check-availability > .container, .mp-search-band > .container { padding-left: 12px; padding-right: 12px; }
  .mp-book--bar { padding: 16px; }
  body .mp-book--bar .mp-book__title { font-size: 13px; margin-bottom: 10px; }
  .mp-book__bar { grid-template-columns: 1fr; gap: 10px; }
  .mp-book--bar .mp-book__go.btn { min-height: 52px; }
  .mp-book__gpop { left: 0; right: 0; width: auto; }
}

/* The date buttons datepicker.js puts in place of the date fields. */
.mp-book__date {
  width: 100%; height: 44px; padding: 0 10px; border: 2px solid #2C2C2C; border-radius: 4px; background: #fff;
  color: #2C2C2C; font: inherit; font-size: 15px; font-weight: 600; text-align: left; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mp-book__date[data-empty] { font-weight: 400; color: #666; }
.mp-book__date:focus-visible { outline: 2px solid #F3BB00; outline-offset: 0; border-color: #F3BB00; }
.mp-book--side .mp-book__dates .mp-book__date {
  height: 28px; padding: 0 0 0 24px; border: 0; outline: 0; font-size: 15px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%232C2C2C' stroke-width='1.8'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3C/svg%3E") left center no-repeat;
}
.mp-book--side .mp-book__dates .mp-book__date::after { content: ''; position: absolute; inset: 0; } /* the whole half opens the picker */
.mp-book--side .mp-book__dates .mp-book__date:focus-visible { box-shadow: none; }
.mp-book--side .mp-book__dates .mp-book__field:has(.mp-book__date:focus-visible) { background: #fafafa; }

/*
 * The picker (assets/booking/datepicker.js, ported from Atlantic Prestige). The look of
 * the old booking calendar: the soft grey shadow, round nav buttons, month names in
 * uppercase Montserrat 600; the stay's ends in yellow, the nights between in pale yellow.
 */
.mp-dp[hidden] { display: none; }
.mp-dp { font-family: 'Montserrat', sans-serif; color: #2C2C2C; }
.mp-dp__pop {
  position: absolute; z-index: 1500; width: 640px; max-width: calc(100vw - 32px); padding: 20px 24px 16px;
  background: #fff; border-radius: 4px; box-shadow: 0 0 10px rgba(153, 153, 153, .34), 0 12px 32px rgba(0, 0, 0, .08);
}
.mp-dp__months { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.mp-dp__navs { display: flex; justify-content: space-between; height: 0; position: relative; z-index: 1; }
.mp-dp__nav {
  width: 36px; height: 36px; margin-top: -6px; padding: 0; display: flex; align-items: center; justify-content: center;
  border: 2px solid #2C2C2C; border-radius: 50%; background: #fff; color: #2C2C2C; cursor: pointer; transition: background-color .2s, border-color .2s;
}
.mp-dp__nav:disabled { opacity: .3; cursor: default; }
.mp-dp__nav:not(:disabled):hover, .mp-dp__nav:focus-visible { background: #F3BB00; border-color: #F3BB00; color: #000; }
.mp-dp__mname { margin: 0 0 12px; text-align: center; font-size: 14px; font-weight: 600; line-height: 24px; text-transform: uppercase; letter-spacing: .04em; }
.mp-dp__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px 0; }
.mp-dp__wd { height: 28px; display: flex; align-items: center; justify-content: center; font-size: 12px; color: #666; text-transform: capitalize; }
.mp-dp__d {
  height: 40px; padding: 0; display: flex; align-items: center; justify-content: center;
  border: 0; border-radius: 0; background: none; color: #2C2C2C; font: inherit; font-size: 14px; cursor: pointer;
}
.mp-dp__d:not(:disabled):hover { box-shadow: inset 0 0 0 2px #2C2C2C; border-radius: 4px; }
.mp-dp__d:disabled { color: #999; opacity: .5; cursor: default; }
.mp-dp__d.is-today { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.mp-dp__d.is-mid { background: #FDF1C7; }
.mp-dp__d.is-start, .mp-dp__d.is-end { background: #F3BB00; color: #000; font-weight: 700; }
.mp-dp__d.is-start { border-radius: 4px 0 0 4px; }
.mp-dp__d.is-end { border-radius: 0 4px 4px 0; }
.mp-dp__d.is-start.is-end { border-radius: 4px; }
.mp-dp__d:focus-visible { outline: 2px solid #2C2C2C; outline-offset: -2px; }
.mp-dp__foot { display: flex; align-items: center; gap: 20px; margin-top: 16px; padding-top: 14px; border-top: 1px solid #e5e5e5; }
.mp-dp__stay { flex: 1; margin: 0; font-size: 14px; font-weight: 600; }
.mp-dp__clear { min-height: 44px; padding: 0; border: 0; background: none; color: #2C2C2C; font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; }
.mp-dp__done.btn { height: 44px; padding: 0 24px; color: #000; font-family: inherit; cursor: pointer; }
.mp-dp__done.btn:hover, .mp-dp__done.btn:focus { background: #2C2C2C; border-color: #2C2C2C; color: #fff; }
.mp-dp__done.btn:disabled { opacity: .4; cursor: default; background: #F3BB00; color: #000; }

/* Phone: a sheet from the bottom over a veil, one month. */
.mp-dp--phone { position: fixed; inset: 0; z-index: 2100; }
.mp-dp__veil { position: absolute; inset: 0; background: rgba(0, 0, 0, .5); }
.mp-dp__sheet {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: 100%; overflow-y: auto;
  background: #fff; border-radius: 12px 12px 0 0; padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  box-shadow: 0 -12px 32px rgba(0, 0, 0, .18);
}
.mp-dp__top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.mp-dp__h { margin: 0; font-size: 16px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.mp-dp__x { width: 44px; height: 44px; margin-right: -10px; padding: 0; display: flex; align-items: center; justify-content: center; border: 0; background: none; color: #2C2C2C; cursor: pointer; }
.mp-dp__sheet .mp-dp__nav { width: 40px; height: 40px; margin-top: -8px; }
.mp-dp__sheet .mp-dp__d { height: 44px; font-size: 15px; }
.mp-dp__sheet .mp-dp__foot { flex-wrap: wrap; gap: 12px 16px; }
.mp-dp__sheet .mp-dp__stay { flex-basis: 100%; }
.mp-dp__sheet .mp-dp__done { flex: 1; }

/* The Apartments listing (template-apartments.php, MPA-10): the search band as on the home page, two buttons per card. */
.mp-search-band + .container { padding-top: 48px; }
/* The listing sits inside the page container: the band's dark runs to the screen edges
   by a spread shadow, clipped above the overlap (no 100vw, so no sideways scroll). */
.mp-search-band.mp-search-band { background: none; }
.mp-search-band::before {
  content: ''; position: absolute; z-index: -1; top: 64px; right: 0; bottom: 0; left: 0;
  background: #2C2C2C; box-shadow: 0 0 0 100vmax #2C2C2C; clip-path: inset(0 -100vmax);
}
@media (max-width: 767px) { .mp-search-band::before { top: 40px; } }
.mp-card-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 1rem; }
.mp-card-actions .btn { min-width: 0; display: inline-flex; align-items: center; justify-content: center; height: 46px; padding: 0 24px; }
.mp-card-actions .btn-primary { color: #000; }
.mp-card-actions .btn-primary:hover, .mp-card-actions .btn-primary:focus { background: #2C2C2C; border-color: #2C2C2C; color: #fff; text-decoration: none; }
