/* ============================================================
   Rentals — availability + pricing calendar
   Extends css/site.css (Preferred SHORE tokens)
   ============================================================ */

.rentals-intro { max-width: 680px; }

.unit-list { display: grid; gap: 56px; margin-top: 52px; }

.unit {
  background: var(--ps-white);
  border: 1px solid var(--ps-line);
  border-radius: 6px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

/* ---- header strip ------------------------------------------------------- */

.unit-head { display: grid; grid-template-columns: minmax(0, 430px) 1fr; }

.unit-photo { position: relative; background: var(--ps-slate); min-height: 240px; }
.unit-photo img { width: 100%; height: 100%; object-fit: cover; }

/* Units with no photos yet get a branded panel rather than a broken box. */
.unit-photo.placeholder {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(150deg, var(--ps-slate) 0%, var(--ps-slate-ink) 100%);
  color: var(--ps-sand); text-align: center; padding: 28px;
}
.unit-photo.placeholder span {
  font-family: 'Montserrat', sans-serif; font-size: 11.5px;
  letter-spacing: .26em; text-transform: uppercase; line-height: 1.9;
}

.unit-intro { padding: 30px 32px; }
.unit-intro h3 { font-size: 21px; margin-bottom: 6px; }
.unit-intro .unit-where { font-size: 14px; color: var(--ps-gray); margin-bottom: 14px; }
.unit-intro p { font-size: 16px; margin-bottom: 16px; }

.unit-specs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.unit-specs span {
  font-family: 'Montserrat', sans-serif; font-size: 11px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  border: 1px solid var(--ps-line); border-radius: 999px;
  padding: 5px 13px; color: var(--ps-slate);
}
.unit-specs span.pet { border-color: var(--ps-sand-deep); color: var(--ps-sand-deep); }

.unit-from { font-size: 17px; color: var(--ps-slate); }
.unit-from strong { font-family: 'Abril Fatface', Georgia, serif; font-size: 25px; }
.unit-from .on-request { color: var(--ps-gray); font-style: italic; font-size: 15.5px; }

/* ---- calendar + quote --------------------------------------------------- */

.unit-body {
  display: grid; grid-template-columns: 1fr 330px;
  gap: 34px; padding: 30px 32px 34px;
  border-top: 1px solid var(--ps-line);
}

.cal-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.cal-nav-label {
  font-family: 'Montserrat', sans-serif; font-size: 11.5px; font-weight: 600;
  letter-spacing: .24em; text-transform: uppercase; color: var(--ps-gray);
}
.cal-arrow {
  width: 34px; height: 34px; line-height: 1; font-size: 20px;
  border: 1px solid var(--ps-line); background: var(--ps-white);
  color: var(--ps-slate); border-radius: 4px; cursor: pointer;
}
.cal-arrow:hover:not(:disabled) { background: var(--ps-cream); border-color: var(--ps-sand); }
.cal-arrow:disabled { opacity: .3; cursor: default; }

.cal-months { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.cal-month-name {
  font-family: 'Montserrat', sans-serif; font-size: 12.5px; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase;
  text-align: center; margin-bottom: 10px;
}
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }

.cal-dow {
  font-family: 'Montserrat', sans-serif; font-size: 10px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--ps-gray); text-align: center; padding-bottom: 4px;
}

.cal-cell {
  position: relative; aspect-ratio: 1 / 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1px; padding: 2px;
  border: 1px solid transparent; border-radius: 4px;
  background: var(--ps-cream); color: var(--ps-slate);
  font-family: inherit; cursor: pointer; overflow: hidden;
}
.cal-cell.empty { background: none; border: none; cursor: default; }
.cal-num  { font-size: 13.5px; font-weight: 600; line-height: 1; }
.cal-rate { font-size: 9.5px; letter-spacing: .01em; color: var(--ps-gray); line-height: 1; }

.cal-cell.open:hover { background: var(--ps-sand-light); border-color: var(--ps-sand-deep); }

