/* The public listing page — mynomadplan.app/stay/<slug>
   ──────────────────────────────────────────────────────────────────────────────
   Its own stylesheet because the page is its own document: somebody with no NomadPlan account
   lands here cold, often on a phone, and should not download the whole app's CSS to read it.
   index.html loads this too, for the night-picker rules the in-app pickers share.

   Warm paper ground rather than the app's cool white — this reads as somebody's home, not a table.
   Deliberately single-theme: it commits to one visual world, so every colour is set explicitly and
   nothing is left to borrow a host background. */

/* The page is its own document, so it brings its own buttons, inputs and hints — it does not load
   the app's stylesheet and must not look half-dressed without it. */
.btn { font: inherit; font-size: 14px; font-weight: 500; line-height: 1.2; cursor: pointer;
  padding: 9px 16px; border-radius: 10px; border: 1px solid #d8ddd9; background: #fff; color: #16211f;
  transition: border-color .15s, background .15s; }
.btn:hover { border-color: #b9c3bf; }
.btn:focus-visible { outline: 2px solid #0f766e; outline-offset: 2px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn-primary { background: #0f766e; border-color: #0f766e; color: #fff; font-weight: 600; }
.btn-primary:hover:not([disabled]) { background: #0c625b; border-color: #0c625b; }
.btn-sm { font-size: 13px; padding: 6px 12px; border-radius: 8px; }
.hint { font-size: 12px; color: #5f6f6c; margin: 4px 0 0; }

/* ── the public listing page ────────────────────────────────────────────────
   A page a stranger lands on cold, on a phone, having been sent a link by a friend. It has one job:
   show them the place honestly and let them ask for nights. Everything is arranged around the one
   card that does that, which stays with them down the page on a wide screen. */

/* The gate's cards, the loading state, and the one toast the page can raise. */
.stay-card { max-width: 460px; margin: 48px auto; background: #fff; border: 1px solid #e6e7e2;
  border-radius: 16px; padding: 26px; box-shadow: 0 8px 28px rgba(22, 33, 31, .07); color: #16211f; }
.stay-card h3 { margin: 0 0 8px; font-size: 19px; letter-spacing: -.01em; text-wrap: balance; }
.stay-card p { font-size: 14px; line-height: 1.55; }
.stay-card input, .stay-card textarea { width: 100%; box-sizing: border-box; margin-bottom: 8px;
  font: inherit; font-size: 15px; padding: 10px 12px; border: 1px solid #e6e7e2; border-radius: 9px;
  background: #fff; color: #16211f; }
.stay-card input:focus, .stay-card textarea:focus { outline: 2px solid #0f766e; outline-offset: -1px; border-color: #0f766e; }
.stay-card .btn { width: 100%; margin-top: 4px; padding: 11px 16px; }
.stay-loading { max-width: 560px; margin: 72px auto; text-align: center; color: #5f6f6c; }
.stay-loading div { font-size: 32px; }
.stay-toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 12px);
  background: #16211f; color: #fff; font-size: 14px; padding: 10px 18px; border-radius: 999px;
  opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s; z-index: 5000; }
.stay-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

.stay-page {
  --ink: #16211f; --muted: #5f6f6c; --faint: #94a3a0; --line: #e6e7e2;
  --paper: #fcfbf8; --card: #fff; --accent: #0f766e;
  width: 100%; max-width: 1060px; margin: 0 auto 72px; padding: 0 20px 20px; box-sizing: border-box;
  color: var(--ink); background: var(--paper);
}
.stay-page :is(h1, h2, h3) { text-wrap: balance; }
.stay-top { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 18px 0 10px; flex-wrap: wrap; }
.stay-brand { font-weight: 700; letter-spacing: -.01em; color: var(--accent); }
.stay-back { font: inherit; font-size: 13px; font-weight: 600; color: var(--accent); background: none;
  border: 1px solid var(--line); border-radius: 999px; padding: 5px 13px; cursor: pointer; }
.stay-back:hover { border-color: var(--accent); }
.stay-owner-pill a { color: var(--accent); font-weight: 600; }
.stay-owner-pill { font-size: 12px; color: var(--muted); background: #fff; border: 1px solid var(--line);
  border-radius: 999px; padding: 4px 11px; }
.stay-h1 { font-size: clamp(26px, 4vw, 38px); line-height: 1.1; letter-spacing: -.02em; margin: 6px 0 6px; }
.stay-facts { color: var(--muted); font-size: 14px; margin: 0 0 18px; }
.stay-facts b { color: var(--ink); font-weight: 600; }
.stay-dim { color: var(--muted); font-size: 13px; margin: 2px 0 0; }
.stay-note { white-space: pre-wrap; font-size: 14px; line-height: 1.55; margin: 4px 0 0; }

/* Pictures. One lead shot, up to three alongside — the count drives the row track. */
.stay-gallery { display: grid; grid-template-columns: 1.55fr 1fr; gap: 8px;
  grid-template-rows: repeat(var(--shots, 1), 1fr); aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; }
.stay-gallery.stay-gallery-one { grid-template-columns: 1fr; }
.stay-gallery-empty { display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: 26px 20px; font-size: 14px; color: var(--muted); text-align: center; flex-wrap: wrap;
  background: linear-gradient(135deg, #eef2f1, #e3ebe9); border-radius: 16px; }
.stay-gallery-empty span:first-child { font-size: 26px; }
.stay-shot { position: relative; padding: 0; border: 0; overflow: hidden; cursor: zoom-in;
  background: #eef2f1; display: block; }
.stay-shot-lead { grid-row: 1 / -1; }
.stay-shot img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.stay-shot:hover img { transform: scale(1.035); }
.stay-more { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 600;
  color: #fff; background: rgba(12, 24, 22, .46); font-size: 15px; }

.stay-lightbox { position: fixed; inset: 0; z-index: 4000; background: rgba(10, 16, 15, .93);
  display: grid; place-items: center; padding: 24px; }
.stay-lightbox[hidden] { display: none; }
.stay-lightbox figure { margin: 0; max-width: min(1100px, 92vw); text-align: center; position: relative; }
.stay-lightbox img { max-width: 100%; max-height: 78vh; border-radius: 10px; display: block; }
.stay-lightbox figcaption { color: #e2e8f0; font-size: 13px; margin-top: 10px; }
.stay-lb-count { position: absolute; left: 10px; bottom: 10px; color: #fff; font-size: 12px;
  background: rgba(0, 0, 0, .45); border-radius: 999px; padding: 3px 9px; }
.stay-lb-nav, .stay-lb-close { position: absolute; background: rgba(255, 255, 255, .12); color: #fff;
  border: 0; border-radius: 999px; width: 44px; height: 44px; font-size: 24px; line-height: 1; cursor: pointer; }
.stay-lb-nav:hover, .stay-lb-close:hover { background: rgba(255, 255, 255, .26); }
.stay-lb-prev { left: 16px; top: calc(50% - 22px); }
.stay-lb-next { right: 16px; top: calc(50% - 22px); }
.stay-lb-close { right: 16px; top: 16px; font-size: 18px; }

/* Two columns on a wide screen; the card follows you down. */
.stay-cols { display: grid; grid-template-columns: minmax(0, 1fr) 372px; gap: 48px; margin-top: 30px; align-items: start; }
.stay-main { min-width: 0; }
.stay-side { position: sticky; top: 20px; }
.stay-block { padding: 24px 0; border-top: 1px solid var(--line); }
.stay-block:first-child { border-top: 0; padding-top: 0; }
.stay-block h2 { font-size: 18px; letter-spacing: -.01em; margin: 0 0 10px; }
.stay-block h3 { font-size: 14px; margin: 14px 0 2px; }
.stay-summary { white-space: pre-wrap; font-size: 15px; line-height: 1.65; margin: 0; color: #2c3a38; }

.stay-hostline { display: flex; align-items: center; gap: 14px; }
.stay-hostline h2 { margin: 0; }
.stay-hostline p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.stay-avatar { width: 46px; height: 46px; flex: 0 0 46px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: #fff; font-weight: 600; font-size: 19px; }

/* Rooms are described here and chosen here, but booked in the one card. */
.stay-roomlist { display: grid; gap: 10px; }
.stay-roomcard { display: grid; gap: 3px; text-align: left; width: 100%; font: inherit; cursor: pointer;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; transition: border-color .15s, box-shadow .15s; }
.stay-roomcard:hover { border-color: #c9d2cf; }
.stay-roomcard.is-chosen { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.stay-roomcard.is-shut { cursor: default; background: #f6f6f2; border-style: dashed; opacity: .85; }
.stay-roomcard.is-shut:hover { border-color: var(--line); }
.stay-roomcard-shut { font-size: 11px; font-weight: 600; color: #92400e; background: #fffbeb;
  border-radius: 999px; padding: 3px 9px; white-space: nowrap; }
.stay-book-closed { text-align: center; }
.stay-book-closed b { display: block; font-size: 17px; margin-bottom: 6px; }
.stay-roomcard-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.stay-roomcard-top b { font-size: 15px; }
.stay-roomcard-rate { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stay-roomcard-rate small { font-weight: 400; color: var(--muted); }

.stay-know { display: grid; grid-template-columns: 128px 1fr; gap: 6px 14px; margin: 0; font-size: 14px; }
.stay-know dt { color: var(--muted); }
.stay-know dd { margin: 0; }

/* The visitor's own stays, and the introduction an accepted one earns. */
.stay-mine { display: grid; gap: 8px; margin-bottom: 22px; }
.stay-req { display: flex; align-items: flex-start; gap: 10px; background: var(--card);
  border: 1px solid var(--line); border-left: 3px solid #d7b34a; border-radius: 12px; padding: 12px 14px; font-size: 14px; }
.stay-req > span:nth-child(2) { flex: 1; display: grid; gap: 2px; }
.stay-req-mark { font-size: 15px; line-height: 1.4; }
.stay-req-line { color: var(--muted); font-size: 13px; }
.stay-req.stay-ok { border-left-color: var(--accent); }
.stay-req.stay-no { border-left-color: #cbd5d2; }
.stay-reveal { background: #f2f8f6; border: 1px solid #cfe5df; border-radius: 14px; padding: 18px 20px; margin-bottom: 22px; }
.stay-reveal h2 { margin-top: 0; }
.stay-contact-line { margin: 0 0 8px; font-size: 15px; }
.stay-contact-line a { color: var(--accent); font-weight: 600; }
.stay-pay { margin-top: 14px; padding-top: 12px; border-top: 1px solid #cfe5df; }
.stay-pay h3 { margin-top: 0; }
.stay-rules { margin-top: 16px; }
.stay-foot { border-top: 1px solid var(--line); margin-top: 34px; padding-top: 16px; font-size: 12px; color: var(--faint); }

/* The booking card. */
.stay-book { background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 20px; box-shadow: 0 8px 28px rgba(22, 33, 31, .07);
  display: flex; flex-direction: column; max-height: calc(100vh - 40px); }
/* min-height:0 is what lets a flex child actually shrink and scroll instead of overflowing. */
.stay-book-scroll { overflow-y: auto; flex: 1 1 auto; min-height: 0; margin: 0 -4px; padding: 0 4px; }
.stay-book-cta { flex: 0 0 auto; padding-top: 12px; margin-top: 10px; border-top: 1px solid var(--line); }
.stay-book-head { display: flex; align-items: baseline; gap: 6px; margin-bottom: 14px; }
.stay-book-head b { font-size: 22px; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.stay-pills { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.stay-pill { font: inherit; font-size: 13px; cursor: pointer; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; color: var(--muted); }
.stay-pill.is-on { border-color: var(--accent); background: var(--accent); color: #fff; font-weight: 600; }
.stay-rates { width: 100%; min-width: 0; border-collapse: collapse; font-size: 13px; margin-bottom: 4px; }
.stay-rates td { padding: 5px 0; border-bottom: 1px solid #f2f4f2; color: var(--muted); }
.stay-rates td:last-child { text-align: right; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.stay-seasonal-cell { color: var(--accent); }
.stay-rate-cut td { color: var(--accent); }
.stay-rate-cut td:last-child { font-weight: 700; }
.stay-rate-cut small { color: var(--muted); font-weight: 400; }
.stay-bill-cut td { color: var(--accent); }
.stay-bill-cut td:last-child { color: var(--accent); }
.stay-rates-note { margin-top: 6px; font-size: 12px; }
.stay-guests { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 14px; color: var(--muted); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin: 10px 0; }
.stay-guests input { width: 68px; text-align: right; }
.stay-quote { min-height: 24px; margin-bottom: 12px; }
.stay-when { margin: 0 0 8px; font-size: 14px; }
.stay-when .stay-dim { display: inline; margin-left: 6px; }
.stay-bill { width: 100%; min-width: 0; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.stay-bill td { padding: 5px 0; color: var(--muted); }
.stay-bill td:last-child { text-align: right; color: var(--ink); }
.stay-bill tfoot td { border-top: 1px solid var(--line); padding-top: 9px; font-weight: 700; color: var(--ink); font-size: 15px; }
.stay-go { width: 100%; padding: 12px; font-size: 15px; font-weight: 600; }
.stay-book textarea { width: 100%; box-sizing: border-box; margin-top: 10px; font-size: 13px; }
.stay-book-foot { margin-top: 8px; text-align: center; font-size: 12px; }
.stay-problem { font-size: 13px; color: #9a5b12; margin: 2px 0 0; }

/* Two months side by side: how far ahead someone is looking is the question they came with. */
.stay-cal { position: relative; margin: 6px 0 4px; }
.stay-cal-head { position: absolute; top: 0; right: 0; display: flex; gap: 4px; }
.stay-cal-nav { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line);
  background: #fff; cursor: pointer; font-size: 17px; line-height: 1; color: var(--muted); }
.stay-cal-nav:hover { border-color: #c9d2cf; color: var(--ink); }
.stay-cal-months { display: grid; gap: 18px; }
.stay-cal-hint { margin-top: 8px; font-size: 12px; }
.night-picker.np-month { margin: 0; padding: 0; border: 0; background: none; }
.night-picker.np-month .np-title { font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.night-picker.np-month .np-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.night-picker.np-month .np-cell { width: auto; height: 36px; border-radius: 8px; }
.night-picker .np-dow { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px;
  font-size: 10px; font-weight: 600; color: var(--faint, #94a3a0); text-align: center; margin-bottom: 4px; }
/* Inside the month but outside every window: never offered, which is not the same as taken. */
.night-picker .np-cell.np-out, .night-picker .np-cell.np-blank {
  background: transparent; border-color: transparent; cursor: default; }
.night-picker .np-cell.np-out .np-day { color: #d8ded9; text-decoration: line-through; }
.night-picker .np-cell.np-out:hover, .night-picker .np-cell.np-blank:hover {
  background: transparent; border-color: transparent; }
.night-picker.np-month .np-cell.np-selected { background: #e6f3f0; border-color: #e6f3f0; }
.night-picker.np-month .np-cell.np-selected .np-day { color: #0f766e; font-weight: 600; }
.night-picker.np-month .np-cell.np-edge { background: #0f766e; border-color: #0f766e; }
.night-picker.np-month .np-cell.np-edge .np-day { color: #fff; }

@media (max-width: 900px) {
  .stay-cols { grid-template-columns: 1fr; gap: 0; }
  /* One column: the page scrolls, so the card is an ordinary block again. */
  .stay-side { position: static; margin-top: 24px; }
  .stay-book { max-height: none; }
  .stay-book-scroll { overflow: visible; }
  .stay-gallery { aspect-ratio: 4 / 3; }
}
@media (max-width: 420px) {
  .stay-page { padding-inline: 16px; }
  .night-picker.np-month .np-cell { height: 40px; }
  .stay-know { grid-template-columns: 1fr; gap: 0 0; }
  .stay-know dt { margin-top: 8px; font-size: 12px; }
  .stay-lb-prev { left: 4px; } .stay-lb-next { right: 4px; }
}
