/* Stutoro Homes — brand colors from the logo:
 * green #0F766E, dark grey #374151, light grey #9CA3AF.
 */
:root {
  --green: #0f766e;
  --green-dark: #0b5e57;
  --green-tint: #e6f4f2;
  --dark: #374151;
  --dark-2: #1f2937;
  --grey: #9ca3af;
  --grey-light: #e5e7eb;
  --bg: #ffffff;
  --bg-soft: #f9fafb;
  --text: #1f2937;
  --text-muted: #6b7280;
  --radius: 12px;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.18);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.hidden { display: none !important; }

a { color: var(--green); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--grey-light);
}
/* Header layout (Darren, 2026-11-17): centered logo on its own row,
 * Book a stay / Contact us as the tab row under it. No header phone
 * pill — Contact us leads guests to the tap-to-call number in the
 * Contact section. The bar stays compact so the banner and headline
 * arrive promptly. */
.header-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 10px;
  padding-bottom: 12px;
  gap: 10px;
}
.brand-logo { height: 76px; width: auto; display: block; }
.header-actions { display: flex; align-items: center; justify-content: center; gap: 12px; }
.header-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  white-space: nowrap;
}
/* Phone: same centered stack, logo a step smaller, and the two tabs
 * stretch to equal halves of the row — every target 48px tall, no
 * horizontal scrolling. */