.cal-cell.past,
.cal-cell.loading   { background: var(--ps-white); color: #cfcdc7; cursor: default; }
.cal-cell.loading   { animation: calpulse 1.2s ease-in-out infinite; }
@keyframes calpulse { 0%,100% { opacity: 1; } 50% { opacity: .45; } }

.cal-cell.blocked {
  background: repeating-linear-gradient(135deg,
    #eceae5, #eceae5 4px, #e2dfd8 4px, #e2dfd8 8px);
  color: #b3b0a9; cursor: default;
}
.cal-cell.blocked .cal-rate { display: none; }
.cal-cell.unknown { background: var(--ps-white); border-color: var(--ps-line); }

/* Free night whose previous night is booked — arrivals welcome, but someone
   checks out that morning. */
.cal-cell.changeover::before {
  content: ''; position: absolute; top: 0; left: 0;
  border-top: 12px solid var(--ps-sand-deep);
  border-right: 12px solid transparent;
}

.cal-cell.in-range { background: var(--ps-sand-light); }
.cal-cell.sel-start, .cal-cell.sel-end {
  background: var(--ps-slate); color: var(--ps-white); border-color: var(--ps-slate-ink);
}
.cal-cell.sel-start .cal-rate, .cal-cell.sel-end .cal-rate { color: var(--ps-sand-light); }

.cal-legend {
  display: flex; flex-wrap: wrap; gap: 18px; list-style: none;
  margin-top: 16px; font-size: 12.5px; color: var(--ps-gray);
}
.cal-legend li { display: flex; align-items: center; gap: 7px; }
.cal-legend i { width: 13px; height: 13px; border-radius: 3px; display: inline-block; }
.k-open    { background: var(--ps-cream); border: 1px solid var(--ps-line); }
.k-blocked { background: repeating-linear-gradient(135deg,#eceae5,#eceae5 3px,#e2dfd8 3px,#e2dfd8 6px); }
.k-changeover { background: var(--ps-cream); border: 1px solid var(--ps-line); position: relative; }
.k-changeover::before {
  content: ''; position: absolute; top: 0; left: 0;
  border-top: 7px solid var(--ps-sand-deep); border-right: 7px solid transparent;
}

/* ---- quote panel --------------------------------------------------------- */

.quote {
  background: var(--ps-cream); border: 1px solid var(--ps-line);
  border-radius: 6px; padding: 22px; align-self: start;
}
.quote-empty, .quote-ask { font-size: 15.5px; color: var(--ps-gray); }

.quote-dates {
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; gap: 10px;
  padding-bottom: 16px; margin-bottom: 16px;
  border-bottom: 1px solid var(--ps-line);
}
.qlbl {
  display: block; font-family: 'Montserrat', sans-serif; font-size: 10px;
  font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--ps-gray);
}
.quote-dates strong { font-size: 15px; }
.qarrow { color: var(--ps-sand-deep); font-size: 18px; }

.quote-tag {
  font-family: 'Montserrat', sans-serif; font-size: 10.5px; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; color: var(--ps-sand-deep);
  margin-bottom: 12px;
}
.quote-rows { margin-bottom: 12px; }
.qrow { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; padding: 5px 0; }
.qrow em { font-style: normal; color: var(--ps-gray); font-size: 13px; }
.qrow.qdisc { color: #2f6b45; }
.qrow.qtotal {
  border-top: 1px solid var(--ps-line); margin-top: 8px; padding-top: 12px;
  font-family: 'Montserrat', sans-serif; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em; font-size: 15px;
}
.quote-fine { font-size: 12.5px; color: var(--ps-gray); line-height: 1.5; margin: 10px 0 16px; }

.cal-warn {
  background: #fdf6e6; border-left: 3px solid var(--ps-sand-deep);
  padding: 10px 12px; font-size: 13.5px; line-height: 1.55;
  color: var(--ps-slate); margin: 12px 0;
}

.quote-cta { width: 100%; justify-content: center; text-align: center; }
.quote-cta:disabled { opacity: .4; cursor: not-allowed; transform: none; }
.quote-clear {
  display: block; width: 100%; margin-top: 10px; padding: 6px;
  background: none; border: none; cursor: pointer;
  font-family: 'Montserrat', sans-serif; font-size: 11px; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; color: var(--ps-gray);
}
.quote-clear:hover { color: var(--ps-slate); }

/* ---- request form -------------------------------------------------------- */

.booking-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 56px; align-items: start; }
.booking-summary {
  background: rgba(255,255,255,.1); border-left: 3px solid var(--ps-sand);
  padding: 14px 16px; margin-bottom: 20px; font-size: 15.5px; line-height: 1.6;
}
.booking-form {
  background: var(--ps-white); color: var(--ps-slate);
  padding: 32px; border-radius: 6px; box-shadow: var(--shadow-md);
}
.booking-form h3 { font-size: 19px; margin-bottom: 6px; }

.howto { list-style: none; counter-reset: s; margin-top: 26px; }
.howto li { counter-increment: s; position: relative; padding-left: 46px; margin-bottom: 22px; }
.howto li::before {
  content: counter(s, decimal-leading-zero); position: absolute; left: 0; top: -2px;
  font-family: 'Abril Fatface', Georgia, serif; font-size: 21px; color: var(--ps-sand);
}
.howto h4 { font-size: 14px; margin-bottom: 5px; }
.sec-slate .howto p { color: rgba(255,255,255,.82); font-size: 15.5px; }

/* ---- responsive ---------------------------------------------------------- */

@media (max-width: 1080px) {
  .unit-body { grid-template-columns: 1fr; }
  .quote { max-width: 420px; }
}
@media (max-width: 900px) {
  .unit-head { grid-template-columns: 1fr; }
  .unit-photo { min-height: 200px; }
  .booking-grid { grid-template-columns: 1fr; gap: 34px; }
}
@media (max-width: 700px) {
  /* One month at a time — two side by side stops being legible here. */
  .cal-months { grid-template-columns: 1fr; }
  .cal-months .cal-month:last-child { display: none; }
  .unit-intro, .unit-body { padding-left: 20px; padding-right: 20px; }
  .booking-form { padding: 24px 20px; }
  .cal-rate { font-size: 9px; }
}

/* A day that is booked as a night but still valid as a CHECK-OUT (the next
   guest arrives that morning). Half sand, half hatched, to read as "you may
   leave on this day, you may not stay it". */
.cal-cell.checkout-only {
  cursor: pointer; color: var(--ps-slate);
  background:
    linear-gradient(to bottom right, var(--ps-cream) 0 49.5%, transparent 50.5% 100%),
    repeating-linear-gradient(135deg, #eceae5, #eceae5 4px, #e2dfd8 4px, #e2dfd8 8px);
  border-color: var(--ps-sand-deep);
}
.cal-cell.checkout-only:hover { border-color: var(--ps-slate); }

/* Free night, but reaching it would jump over a booking. */
.cal-cell.unreachable { background: var(--ps-white); color: #d5d3cd; cursor: default; }
.cal-cell.unreachable .cal-rate { display: none; }

.k-checkout {
  background:
    linear-gradient(to bottom right, var(--ps-cream) 0 49.5%, transparent 50.5% 100%),
    repeating-linear-gradient(135deg, #eceae5, #eceae5 3px, #e2dfd8 3px, #e2dfd8 6px);
  border: 1px solid var(--ps-sand-deep);
}

/* Shown when a home is solidly booked through the months on screen. */
.next-avail {
  display: block; margin-top: 4px;
  font-family: 'Montserrat', sans-serif; font-size: 11px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--ps-sand-deep);
}

/* ---- gallery ------------------------------------------------------------- */

.unit-gallery { display: flex; flex-direction: column; background: var(--ps-slate-ink); }

.ug-main {
  position: relative; display: block; padding: 0; border: 0; cursor: pointer;
  background: var(--ps-slate); overflow: hidden; aspect-ratio: 4 / 3;
}
.ug-main img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.ug-main:hover img { transform: scale(1.04); }
.ug-count {
  position: absolute; right: 10px; bottom: 10px;
  background: rgba(28,36,38,.78); color: var(--ps-white);
  font-family: 'Montserrat', sans-serif; font-size: 10.5px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  padding: 6px 12px; border-radius: 3px;
}

.ug-thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; background: var(--ps-slate-ink); }
.ug-thumb {
  position: relative; padding: 0; border: 0; cursor: pointer;
  background: var(--ps-slate); aspect-ratio: 4 / 3; overflow: hidden;
}
.ug-thumb img { width: 100%; height: 100%; object-fit: cover; opacity: .92; transition: opacity .25s; }
.ug-thumb:hover img { opacity: 1; }
.ug-more::after {
  content: ''; position: absolute; inset: 0; background: rgba(28,36,38,.62);
}
.ug-more span {
  position: absolute; inset: 0; z-index: 1;
  display: flex; align-items: center; justify-content: center;
  color: var(--ps-white); font-family: 'Abril Fatface', Georgia, serif; font-size: 20px;
}

/* ---- lightbox ------------------------------------------------------------ */

/* A class selector beats the UA's [hidden]{display:none}, so the attribute
   alone would never hide this. Must be stated explicitly. */
.lightbox[hidden] { display: none; }

.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(20,26,28,.95);
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 20px;
}
.lb-stage { max-width: 1200px; max-height: 100%; display: flex; flex-direction: column; gap: 12px; }
.lb-stage img {
  max-width: 100%; max-height: calc(100vh - 130px);
  object-fit: contain; margin: 0 auto; border-radius: 3px;
}
.lb-stage figcaption {
  display: flex; justify-content: space-between; gap: 20px;
  color: rgba(255,255,255,.9); font-size: 14.5px;
}
.lb-num {
  font-family: 'Montserrat', sans-serif; font-size: 11.5px; font-weight: 600;
  letter-spacing: .16em; color: var(--ps-sand);
}
.lb-nav, .lb-close {
  background: rgba(255,255,255,.1); color: var(--ps-white);
  border: 1px solid rgba(255,255,255,.28); cursor: pointer; border-radius: 4px;
  flex: none;
}
.lb-nav { width: 46px; height: 74px; font-size: 30px; line-height: 1; }
.lb-close {
  position: absolute; top: 18px; right: 20px;
  width: 42px; height: 42px; font-size: 26px; line-height: 1;
}
.lb-nav:hover, .lb-close:hover { background: rgba(255,255,255,.22); }

@media (max-width: 700px) {
  .lightbox { padding: 12px; gap: 4px; }
  .lb-nav { width: 36px; height: 60px; font-size: 24px; }
  .lb-stage img { max-height: calc(100vh - 150px); }
}

/* Which dates a monthly rate actually covers. */
.season-note {
  display: block; margin-top: 4px;
  font-family: 'Montserrat', sans-serif; font-size: 11px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--ps-slate);
}

/* Refundable deposits and the no-cleaning-fee line: adjacent to the price,
   but visually separate so they never read as part of the total. */
.quote-deposits {
  margin-top: 16px; padding-top: 14px;
  border-top: 1px dashed var(--ps-line);
}
.qdep-head {
  font-family: 'Montserrat', sans-serif; font-size: 10px; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--ps-gray); margin-bottom: 6px;
}
.quote-deposits .qrow { font-size: 14px; padding: 3px 0; }
.quote-deposits .qrow em { display: block; font-size: 11.5px; }
.qrow.qfree span:last-child { color: #2f6b45; font-weight: 600; }

.from-sep { margin: 0 10px; color: var(--ps-gray); opacity: .6; }
