/* ===========================================================
   LITS Booking — Roomslates-style booking widget
   -----------------------------------------------------------
   The front end should read as one booking surface, not an old
   contact form with a calendar bolted into it. The calendar
   follows the Roomslates pattern: one sparse month, white
   available cells, pale unavailable cells, dark selected cells.

   Touch targets are 44px minimum in both axes, which is the
   WCAG 2.2 target-size floor, rising to 48px on small screens.
   =========================================================== */

.form-card:has(form[data-lits-booking]) {
  padding: 0;
  overflow: hidden;
  background: #fbfaf7;
}

form[data-lits-booking] {
  display: flex;
  flex-direction: column;
  padding: 32px;
}

form[data-lits-booking] .form-row {
  gap: 16px;
}

form[data-lits-booking] .form-group {
  margin-bottom: 18px;
}

form[data-lits-booking] .form-group input,
form[data-lits-booking] .form-group select,
form[data-lits-booking] .form-group textarea {
  min-height: 50px;
  background: var(--white, #fff);
  border-color: rgba(11, 10, 8, 0.18);
}

form[data-lits-booking] .form-group input[type="checkbox"] {
  width: auto;
  min-width: 18px;
  min-height: 18px;
  flex: 0 0 auto;
  margin: 2px 0 0;
}

form[data-lits-booking] .lits-terms {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

form[data-lits-booking] .lits-turnstile-wrap {
  min-height: 65px;
}

form[data-lits-booking] .form-group textarea {
  min-height: 118px;
}

form[data-lits-booking] input[data-datepicker][readonly] {
  cursor: pointer;
}

.lits-availability {
  margin: 2px 0 24px;
  padding: 16px 18px 12px;
  border: 0;
  border-radius: 0;
  background: #fff;
  --lits-cal-booked: #f1eee8;
  --lits-cal-stay: #3f3d4f;
}

.lits-availability[hidden] {
  display: none;
}

.lits-availability-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.lits-availability-title {
  font-family: var(--font-body, Arial, sans-serif);
  font-size: 16px;
  font-weight: 700;
  color: var(--ink, #0b0a08);
  text-align: center;
  flex: 1;
}

.lits-cal-nav {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 6px;
  border: 1px solid rgba(11, 10, 8, 0.11);
  background: var(--white, #fff);
  color: #1c1a17;
  font-size: 22px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s var(--ease, ease);
}

.lits-cal-nav:hover,
.lits-cal-nav:focus-visible {
  background: #f7f5f0;
  color: var(--ink, #0b0a08);
  border-color: rgba(11, 10, 8, 0.22);
}

.lits-availability-months {
  display: block;
}

.lits-cal-month {
  min-width: 0;
}

.lits-cal-caption {
  display: none;
}

.lits-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0;
}

.lits-cal-dow {
  margin-bottom: 8px;
}

.lits-cal-dow span {
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: #5e6070;
}

.lits-cal-day {
  min-height: 96px;
  aspect-ratio: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 3px;
  background: var(--white, #fff);
  color: #070706;
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  /* Stops the double-tap-to-zoom delay on touch devices. */
  touch-action: manipulation;
  transition: background 0.15s var(--ease, ease), color 0.15s var(--ease, ease);
}

.lits-cal-grid:not(.lits-cal-dow) {
  row-gap: 4px;
}

.lits-cal-day:hover:not(:disabled) {
  border-color: #3f3d4f;
  background: #fff;
}

/* Roomslates-style availability: available nights are white, booked nights are
   a separate sand tile, and the guest's chosen stay is teal. */
.lits-cal-day:disabled,
.lits-cal-day.is-taken {
  background: var(--lits-cal-booked);
  color: #1f2028;
  opacity: 1;
  cursor: not-allowed;
}

.lits-cal-day.is-between {
  background: #f1eee8;
  border-color: #dfd9cf;
}

.lits-cal-day.is-start,
.lits-cal-day.is-end {
  background: var(--lits-cal-stay);
  color: var(--white, #fff);
  font-weight: 700;
}

.lits-availability-key {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 18px;
  font-size: 12px;
  color: var(--grey, #6b6455);
}

.lits-availability-key span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.lits-availability-key i {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  display: block;
}

.lits-availability-key .is-free {
  background: var(--white, #fff);
  border: 1px solid var(--border, rgba(11, 10, 8, 0.09));
}

/* The swatch is drawn the way the day is drawn: a white tile with a line
   through it. A block of colour here would promise a fill the grid does not
   use, which is the mismatch that started all this. */
.lits-availability-key .is-taken {
  background: var(--lits-cal-booked);
  border: 1px solid var(--border, rgba(11, 10, 8, 0.09));
}

.lits-availability-key .is-chosen {
  background: var(--lits-cal-stay);
}

.lits-availability-status {
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--grey, #6b6455);
  min-height: 20px;
}

/* ---------- Live quote ---------- */

.lits-quote {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  align-items: baseline;
  margin: 2px 0 20px;
  padding: 16px 20px;
  border-radius: var(--radius-lg, 6px);
  background: #edf7f5;
  border: 1px solid rgba(0, 116, 109, 0.24);
  font-size: 15px;
  color: var(--ink, #0b0a08);
}

.lits-quote[hidden] {
  display: none;
}

.lits-quote strong {
  font-family: var(--font-heading, Georgia, serif);
  font-size: 18px;
}

.lits-quote-deposit,
.lits-quote-warn {
  font-size: 13px;
  color: var(--grey, #6b6455);
}

.lits-quote-warn {
  color: #a63d2f;
}

@media (min-width: 720px) {
  .lits-availability {
    padding-inline: 18px;
  }
}

@media (max-width: 480px) {
  form[data-lits-booking] {
    padding: 20px;
  }

  .lits-availability {
    padding: 12px 0 10px;
  }

  .lits-cal-day {
    min-height: 54px;
    font-size: 14px;
  }

  .lits-cal-dow span {
    font-size: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lits-cal-nav,
  .lits-cal-day {
    transition: none;
  }
}

/* ---------- Honeypot ----------
   Moved off-screen rather than display:none. The automated submitters worth
   stopping skip anything hidden with `display:none` or the `hidden` attribute,
   but will happily fill a field that is merely out of view — which is exactly
   the behaviour we want to catch. It is aria-hidden and out of the tab order,
   so it costs a keyboard or screen-reader user nothing. */

.lits-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