@media (max-width: 640px) {
  .header-inner {
    padding-top: 8px;
    padding-bottom: 10px;
    gap: 8px;
  }
  .brand-logo { height: 56px; }
  .header-actions { width: 100%; }
  .header-book, .header-contact { flex: 1 1 45%; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  border: none;
  cursor: pointer;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
}
.btn-primary { background: var(--green); color: #fff; padding: 12px 26px; font-size: 16px; }
.btn-primary:hover { background: var(--green-dark); }
.btn-primary:disabled { background: var(--grey); cursor: wait; }
.btn-lg { padding: 14px 32px; font-size: 18px; }
.btn-block { width: 100%; }

/* ---------- Hero ---------- */
.hero { position: relative; aspect-ratio: 3 / 1; max-height: 400px; min-height: 240px; display: flex; align-items: center; overflow: hidden; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(rgba(31, 41, 55, 0.55), rgba(31, 41, 55, 0.35)); }
.hero-content { position: relative; color: #fff; padding: 32px 20px; }
.hero-content h1 { margin: 0; font-size: 44px; line-height: 1.1; font-weight: 800; }
@media (max-width: 640px) {
  .hero { aspect-ratio: 2 / 1; min-height: 200px; }
  .hero-content h1 { font-size: 30px; }
}

/* ---------- Filters ---------- */
.filters { padding: 20px 0 8px; }
.filters-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}
.filters-bar h2, .how-it-works h2 { margin: 0; font-size: 30px; color: var(--dark-2); }
.filter-controls { display: flex; flex-wrap: wrap; gap: 14px; }
.filter {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}
.filter select, .booking-panel select, .booking-panel input[type="date"],
.booking-panel input[type="text"], .booking-panel input[type="email"],
.booking-panel input[type="tel"] {
  font-family: inherit;
  font-size: 15px;
  color: var(--text);
  border: 1px solid var(--grey-light);
  border-radius: 8px;
  padding: 9px 10px;
  background: #fff;
  min-width: 150px;
}
.results-count { color: var(--text-muted); margin: 14px 0 0; }
.no-results { text-align: center; color: var(--text-muted); padding: 40px 0; }

/* ---------- Home cards ---------- */
.homes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
  padding: 24px 0 48px;
}
.home-card {
  border: 1px solid var(--grey-light);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.carousel { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--bg-soft); }
.carousel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: pointer;
  user-select: none;
  -webkit-user-drag: none;
}
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--dark);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.25);
}
.carousel-arrow:hover { background: #fff; }
.carousel-arrow.prev { left: 10px; }
.carousel-arrow.next { right: 10px; }
.photo-counter {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(31, 41, 55, 0.8);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  z-index: 2;
}
/* Room-name caption chip (curated photo sets): same pill as the
   counter, anchored bottom-left. Text lives in the UI only — it is
   never burned into the image files. */
.photo-caption {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: rgba(31, 41, 55, 0.8);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  z-index: 2;
}
/* Main-page home-card carousel only: room-name chip at about half size
   (Darren, 2026-11-16). Detail-modal and lightbox captions keep the base size. */
.home-card .photo-caption {
  font-size: 6px;
  padding: 2px 5px;
}
.carousel-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 2;
}
.carousel-dots button {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  cursor: pointer;
}
.carousel-dots button.active { background: #fff; }
.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.card-body h3 { margin: 0 0 2px; font-size: 20px; color: var(--dark-2); }
.card-location { margin: 0 0 8px; color: var(--text-muted); font-size: 14px; }
.card-stats { margin: 0 0 8px; font-size: 14px; color: var(--dark); }
.card-blurb {
  margin: 0 0 14px;
  font-size: 14px;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-footer { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-rate { font-size: 18px; font-weight: 800; color: var(--dark-2); }
.card-rate span { font-size: 13px; font-weight: 500; color: var(--text-muted); }
.card-rate small { display: block; font-size: 12px; font-weight: 600; color: var(--green); }
.btn-outline {
  background: #fff;
  color: var(--green);
  border: 2px solid var(--green);
  padding: 8px 18px;
  font-size: 14px;
}
.btn-outline:hover { background: var(--green-tint); }

/* ---------- How it works ---------- */
.how-it-works { background: var(--bg-soft); padding: 48px 0 56px; border-top: 1px solid var(--grey-light); }
.steps {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}
.steps li { background: #fff; border: 1px solid var(--grey-light); border-radius: var(--radius); padding: 20px; }
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-weight: 800;
  margin-bottom: 12px;
}
.steps h3 { margin: 0 0 6px; font-size: 17px; }
.steps p { margin: 0; font-size: 14px; color: var(--text-muted); }

/* ---------- Contact ---------- */
.contact-section { padding: 48px 0 56px; border-top: 1px solid var(--grey-light); }
.contact-inner { max-width: 640px; }
.contact-inner h2 { margin: 0; font-size: 30px; color: var(--dark-2); }
.contact-intro { color: var(--text-muted); margin: 8px 0 16px; }
.contact-methods { background: var(--green-tint); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 20px; }
.contact-methods p { margin: 4px 0; }
.contact-methods a { color: var(--green); font-weight: 700; }
#contact-form label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 12px; }
#contact-form input, #contact-form textarea {
  display: block; width: 100%; margin-top: 4px; padding: 10px 12px;
  border: 1px solid var(--grey-light); border-radius: 8px;
  font: inherit; font-weight: 400; color: var(--text); background: #fff;
}
#contact-form textarea { resize: vertical; }
#contact-form .form-row { margin-bottom: 0; }
#contact-form .form-row label { margin-bottom: 12px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--dark); color: #e5e7eb; padding: 40px 0; }
.footer-inner { text-align: center; }
.footer-logo { height: 72px; width: auto; background: #fff; border-radius: var(--radius); padding: 8px 14px; }
.footer-tagline { font-weight: 700; font-size: 17px; margin: 14px 0 6px; color: #fff; }
.site-footer a { color: #99f6e4; }
.footer-note { font-size: 13px; color: var(--grey); margin: 14px 0 0; }
/* Host entry point at the page bottom (Darren, 2026-11-17): small
 * and muted against the dark footer, with enough padding that the
 * host's tap still lands easily. */
.footer-host { margin: 16px 0 0; font-size: 13px; }
.footer-host a { color: var(--grey); display: inline-block; padding: 12px 10px; }
.footer-host a:hover { color: #99f6e4; }

/* ---------- Modals ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.7);
  z-index: 100;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: 24px 12px;
}
.modal {
  background: #fff;
  border-radius: var(--radius);
  width: 100%;
  max-width: 1100px;
  position: relative;
  box-shadow: var(--shadow-lg);
}
.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: #fff;
  color: var(--dark);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.25);
}
.detail-body {
  display: grid;
  /* minmax(0, …) + min-width: 0 on the children keep a large photo's
   * intrinsic size from blowing the column out wider than the modal
   * (the 2048px curated photos did exactly that on phones — the
   * detail view rendered huge and spilled off-screen, 2026-11-18). */
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 0;
}
.detail-gallery { padding: 20px 0 20px 20px; min-width: 0; }
.detail-main-photo { position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: var(--bg-soft); }
.detail-main-photo img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; }
.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--dark);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.25);
}
.gallery-arrow.prev { left: 12px; }
.gallery-arrow.next { right: 12px; }
.thumb-strip { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; padding-bottom: 4px; }
.thumb-strip img {
  width: 84px;
  height: 63px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  border: 2px solid transparent;
  flex-shrink: 0;
}
.thumb-strip img.active { border-color: var(--green); }
.detail-info { padding: 20px; grid-column: 1; min-width: 0; }
.detail-info h2 { margin: 0 0 4px; font-size: 28px; color: var(--dark-2); }
.detail-location { margin: 0 0 6px; color: var(--text-muted); }
.detail-stats { margin: 0 0 6px; font-weight: 600; }
.detail-rate { margin: 0; font-size: 20px; font-weight: 800; color: var(--dark-2); }
.detail-rate span { font-size: 14px; font-weight: 500; color: var(--text-muted); }
.detail-section { margin-top: 22px; }
.detail-section h3 { margin: 0 0 8px; font-size: 18px; color: var(--dark-2); }
.detail-section p { margin: 0 0 8px; }
/* The whole details block — About text down through the house
   rules — starts clamped to ~5 lines so the booking panel stays
   close; the toggle (shown only when the block overflows) expands
   all of it, stopping before the directions area (Darren,
   2026-11-18: the fold "goes all the way down until it gets to
   the direction area").
   The clamp is a plain max-height, NOT -webkit-line-clamp: the
   block holds block-level children, and line-clamp fails to clip
   those reliably — the text below the fold showed through
   (Darren, 2026-11-18). The fade at the bottom makes the cut
   read as intentional. */
.detail-more { position: relative; }
.detail-more > .detail-section:first-child { margin-top: 0; }
.detail-more.clamped {
  max-height: 7.5em; /* 5 lines at the body's 1.5 line-height */
  overflow: hidden;
}
.detail-more.clamped::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2.4em;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--bg));
  pointer-events: none;
}
.about-toggle {
  background: none;
  border: none;
  padding: 0;
  margin-top: 2px;
  font: inherit;
  font-weight: 700;
  color: var(--green);
  cursor: pointer;
  text-decoration: underline;
}
.detail-section ul { margin: 0; padding-left: 20px; }
.amenities { columns: 2; column-gap: 24px; }
.amenities li { font-size: 14px; margin-bottom: 3px; }
.check-times { font-size: 14px; color: var(--dark); }

