/* ============================================================
   Sunrise Retreat — booking & registration pages
   Extends css/styles.css; keep new rules namespaced to these pages.
   ============================================================ */

.page-form { background: var(--cream); }

/* ---------- Page header ---------- */
.form-page { padding: clamp(2.5rem, 6vw, 4rem) 0 clamp(3rem, 7vw, 5rem); }
.form-head { max-width: 62ch; margin-bottom: 2.4rem; }
.form-head h1 { font-size: clamp(2.2rem, 5.5vw, 3.4rem); margin: 0.3rem 0 0.8rem; }

/* ---------- Panels ---------- */
.panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(1.4rem, 3.4vw, 2.4rem);
  margin-bottom: 1.6rem;
}
.panel-quote { position: sticky; top: 100px; }
.panel-h {
  font-size: 1.35rem;
  margin: 0 0 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.panel-h:not(:first-child) { margin-top: 2.2rem; }
.step-n {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  flex: 0 0 2rem;
  border-radius: 50%;
  background: var(--pine);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 700;
}

/* ---------- Forms ---------- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }

.field { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1.1rem; }
.field label { font-size: 0.9rem; font-weight: 600; color: var(--pine-ink); }

/* A checkbox on its own line, with the label beside it rather than
   above it — a checkbox that is not a text field reads better that
   way. */
.field-rental { flex-direction: row; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.field-rental label { order: 2; font-weight: 500; }
.field-rental input[type="checkbox"] {
  order: 1;
  width: 1.15rem;
  height: 1.15rem;
  margin: 0;
  accent-color: var(--pine);
  flex: 0 0 auto;
}
.field-rental .hint { order: 3; flex: 1 1 100%; margin: 0.2rem 0 0; }
.field input,
.field select,
.field textarea {
  font: inherit;
  font-size: 1rem;
  color: var(--pine-ink);
  background: var(--cream);
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 0.72rem 0.85rem;
  width: 100%;
  transition: border-color .15s, background .15s;
}
.field textarea { resize: vertical; min-height: 5rem; }
.field input:hover,
.field select:hover,
.field textarea:hover { border-color: #cfc4ab; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--sunset);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(232, 150, 62, .22);
}
.field input:disabled { opacity: .55; cursor: not-allowed; }
.field-check { flex-direction: row; align-items: flex-start; gap: 0.65rem; margin: 1.4rem 0; }
.field-check input { width: 1.15rem; height: 1.15rem; margin-top: 0.18rem; flex: 0 0 auto; accent-color: var(--pine); }
.field-check label { font-weight: 400; font-size: 0.94rem; line-height: 1.5; }

.req { color: var(--sunset-ink); margin-left: 0.1rem; }
.hint { font-size: 0.85rem; color: var(--muted); margin: 0; }
.hint.block-hint { margin: -0.5rem 0 1.2rem; }
.static-value {
  margin: 0;
  padding: 0.72rem 0.85rem;
  background: var(--sand);
  border-radius: 10px;
  font-weight: 600;
}
.fine { font-size: 0.85rem; color: var(--muted); margin: 0.9rem 0 0; }

.btn-ghost-dark {
  background: transparent;
  border: 1.5px solid var(--pine);
  color: var(--pine);
}
.btn-ghost-dark:hover { background: var(--pine); color: var(--cream); }

/* ---------- Vehicle blocks ---------- */
.vblock {
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 1.1rem 1.2rem 0.6rem;
  margin-bottom: 1.1rem;
  background: var(--cream);
}
.vlegend {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.05rem;
  padding: 0 0.45rem;
  color: var(--pine);
}
.link-remove {
  background: none;
  border: 0;
  color: var(--sunset-ink);
  font: inherit;
  font-size: 0.88rem;
  text-decoration: underline;
  cursor: pointer;
  padding: 0.2rem 0;
  margin-bottom: 0.8rem;
}
.link-remove:hover { color: #8c3f27; }

/* ---------- Date row ---------- */
.date-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 1.1rem;
  align-items: end;
}
.field-sm { max-width: 8rem; }

/* ---------- Calendar ---------- */
.cal-wrap {
  margin-top: 1.4rem;
  border-top: 1px solid var(--line);
  padding-top: 1.4rem;
}
.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}
.cal-title { font-size: 1.1rem; margin: 0; }
.cal-nav {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: var(--white);
  color: var(--pine);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.cal-nav:hover { background: var(--sand); border-color: var(--sunset); }

.cal {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.cal-dow {
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 0.35rem;
}
.cal-day {
  position: relative;
  aspect-ratio: 1 / 1;
  min-height: 2.35rem;
  display: grid;
  place-items: center;
  border-radius: 9px;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}
.cal-blank { background: transparent; }
.cal-out { color: #c3bba9; }
.cal-past { color: #b8b0a0; }
.cal-unavail { color: #b3aa98; background: repeating-linear-gradient(135deg, transparent, transparent 4px, rgba(0,0,0,.035) 4px, rgba(0,0,0,.035) 8px); }
.cal-booked { color: #b3aa98; }
.cal-free { color: var(--pine-ink); }
.cal-btn {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  transition: background .12s, color .12s;
}
.cal-btn:hover { background: var(--sand); }
.cal-free .cal-btn:hover { background: var(--sunset); color: var(--white); }
.cal-sel { background: var(--sand); }
.cal-sel .cal-btn { color: var(--pine); font-weight: 700; }
.cal-edge { background: var(--sunset); }
.cal-edge .cal-btn { color: var(--white); font-weight: 700; }
.cal-edge .cal-btn:hover { background: var(--sunset-deep); color: var(--white); }

.cal-status { grid-column: 1 / -1; text-align: center; color: var(--muted); padding: 1.6rem 0; }
.cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
  font-size: 0.82rem;
  color: var(--muted);
}
.lg { display: inline-flex; align-items: center; gap: 0.4rem; }
.lg::before {
  content: "";
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 5px;
  border: 1.5px solid var(--line);
}
.lg-free::before { background: var(--white); }
.lg-sel::before { background: var(--sunset); border-color: var(--sunset); }
.lg-booked::before { background: repeating-linear-gradient(135deg, transparent, transparent 3px, rgba(0,0,0,.10) 3px, rgba(0,0,0,.10) 6px); }
.lg-unavail::before { background: var(--sand); }

/* ---------- Quotes ---------- */
.quote-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.9rem; }
.quote-dates { font-family: var(--serif); font-size: 1.2rem; font-weight: 600; margin: 0; }
.quote-nights { color: var(--muted); font-size: 0.9rem; margin: 0; }
.quote-table { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
.quote-table th,
.quote-table td { padding: 0.55rem 0; text-align: left; border-bottom: 1px solid var(--line); }
.quote-table th { font-weight: 500; color: var(--muted); }
.quote-table td { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.quote-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 2px solid var(--pine);
}
.quote-total-label { font-weight: 600; }
.quote-total-num { font-family: var(--serif); font-size: 1.7rem; font-weight: 600; color: var(--pine); }
.quote-note { font-size: 0.87rem; color: var(--muted); margin: 0.8rem 0 0; }
.quote-warn {
  font-size: 0.9rem;
  margin: 0.9rem 0 0;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  background: #fdf3e3;
  border-left: 3px solid var(--sunset-deep);
  color: #7a4a12;
}
.quote-loading { color: var(--muted); margin: 0; }
.quote-error { color: #8c3f27; margin: 0; }

/* ---------- Notices ---------- */
.notice {
  border-radius: 12px;
  padding: 0.9rem 1.1rem;
  margin-bottom: 1.4rem;
  font-size: 0.94rem;
  background: #eef4f0;
  border-left: 3px solid var(--pine);
  color: var(--pine-ink);
}
.notice p { margin: 0 0 0.35rem; }
.notice p:last-child { margin-bottom: 0; }
.notice-error { background: #fdf0ec; border-left-color: #b4462b; color: #8c3f27; }
.notice-warn { background: #fdf3e3; border-left-color: var(--sunset-deep); color: #7a4a12; }
.notice-success { background: #eef4f0; border-left-color: var(--pine); color: var(--pine-ink); }

/* ---------- Confirmation ---------- */
.panel-confirm { border-color: var(--pine); }
.confirm-ref {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--pine);
  margin: 0 0 0.4rem;
}
.confirm-msg { margin: 0 0 1rem; color: var(--muted); }
.confirm-summary {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.9rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 1.2rem;
}
.confirm-summary strong { font-family: var(--serif); font-size: 1.5rem; color: var(--pine); }
.pay-list { display: flex; flex-wrap: wrap; gap: 0.7rem; margin: 0.8rem 0; }

/* One payment option: a button, and the note beside it. */
.pay-option { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; }

/* A payment option with no link — something the guest does in their own
   banking app, so it is a note rather than a button. */
.pay-note {
  flex: 1 1 100%;
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.55;
}
.pay-note strong { color: var(--pine-ink); }

/* The copy button, and its confirmation. */
.pay-option-copy { white-space: nowrap; }
.pay-copy-status {
  font-size: 0.85rem;
  color: var(--pine);
  min-width: 4rem;
}

/* The details themselves, shown so they can be read off the screen as
   well as copied. */
.pay-details {
  flex: 1 1 100%;
  margin: 0;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  background: rgba(241, 234, 217, 0.5);
  border: 1px dashed var(--line);
  font-family: var(--mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  font-size: 0.88rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--pine-ink);
}

/* The front door code, shown back to the guest so they can check it. */
.confirm-door {
  border-top: 1px solid var(--line);
  padding-top: 0.9rem;
  margin-top: 0.4rem;
}
.confirm-door .confirm-msg { margin-bottom: 0.2rem; }
.confirm-door-code {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--pine);
  margin: 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .grid-2, .grid-3, .date-row { grid-template-columns: 1fr; }
  .field-sm { max-width: none; }
  .panel-quote { position: static; }
  .cal-day { min-height: 2rem; font-size: 0.82rem; }
}

@media (max-width: 560px) {
  .cal-day { min-height: 1.85rem; font-size: 0.76rem; }
  .cal { gap: 2px; }
  .cal-btn { padding: 0; }
}

/* ---------- Inquiry thread ---------- */
.thread { display: flex; flex-direction: column; gap: 0.9rem; margin-bottom: 1.6rem; }
.bubble {
  border-radius: 14px;
  padding: 0.85rem 1.05rem;
  max-width: 46rem;
}
.bubble-guest {
  background: var(--sand);
  border: 1.5px solid var(--line);
  align-self: flex-start;
}
.bubble-host {
  background: var(--pine);
  color: var(--cream);
  align-self: flex-end;
}
.bubble-meta {
  display: flex;
  gap: 0.6rem;
  align-items: baseline;
  margin-bottom: 0.35rem;
  font-size: 0.8rem;
}
.bubble-host .bubble-meta { color: #b9c9bd; }
.bubble-body { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---------- Booking mode choice ---------- */
.mode-choice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.4rem;
}
.mode-card {
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 1rem 1.1rem;
  cursor: pointer;
  background: var(--cream);
  transition: border-color .15s, background .15s;
}
.mode-card:hover { border-color: var(--sunset); }
.mode-card.selected {
  border-color: var(--pine);
  background: #eef4f0;
}
.mode-card input { margin-right: 0.5rem; accent-color: var(--pine); }
.mode-title { font-weight: 700; display: inline; }
.mode-hint { font-size: 0.85rem; color: var(--muted); margin: 0.4rem 0 0; }

@media (max-width: 620px) {
  .mode-choice { grid-template-columns: 1fr; }
  .bubble { max-width: 100%; }
}

/* ---------- Payment options on a phone ----------
   The payment options are the most important buttons on the page, and
   on a phone they are tapped with a thumb. So they are stacked, made
   full width, and given a comfortable height rather than being small
   pills in a row. */
@media (max-width: 620px) {
  .pay-list { flex-direction: column; align-items: stretch; gap: 0.9rem; }
  .pay-option { flex-direction: column; align-items: stretch; gap: 0.5rem; }
  .pay-option-link {
    display: block;
    width: 100%;
    /* A comfortable target for a thumb. */
    padding: 0.95rem 1.2rem;
    font-size: 1rem;
    text-align: center;
  }
  .pay-note { font-size: 0.95rem; }
  .pay-option-copy { width: 100%; padding: 0.8rem 1.2rem; font-size: 0.95rem; }
  .pay-copy-status { text-align: center; }
}

/* The community access fee, shown with the quote so a guest sees the
   whole cost before they book. */
.quote-community {
  margin-top: 1.1rem;
  padding: 0.9rem 1rem;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: rgba(241, 234, 217, 0.45);
}

.quote-community-heading {
  margin: 0 0 0.5rem;
  font-weight: 600;
  color: var(--pine-ink);
}

.quote-community .quote-total {
  margin-top: 0.45rem;
}
