/* ============================================================
   My Booking Flow: property detail page (step 4)
   Loaded only on /properties/{id}/. Everything is scoped under
   .mpf-wrap so it can't leak into Astra/Elementor. Selectors have
   three classes on purpose, so they out-rank theme heading,
   button and select styles.
   ============================================================ */

.mpf-wrap.mpf-wrap--detail   { max-width: 72rem; }
.mpf-wrap.mpf-wrap--overlays { max-width: none; margin: 0; padding: 0; }
body.mpf-no-scroll { overflow: hidden !important; }

.mpf-wrap .mpf-detail,
.mpf-wrap .mpf-overlays { font-size: 1rem; line-height: 1.5; text-align: left; }

/* Title */
.mpf-wrap .mpf-detail .mpf-d-title {
  margin: 0 0 1.5rem; font-family: var(--mpf-sans);
  font-size: 1.875rem; line-height: 2.25rem; font-weight: 700; color: #1A385D;
}

/* ---------- Gallery ---------- */
.mpf-wrap .mpf-detail .mpf-gallery {
  position: relative; display: flex; flex-direction: column; gap: .5rem;
  height: 400px; border-radius: .75rem; overflow: hidden;
}
.mpf-wrap .mpf-detail .mpf-gallery__main { width: 100%; height: 50%; overflow: hidden; }
.mpf-wrap .mpf-detail .mpf-gallery__side {
  width: 100%; height: 50%; display: grid; gap: .5rem;
  grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr));
}
@media (min-width: 768px) {
  .mpf-wrap .mpf-detail .mpf-gallery { flex-direction: row; height: 500px; }
  .mpf-wrap .mpf-detail .mpf-gallery__main,
  .mpf-wrap .mpf-detail .mpf-gallery__side { width: 50%; height: 100%; }
}
.mpf-wrap .mpf-detail .mpf-gallery__cell { position: relative; width: 100%; height: 100%; min-height: 0; overflow: hidden; }
.mpf-wrap .mpf-detail .mpf-gallery__item { display: block; width: 100%; height: 100%; overflow: hidden; cursor: pointer; }
.mpf-wrap .mpf-detail .mpf-gallery__item img {
  display: block; width: 100%; height: 100%; max-width: none;
  object-fit: cover; transition: transform .3s ease;
}
.mpf-wrap .mpf-detail .mpf-gallery__item:hover img { transform: scale(1.05); }
.mpf-wrap .mpf-detail .mpf-gallery__blank { width: 100%; height: 100%; background: #e5e7eb; }
.mpf-wrap .mpf-detail .mpf-gallery__noimg {
  display: flex; align-items: center; justify-content: center; width: 100%; height: 100%;
  background: #e5e7eb; color: #9ca3af; font-size: .875rem;
}
.mpf-wrap .mpf-detail .mpf-gallery__all {
  position: absolute; right: 1rem; bottom: 1rem; z-index: 10;
  padding: .5rem 1rem; border-radius: .5rem;
  background: rgba(17,24,39,.7); border: 1px solid rgba(255,255,255,.2); color: #fff;
  font-size: .875rem; line-height: 1.25rem; font-weight: 600;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); transition: background-color .15s;
}
.mpf-wrap .mpf-detail .mpf-gallery__all:hover { background: rgba(17,24,39,.9); color: #fff; }

/* ---------- Layout ---------- */
.mpf-wrap .mpf-detail .mpf-d-layout {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.5rem; align-items: start; margin-top: 3rem;
}
.mpf-wrap .mpf-detail .mpf-d-main  { display: flex; flex-direction: column; gap: 2.5rem; min-width: 0; }
.mpf-wrap .mpf-detail .mpf-d-aside { min-width: 0; }
@media (min-width: 1024px) {
  .mpf-wrap .mpf-detail .mpf-d-layout { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mpf-wrap .mpf-detail .mpf-d-main   { grid-column: span 2 / span 2; }
  /* If Astra's header is sticky and covers the widget, raise this value */
  .mpf-wrap .mpf-detail .mpf-d-aside  { position: sticky; top: 1.5rem; }
}

/* Section links */
.mpf-wrap .mpf-detail .mpf-d-nav {
  display: flex; align-items: center; gap: 2rem; margin-bottom: -2rem; padding: 1rem 1.5rem;
  overflow-x: auto; white-space: nowrap; background: #e8d6bc; border-radius: .75rem;
  box-shadow: 0 1px 2px 0 rgba(0,0,0,.05); scrollbar-width: none; -ms-overflow-style: none;
}
.mpf-wrap .mpf-detail .mpf-d-nav::-webkit-scrollbar { display: none; }
.mpf-wrap .mpf-detail .mpf-d-nav a {
  color: #111827; font-size: .875rem; line-height: 1.5; font-weight: 500; text-decoration: none; transition: color .15s;
}
.mpf-wrap .mpf-detail .mpf-d-nav a:hover { color: #4b5563; text-decoration: none; }
@media (min-width: 768px) { .mpf-wrap .mpf-detail .mpf-d-nav a { font-size: 1rem; } }

/* Summary */
.mpf-wrap .mpf-detail .mpf-d-summary { padding: 0 1.5rem .5rem; border-bottom: 1px solid #e5e7eb; scroll-margin-top: 2.5rem; }
.mpf-wrap .mpf-detail .mpf-d-subtitle {
  margin: 0 0 .25rem; font-family: var(--mpf-serif);
  font-size: 1.5rem; line-height: 2rem; font-weight: 700; color: #111827;
}
.mpf-wrap .mpf-detail .mpf-d-stats {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem;
  font-size: .875rem; line-height: 1.25rem; color: #4b5563;
}
@media (min-width: 640px) {
  .mpf-wrap .mpf-detail .mpf-d-stats { gap: .75rem; font-size: 1rem; line-height: 1.5rem; }
}
.mpf-wrap .mpf-detail .mpf-d-stat { display: flex; align-items: center; }
.mpf-wrap .mpf-detail .mpf-d-stat .mpf-icon { margin-right: .375rem; }
.mpf-wrap .mpf-detail .mpf-d-stat--pets { color: #059669; font-weight: 500; }
.mpf-wrap .mpf-detail .mpf-d-dot { color: #d1d5db; font-size: .75rem; }

/* Cards */
.mpf-wrap .mpf-detail .mpf-d-card {
  padding: 1.5rem; background: #fff; border: 1px solid #f3f4f6; border-radius: .75rem;
  box-shadow: 0 1px 2px 0 rgba(0,0,0,.05); scroll-margin-top: 2.5rem;
}
.mpf-wrap .mpf-detail .mpf-d-card__title {
  margin: 0 0 1rem; font-family: var(--mpf-serif);
  font-size: 1.25rem; line-height: 1.75rem; font-weight: 700; color: #111827;
}
.mpf-wrap .mpf-detail .mpf-d-prose { color: #4b5563; white-space: pre-line; }
.mpf-wrap .mpf-detail .mpf-d-muted { margin: .75rem 0 0; font-size: .875rem; color: #6b7280; }

/* Amenities */
.mpf-wrap .mpf-detail .mpf-d-amen-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem 1.5rem; }
@media (min-width: 640px)  { .mpf-wrap .mpf-detail .mpf-d-amen-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .mpf-wrap .mpf-detail .mpf-d-amen-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.mpf-wrap .mpf-detail .mpf-d-amen { display: flex; align-items: center; color: #374151; font-size: .875rem; line-height: 1.25rem; }
.mpf-wrap .mpf-detail .mpf-d-amen .mpf-icon { width: 1.25rem; height: 1.25rem; margin-right: .75rem; color: #cdb9a2; }
.mpf-wrap .mpf-detail .mpf-d-amen span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mpf-wrap .mpf-detail .mpf-d-outline-btn {
  display: block; width: 100%; margin-top: 2rem; padding: .625rem 1.5rem;
  background: #fff; border: 1px solid #111827; border-radius: .5rem;
  color: #111827; font-size: .875rem; line-height: 1.25rem; font-weight: 600; text-align: center; transition: background-color .15s;
}
.mpf-wrap .mpf-detail .mpf-d-outline-btn:hover { background: #f9fafb; color: #111827; }
@media (min-width: 640px) { .mpf-wrap .mpf-detail .mpf-d-outline-btn { display: inline-block; width: auto; } }

/* Availability (read-only) */
.mpf-wrap .mpf-detail .mpf-d-avail-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; }
@media (min-width: 768px) { .mpf-wrap .mpf-detail .mpf-d-avail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.mpf-wrap .mpf-detail .mpf-d-mon__title {
  margin: 0 0 .75rem; font-family: inherit; text-align: center;
  font-size: .875rem; line-height: 1.25rem; font-weight: 600; color: #374151;
}
.mpf-wrap .mpf-detail .mpf-d-mon__wd {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr));
  margin-bottom: .5rem; padding-bottom: .25rem; border-bottom: 1px solid #e5e7eb;
  text-align: center; font-size: .75rem; font-weight: 500; color: #9ca3af;
}
.mpf-wrap .mpf-detail .mpf-d-mon__days {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); row-gap: .25rem;
  text-align: center; font-size: .75rem;
}
.mpf-wrap .mpf-detail .mpf-d-mon__cell { display: flex; align-items: center; justify-content: center; padding: .5rem 0; }
.mpf-wrap .mpf-detail .mpf-d-day { display: flex; align-items: center; justify-content: center; }
.mpf-wrap .mpf-detail .mpf-d-day--past { color: #e5e7eb; cursor: not-allowed; }
.mpf-wrap .mpf-detail .mpf-d-day--avail,
.mpf-wrap .mpf-detail .mpf-d-day--unavail { width: 1.75rem; height: 1.75rem; border-radius: 9999px; }
.mpf-wrap .mpf-detail .mpf-d-day--avail {
  font-weight: 500; color: #047857; background: rgba(236,253,245,.4); border: 1px solid rgba(209,250,229,.4);
}
.mpf-wrap .mpf-detail .mpf-d-day--unavail { color: #d1d5db; background: #f9fafb; user-select: none; }

/* ---------- Booking widget ---------- */
.mpf-wrap .mpf-detail .mpf-d-widget {
  position: relative; display: flex; flex-direction: column; gap: 1.5rem; padding: 1.5rem;
  background: #fff; border: 1px solid #f3f4f6; border-radius: 1rem; box-shadow: 0 25px 50px -12px rgba(0,0,0,.25);
}
.mpf-wrap .mpf-detail .mpf-d-price__amount { font-size: 1.5rem; line-height: 2rem; font-weight: 800; letter-spacing: -.025em; color: #111827; }
.mpf-wrap .mpf-detail .mpf-d-price__unit   { font-size: .875rem; color: #6b7280; }

.mpf-wrap .mpf-detail .mpf-d-label {
  display: block; font-size: 10px; line-height: 1.5; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase; color: #9ca3af;
}
.mpf-wrap .mpf-detail .mpf-d-value {
  display: block; margin-top: .125rem; font-size: .875rem; line-height: 1.25rem; font-weight: 500; color: #9ca3af;
}
.mpf-wrap .mpf-detail .mpf-d-value.is-set { color: #1f2937; }

.mpf-wrap .mpf-detail .mpf-d-picker { position: relative; }
.mpf-wrap .mpf-detail .mpf-d-trigger {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%;
  overflow: hidden; text-align: left; border: 1px solid #d1d5db; border-radius: .75rem; transition: border-color .15s;
}
.mpf-wrap .mpf-detail .mpf-d-trigger:hover { border-color: #9ca3af; }
.mpf-wrap .mpf-detail .mpf-d-trigger:focus-visible { outline: none; box-shadow: 0 0 0 2px #111827; }
.mpf-wrap .mpf-detail .mpf-d-trigger__cell { display: block; padding: .875rem; user-select: none; }
.mpf-wrap .mpf-detail .mpf-d-trigger__cell + .mpf-d-trigger__cell { border-left: 1px solid #d1d5db; }

.mpf-wrap .mpf-detail .mpf-d-dropdown {
  display: none; position: absolute; top: 100%; right: 0; z-index: 40;
  width: 320px; margin-top: .5rem; padding: 1rem;
  background: #fff; border: 1px solid #f3f4f6; border-radius: 1rem; box-shadow: 0 25px 50px -12px rgba(0,0,0,.25);
}
.mpf-wrap .mpf-detail .mpf-d-dropdown.is-open { display: block; }
@media (min-width: 640px)  { .mpf-wrap .mpf-detail .mpf-d-dropdown { width: 600px; padding: 1.5rem; } }
@media (min-width: 1024px) { .mpf-wrap .mpf-detail .mpf-d-dropdown { right: -1rem; } }

.mpf-wrap .mpf-detail .mpf-d-guests { display: block; margin: 0; padding: .875rem; border: 1px solid #d1d5db; border-radius: .75rem; }
.mpf-wrap .mpf-detail .mpf-d-guests:focus-within { box-shadow: 0 0 0 2px #111827; }
.mpf-wrap .mpf-detail .mpf-d-select {
  display: block; width: 100%; height: auto; min-height: 0; margin: .25rem 0 0; padding: 0;
  border: 0; border-radius: 0; box-shadow: none; outline: none;
  background-color: transparent; background-image: none;
  -webkit-appearance: menulist; appearance: auto;
  color: #1f2937; font-size: .875rem; line-height: 1.25rem; font-weight: 600; cursor: pointer;
}

.mpf-wrap .mpf-detail .mpf-d-alert {
  display: none; padding: .875rem; background: #fff1f2; color: #e11d48;
  border: 1px solid #ffe4e6; border-radius: .75rem;
  font-size: .75rem; line-height: 1rem; font-weight: 600;
  animation: mpf-pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;
}
.mpf-wrap .mpf-detail .mpf-d-alert.is-open { display: block; }
@keyframes mpf-pulse { 50% { opacity: .5; } }

.mpf-wrap .mpf-detail .mpf-d-invoice { display: none; flex-direction: column; gap: 1rem; padding-top: 1rem; border-top: 1px solid #f3f4f6; }
.mpf-wrap .mpf-detail .mpf-d-invoice.is-open { display: flex; }
.mpf-wrap .mpf-detail .mpf-d-nights {
  display: flex; justify-content: space-between; align-items: center; padding: .75rem;
  background: rgba(249,250,251,.8); border: 1px solid #f3f4f6; border-radius: .5rem;
  font-size: .875rem; line-height: 1.25rem; font-weight: 600; color: #1f2937;
}
.mpf-wrap .mpf-detail .mpf-d-badge { padding: .125rem .5rem; background: #e5e7eb; color: #374151; border-radius: .25rem; font-size: .75rem; line-height: 1rem; font-weight: 700; }
.mpf-wrap .mpf-detail .mpf-d-invoice__h {
  margin: .5rem 0 0; font-family: inherit; font-size: .75rem; line-height: 1rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: #9ca3af;
}
.mpf-wrap .mpf-detail .mpf-d-lines { display: flex; flex-direction: column; gap: .625rem; font-size: .875rem; line-height: 1.25rem; font-weight: 500; color: #4b5563; }
.mpf-wrap .mpf-detail .mpf-d-line { display: flex; justify-content: space-between; align-items: center; }
.mpf-wrap .mpf-detail .mpf-d-line__label  { text-transform: capitalize; color: #6b7280; }
.mpf-wrap .mpf-detail .mpf-d-line__amount { color: #111827; }
.mpf-wrap .mpf-detail .mpf-d-total {
  display: flex; justify-content: space-between; padding-top: 1rem; border-top: 1px solid #f3f4f6;
  font-size: 1rem; line-height: 1.5rem; font-weight: 700; color: #111827;
}

.mpf-wrap .mpf-detail .mpf-d-submit {
  display: block; width: 100%; padding: .875rem 1rem; background: #cdb9a2; color: #fff; border-radius: .75rem;
  font-size: .875rem; line-height: 1.25rem; font-weight: 600; text-align: center;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -2px rgba(0,0,0,.1); transition: all .15s;
}
.mpf-wrap .mpf-detail .mpf-d-submit:hover:not(:disabled) { background: #ce9336; color: #fff; }
.mpf-wrap .mpf-detail .mpf-d-submit:disabled { background: #f3f4f6; color: #9ca3af; cursor: not-allowed; }

/* ---------- Overlays (printed in the footer) ---------- */

/* Lightbox */
.mpf-wrap .mpf-overlays .mpf-lb {
  display: none; position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 100000;
  align-items: center; justify-content: center;
  background: rgba(3,7,18,.95); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); user-select: none;
}
.mpf-wrap .mpf-overlays .mpf-lb.is-open { display: flex; }
.mpf-wrap .mpf-overlays .mpf-lb__close { position: absolute; top: 1.5rem; right: 1.5rem; z-index: 50; padding: .5rem; color: #fff; }
.mpf-wrap .mpf-overlays .mpf-lb__close:hover { color: #d1d5db; }
.mpf-wrap .mpf-overlays .mpf-lb__close .mpf-icon { width: 2rem; height: 2rem; }
.mpf-wrap .mpf-overlays .mpf-lb__nav {
  position: absolute; top: 50%; z-index: 50; transform: translateY(-50%); display: flex; padding: .5rem;
  background: rgba(17,24,39,.4); border: 1px solid rgba(255,255,255,.1); border-radius: 9999px; color: #fff;
}
.mpf-wrap .mpf-overlays .mpf-lb__nav:hover { color: #d1d5db; }
.mpf-wrap .mpf-overlays .mpf-lb__nav .mpf-icon { width: 1.5rem; height: 1.5rem; }
.mpf-wrap .mpf-overlays .mpf-lb__nav--prev { left: 1rem; }
.mpf-wrap .mpf-overlays .mpf-lb__nav--next { right: 1rem; }
@media (min-width: 768px) {
  .mpf-wrap .mpf-overlays .mpf-lb__nav--prev { left: 2rem; }
  .mpf-wrap .mpf-overlays .mpf-lb__nav--next { right: 2rem; }
}
.mpf-wrap .mpf-overlays .mpf-lb__stage { display: flex; flex-direction: column; align-items: center; max-width: 95vw; padding: 0 1rem; }
.mpf-wrap .mpf-overlays .mpf-lb__stage img {
  display: block; width: auto; height: 60vh; max-width: 90vw;
  object-fit: cover; border-radius: .25rem; box-shadow: 0 25px 50px -12px rgba(0,0,0,.5);
}
@media (min-width: 768px) { .mpf-wrap .mpf-overlays .mpf-lb__stage img { height: 75vh; } }
.mpf-wrap .mpf-overlays .mpf-lb__counter { margin: 1rem 0 0; font-size: .75rem; line-height: 1rem; font-weight: 500; letter-spacing: .05em; color: #9ca3af; text-align: center; }

/* Amenities modal */
.mpf-wrap .mpf-overlays .mpf-am {
  display: none; position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 100000;
  align-items: center; justify-content: center; padding: 1rem;
  background: rgba(3,7,18,.5); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.mpf-wrap .mpf-overlays .mpf-am.is-open { display: flex; }
@media (min-width: 640px) { .mpf-wrap .mpf-overlays .mpf-am { padding: 1.5rem; } }
.mpf-wrap .mpf-overlays .mpf-am__panel {
  position: relative; display: flex; flex-direction: column; width: 100%; max-width: 42rem; max-height: 85vh;
  overflow: hidden; background: #fff; border-radius: 1rem; box-shadow: 0 25px 50px -12px rgba(0,0,0,.25);
}
.mpf-wrap .mpf-overlays .mpf-am__head {
  display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.5rem;
  background: #fff; border-bottom: 1px solid #f3f4f6;
}
.mpf-wrap .mpf-overlays .mpf-am__title { margin: 0; font-family: var(--mpf-serif); font-size: 1.25rem; line-height: 1.75rem; font-weight: 700; color: #111827; }
.mpf-wrap .mpf-overlays .mpf-am__close { display: flex; margin-right: -.5rem; padding: .5rem; border-radius: 9999px; color: #6b7280; transition: all .15s; }
.mpf-wrap .mpf-overlays .mpf-am__close:hover { background: #f3f4f6; color: #111827; }
.mpf-wrap .mpf-overlays .mpf-am__close .mpf-icon { width: 1.25rem; height: 1.25rem; }
.mpf-wrap .mpf-overlays .mpf-am__body { padding: 1.5rem; overflow-y: auto; overscroll-behavior: contain; }
.mpf-wrap .mpf-overlays .mpf-am__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem 2rem; }
@media (min-width: 640px) { .mpf-wrap .mpf-overlays .mpf-am__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.mpf-wrap .mpf-overlays .mpf-am__item {
  display: flex; align-items: flex-start; padding-bottom: 1rem; border-bottom: 1px solid #f9fafb;
  color: #374151; font-size: .875rem; line-height: 1.625;
}
.mpf-wrap .mpf-overlays .mpf-am__item:last-child { border-bottom: 0; }
@media (min-width: 640px) { .mpf-wrap .mpf-overlays .mpf-am__item { border-bottom: 0; } }
.mpf-wrap .mpf-overlays .mpf-am__item .mpf-icon { width: 1.25rem; height: 1.25rem; margin-right: .75rem; color: #10b981; }

/* Mobile sticky bar */
.mpf-wrap .mpf-overlays .mpf-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 9990;
  padding: .75rem 1.25rem max(env(safe-area-inset-bottom), 1rem);
  background: #fff; border-top: 1px solid #f3f4f6; box-shadow: 0 -8px 20px -5px rgba(0,0,0,.08);
  transform: translateY(120%); transition: transform .3s;
}
.mpf-wrap .mpf-overlays .mpf-bar.is-visible { transform: translateY(0); }
@media (min-width: 1024px) { .mpf-wrap .mpf-overlays .mpf-bar { display: none; } }
.mpf-wrap .mpf-overlays .mpf-bar__row { display: flex; align-items: center; justify-content: space-between; }
.mpf-wrap .mpf-overlays .mpf-bar__amount { font-size: 1.25rem; line-height: 1.75rem; font-weight: 800; letter-spacing: -.025em; color: #111827; }
.mpf-wrap .mpf-overlays .mpf-bar__unit   { font-size: .875rem; font-weight: 500; color: #6b7280; }
.mpf-wrap .mpf-overlays .mpf-bar__link   { display: block; margin-top: .125rem; color: #059669; font-size: .75rem; line-height: 1rem; font-weight: 700; text-decoration: underline; text-align: left; }
.mpf-wrap .mpf-overlays .mpf-bar__cta {
  padding: .75rem 2rem; background: #111827; color: #fff; border-radius: .75rem; font-weight: 600;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -2px rgba(0,0,0,.1); transition: background-color .15s;
}
.mpf-wrap .mpf-overlays .mpf-bar__cta:hover { background: #1f2937; color: #fff; }