/* ---------- Booking panel ---------- */
.booking-panel {
  grid-column: 2;
  grid-row: 1 / span 2;
  min-width: 0;
  border-left: 1px solid var(--grey-light);
  padding: 20px;
  background: var(--bg-soft);
  border-radius: 0 var(--radius) var(--radius) 0;
  position: sticky;
  top: 0;
  align-self: start;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
}
.booking-panel h3 { margin: 0 0 4px; font-size: 20px; }
/* The directions area's heading matches the detail sections'
   size and color — it is the booking app's "How far is it to
   where you're headed?" section (Darren, 2026-11-18). */
.booking-panel h3.distance-heading { font-size: 18px; color: var(--dark-2); margin: 0 0 8px; }
.booking-rate { margin: 0 0 16px; color: var(--text-muted); font-size: 14px; }
/* The "From" in the from-price label renders small so the dollar
   amount stays prominent (Darren, 2026-11-16). On the home cards
   and the detail header the generic span rules (.card-rate span,
   .detail-rate span) already shrink it; the booking-panel line is
   one uniform size, so it needs this rule of its own. */
.booking-rate .from-word { font-size: 11px; font-weight: 600; }
.booking-min-stay { margin: -4px 0 12px; color: var(--text-muted); font-size: 13px; }
/* Guest booking calendar (Darren, 2026-11-17): two stacked
   months, phone-first — the day number sits in a circle (today's
   is ringed in green) with the night's price in small print
   under it. Booked days are struck through and muted like past
   days; the picked check-in/check-out fill green with the range
   between them tinted, prices still readable throughout. */
.guest-calendar { margin: 0 0 12px; }
.calendar-caption { margin: 0 0 8px; font-size: 13px; color: var(--text-muted); }
.calendar-loading { margin: 0; padding: 18px 0; text-align: center; font-size: 14px; color: var(--text-muted); }
.calendar-selection { margin: 8px 0 0; font-size: 14px; font-weight: 600; color: var(--dark-2); }
/* The minimum-stay tooltip (Darren, 2026-11-17): a small
   white bubble directly above the picked check-in date —
   Airbnb-style, just "7-night minimum", no sentence. It is
   rendered inside the check-in cell and centred on it; on
   the grid's edge columns it aligns to the cell's edge
   instead, so it never pokes outside the calendar and
   scrolls the page sideways. Above a first-row date it
   overlaps the weekday header, still inside the calendar
   block. It never covers the tapped date itself and takes
   no taps. */
.cal-min-tip {
  position: absolute; left: 50%; bottom: calc(100% + 5px); transform: translateX(-50%);
  z-index: 3; pointer-events: none;
  padding: 3px 8px; border: 1px solid var(--grey-light); border-radius: 6px;
  background: var(--bg); box-shadow: var(--shadow);
  font-size: 12px; font-weight: 600; line-height: 1.25; color: var(--dark-2);
  white-space: nowrap;
}
.cal-min-tip::after {
  content: ""; position: absolute; left: 50%; bottom: -5px; margin-left: -4px;
  width: 7px; height: 7px; transform: rotate(45deg);
  background: var(--bg); border-right: 1px solid var(--grey-light); border-bottom: 1px solid var(--grey-light);
}
.cal-min-tip.tip-left { left: -2px; transform: none; }
.cal-min-tip.tip-left::after { left: 19px; margin-left: 0; }
.cal-min-tip.tip-right { left: auto; right: -2px; transform: none; }
.cal-min-tip.tip-right::after { left: auto; right: 19px; margin-left: 0; }
.cal-month { margin-bottom: 14px; }
.cal-month:last-child { margin-bottom: 0; }
.cal-month h4 { margin: 0 0 6px; text-align: center; font-size: 16px; color: var(--dark-2); }
.cal-weekdays, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-weekdays span { padding: 4px 0; text-align: center; font-size: 12px; font-weight: 600; color: var(--text-muted); }
.cal-day {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 54px; padding: 4px 0; margin: 0;
  background: none; border: none; border-radius: 10px;
  font: inherit; color: var(--text); cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.cal-day .cal-num {
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border: 2px solid transparent; border-radius: 50%;
  font-size: 15px; font-weight: 600; line-height: 1;
}
.cal-day .cal-price { margin-top: 2px; font-size: 11px; line-height: 1.1; color: var(--text-muted); }
.cal-day:hover:not(:disabled), .cal-day:focus-visible:not(:disabled) { background: var(--green-tint); }
.cal-day.is-today .cal-num { border-color: var(--green); }
.cal-day.is-past { opacity: 0.38; cursor: default; }
.cal-day.is-unavailable { color: var(--grey); cursor: default; }
.cal-day.is-unavailable .cal-num { text-decoration: line-through; }
.cal-day.is-inrange { background: var(--green-tint); border-radius: 0; }
.cal-day.is-inrange .cal-price { color: var(--dark); }
/* Endpoints: the band runs under them too (they carry
   is-inrange as well), and their emphasis is a dark disc on
   the number — the booking app's look — so the selection
   reads as one band from check-in through check-out
   (Darren, 2026-11-17). */
.cal-day.is-checkin .cal-num, .cal-day.is-checkout .cal-num { background: var(--green); color: #fff; }
.cal-day.is-checkin.is-today .cal-num, .cal-day.is-checkout.is-today .cal-num { border-color: #fff; }
.booking-panel label { display: block; font-size: 13px; font-weight: 600; color: var(--text-muted); margin-bottom: 12px; }
.booking-panel label input, .booking-panel label select { display: block; width: 100%; margin-top: 4px; }
.form-row { display: flex; gap: 10px; }
.form-row label { flex: 1; min-width: 0; }
.form-row input { min-width: 0; }
.payment-method { border: 1px solid var(--grey-light); border-radius: 8px; padding: 10px 12px; margin: 0 0 12px; }
.payment-method legend { font-size: 13px; font-weight: 600; color: var(--text-muted); padding: 0 4px; }
.payment-method label { display: block; margin: 6px 0; font-size: 14px; font-weight: 500; color: var(--text); cursor: pointer; }
.payment-method label input { display: inline-block; width: auto; margin: 0 6px 0 0; }
.payment-method .hint { color: var(--text-muted); font-size: 12px; }
.form-subhead { margin: 16px 0 8px; font-size: 17px; color: var(--dark-2); }
.price-estimate {
  background: #fff;
  border: 1px solid var(--grey-light);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 14px;
  font-size: 14px;
}
.price-estimate p { margin: 4px 0; }
.estimate-placeholder { color: var(--text-muted); }
.estimate-row { display: flex; justify-content: space-between; }
.estimate-total { display: flex; justify-content: space-between; font-weight: 800; font-size: 16px; border-top: 1px solid var(--grey-light); padding-top: 8px; margin-top: 8px !important; }
.estimate-note { color: var(--text-muted); font-size: 12px; }
.form-error { color: #b91c1c; font-size: 14px; font-weight: 600; margin: 0 0 10px; }
.form-status { color: var(--green); font-size: 14px; font-weight: 600; margin: 0 0 10px; }
/* Booking confirmation branding: the main logo, centered, at the top
 * of the on-screen confirmation once a booking request is created. */
.confirmation-brand { text-align: center; margin: 2px 0 10px; }
.confirmation-logo { height: 56px; width: auto; }
.booking-note { font-size: 12px; color: var(--text-muted); text-align: center; margin: 10px 0 0; }

/* ---------- Reviews ---------- */
.reviews-section {
  grid-column: 1 / -1;
  border-top: 1px solid var(--grey-light);
  padding: 20px;
}
.reviews-section h3 { margin: 0 0 6px; font-size: 20px; color: var(--dark-2); }
.reviews-summary { margin: 0 0 14px; color: var(--text-muted); }
.reviews-summary .stars, .review-head .stars { color: #f59e0b; letter-spacing: 2px; }
.review-card {
  border: 1px solid var(--grey-light);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 10px;
  background: var(--bg-soft);
}
.review-head { margin: 0 0 4px; }
.review-date { color: var(--text-muted); font-size: 13px; margin-left: 6px; }
.review-text { margin: 0; white-space: pre-wrap; }
#review-form { margin-top: 20px; max-width: 560px; }
#review-form h4 { margin: 0 0 10px; font-size: 16px; color: var(--dark-2); }
#review-form label { display: block; font-size: 13px; font-weight: 600; color: var(--text-muted); margin-bottom: 12px; }
#review-form label input, #review-form label textarea {
  display: block; width: 100%; margin-top: 4px;
  padding: 9px 10px; border: 1px solid var(--grey-light); border-radius: 8px;
  font: inherit; color: var(--text);
}
#review-form textarea { resize: vertical; }
#review-form .booking-note { text-align: left; }
.star-picker { border: none; padding: 0; margin: 0 0 12px; }
.star-picker legend { font-size: 13px; font-weight: 600; color: var(--text-muted); padding: 0; margin-bottom: 4px; }
.star-picker label { display: inline-block !important; margin: 0 2px 0 0 !important; cursor: pointer; }
.star-picker input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-picker .star { font-size: 28px; line-height: 1; color: var(--grey); }
.star-picker .star.lit { color: #f59e0b; }
.star-picker input:focus-visible + .star { outline: 2px solid var(--green); outline-offset: 2px; }

@media (max-width: 900px) {
  .detail-body { grid-template-columns: minmax(0, 1fr); }
  .detail-gallery { padding: 20px 20px 0; }
  .detail-info { grid-column: 1; }
  .booking-panel { grid-column: 1; grid-row: auto; border-left: none; border-top: 1px solid var(--grey-light); position: static; max-height: none; border-radius: 0 0 var(--radius) var(--radius); }
}

/* ---------- Area maps (Leaflet) ---------- */
/* The container gets its own stacking context (position + z-index) so
 * Leaflet's internal panes (z-index up to 1000) can never paint over
 * the sticky site header or the modal chrome. */
.leaflet-container {
  position: relative;
  z-index: 0;
  font-family: inherit;
  background: var(--green-tint);
}
/* Softened basemap tiles (the class is set on both maps' tile
 * layers): washes the standard OpenStreetMap colors down toward
 * the booking app's pale map look. Applied per tile image — a
 * uniform color filter, so tile edges stay seamless. Only the
 * tiles are filtered; markers, cards and controls sit in other
 * panes and keep their full color. */
.tiles-soft {
  filter: saturate(0.45) brightness(1.06) contrast(0.94);
}
.map-section { padding: 48px 0 16px; border-top: 1px solid var(--grey-light); }
.map-section h2 { margin: 0 0 14px; font-size: 24px; color: var(--dark-2); }
.map-intro { color: var(--text-muted); margin: 8px 0 16px; max-width: 640px; }
.map-canvas {
  height: 360px;
  border: 1px solid var(--grey-light);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.location-section {
  grid-column: 1 / -1;
  border-top: 1px solid var(--grey-light);
  padding: 20px;
}
.location-section h3 { margin: 0 0 10px; font-size: 20px; color: var(--dark-2); }
.location-section .map-canvas { height: 320px; box-shadow: none; }
.map-note { margin: 10px 0 0; font-size: 13px; color: var(--text-muted); }
/* Directions lookup ("Add address or location"): lives in the
   booking panel, directly above the booking form's date inputs, so
   it is always visible (Darren, 2026-11-16). The panel's shared
   input rule sets a min-width the flex row can't use, so the row's
   input re-asserts min-width: 0 below. */
.distance-form { margin: 0 0 16px; }
.booking-panel .distance-row input { min-width: 0; }
.distance-form label { display: block; font-size: 13px; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; }
.distance-row { display: flex; gap: 10px; position: relative; }
.distance-row input {
  flex: 1; min-width: 0;
  padding: 9px 10px; border: 1px solid var(--grey-light); border-radius: 8px;
  font: inherit; color: var(--text);
}
.distance-row .btn { flex: none; padding: 9px 18px; font-size: 14px; }
.distance-form .form-error { margin: 10px 0 0; }
.distance-suggestions {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 30;
  background: var(--bg); border: 1px solid var(--grey-light); border-radius: 8px;
  box-shadow: var(--shadow-lg); overflow: hidden;
}
.distance-suggestion {
  display: block; width: 100%; text-align: left;
  padding: 9px 10px; border: none; background: none;
  font: inherit; font-size: 14px; color: var(--text); cursor: pointer;
}
.distance-suggestion + .distance-suggestion { border-top: 1px solid var(--grey-light); }
.distance-suggestion:hover, .distance-suggestion.active { background: var(--bg-soft); }
/* The in-flight "Searching…" row: same box as a suggestion, but
   muted, italic and inert — feedback, not a pickable result. */
.distance-searching { color: var(--text-muted); font-style: italic; cursor: default; }
.distance-searching:hover { background: none; }
@media (max-width: 640px) {
  .distance-row { flex-direction: column; }
  .distance-row .btn { width: 100%; }
}
/* Price pill marker (a Leaflet divIcon): the span is centered on the
 * area point with a translate, so the pill size can stay content-driven. */
.price-marker { background: none; border: none; }
.price-pill {
  display: inline-block;
  transform: translate(-50%, -50%);
  background: #fff;
  color: var(--dark-2);
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--grey-light);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
  white-space: nowrap;
  cursor: pointer;
}
.price-marker:hover .price-pill, .price-pill:hover { background: var(--green); color: #fff; }
/* Brand pin marker (a Leaflet divIcon): the Stutoro pin sits just
 * above the price pill at each home's approximate area center. */
.brand-pin-marker { background: none; border: none; }
.map-pin-img { width: 28px; height: 28px; display: block; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.35)); }
/* Map home card marker (a Leaflet divIcon) — the booking app's map
 * look (Darren, 2026-11-18: "that map look is what makes the
 * site"): each home sits on the map as a small white card — photo,
 * name and From price — with a small tail pointing down at the
 * home's general area. The icon box is fixed at 178x56 and the
 * anchor puts the tail's tip on the area point. */
.map-card-marker { background: none; border: none; }
.map-home-card {
  display: flex; align-items: center; gap: 8px;
  width: 178px; height: 56px; box-sizing: border-box;
  background: #fff;
  border: 1px solid rgba(31, 41, 55, 0.14);
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(31, 41, 55, 0.22);
  padding: 5px 10px 5px 5px;
  position: relative;
  cursor: pointer;
}
.map-home-card::after {
  content: "";
  position: absolute; left: 50%; bottom: -5px;
  width: 10px; height: 10px;
  background: #fff;
  border-right: 1px solid rgba(31, 41, 55, 0.14);
  border-bottom: 1px solid rgba(31, 41, 55, 0.14);
  transform: translateX(-50%) rotate(45deg);
}
.map-home-card img {
  width: 44px; height: 44px; flex: none;
  object-fit: cover; border-radius: 8px;
}
.map-home-card-text { min-width: 0; }
.map-home-card-name {
  display: block;
  font-size: 13px; font-weight: 700; line-height: 1.25;
  color: var(--dark-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.map-home-card-rate {
  display: block;
  font-size: 11.5px; line-height: 1.25;
  color: var(--text-muted);
  white-space: nowrap;
}
.map-home-card-rate strong { color: var(--dark-2); font-size: 13px; }
/* Small brand pin before section headings (detail page + home-page
 * map heading) — one reusable class so the motif stays uniform. */
.heading-pin { width: 20px; height: 20px; vertical-align: middle; margin-right: 7px; position: relative; top: -2px; }
/* Brand pin before each property title (home cards, detail title):
   the transparent pin only — no background or chip. (The map popup
   card no longer carries one — Darren, 2026-11-17: it crowded the
   small card and pushed the wording right.) */
.title-pin { height: 1em; width: auto; vertical-align: -0.1em; margin-right: 7px; }
/* Popup card — kept deliberately small (Darren, 2026-11-17): the
   cards sit over the map, so they're compact — smaller photo,
   tighter padding, compact text — while the photo, name and
   From-price stay legible, phone-first. The whole card is the
   click target into the home's page, hence the pointer. */
.area-popup .leaflet-popup-content { margin: 0; line-height: 1.4; }
.area-popup .leaflet-popup-content-wrapper { border-radius: var(--radius); overflow: hidden; padding: 0; }
.map-popup-card { width: 172px; padding: 0 0 10px; cursor: pointer; }
.map-popup-card img { width: 100%; height: 86px; object-fit: cover; display: block; }
.map-popup-name { margin: 7px 10px 1px; font-size: 14px; font-weight: 800; color: var(--dark-2); }
.map-popup-rating { margin: 0 10px 2px; font-size: 12px; color: var(--dark); }
.map-popup-rating .stars { color: #f59e0b; letter-spacing: 2px; }
.map-popup-stats { margin: 0 10px 2px; font-size: 12px; color: var(--dark); }
.map-popup-rate { margin: 0 10px 7px; font-size: 14px; font-weight: 800; color: var(--dark-2); }
.map-popup-rate span { font-size: 11px; font-weight: 500; color: var(--text-muted); }
.map-popup-card .btn { margin: 0 10px; width: calc(100% - 20px); padding: 7px 10px; font-size: 13px; }
@media (max-width: 640px) {
  .map-canvas { height: 285px; }
  .location-section .map-canvas { height: 280px; }
}

/* ---------- Lightbox ---------- */
#lightbox { align-items: center; padding: 48px 12px; }
#lightbox-img { max-width: 94vw; max-height: 86vh; object-fit: contain; border-radius: var(--radius); }
.lightbox-close { position: fixed; top: 16px; right: 16px; }
.lightbox-arrow { position: fixed; }
.lightbox-arrow.prev { left: 16px; }
.lightbox-arrow.next { right: 16px; }
.lightbox-counter { position: fixed; bottom: 20px; right: 50%; transform: translateX(50%); }
.lightbox-caption { position: fixed; bottom: 54px; left: 50%; transform: translateX(-50%); }
