/* v0.3 individual cabin page */
.kh-cabin-page {
  /* Same tokens as the search widget so final fonts/colors can be tuned globally. */
  --kh-font-body: inherit;
  --kh-font-heading: inherit;
  --kh-color-text: #1f2923;
  --kh-color-muted: #687269;
  --kh-color-line: #dfe4df;
  --kh-color-soft: #f6f6f2;
  --kh-color-range: #edf1ee;
  --kh-color-accent: #263d31;
  --kh-color-accent-hover: #1e3228;
  --kh-color-danger: #a12622;
  --kh-radius-sm: 10px;
  --kh-radius-md: 16px;
  --kh-radius-lg: 18px;
  --kh-shadow-card: 0 14px 40px rgba(25, 35, 29, .10);
  --kh-ink: var(--kh-color-text);
  --kh-muted: var(--kh-color-muted);
  --kh-line: var(--kh-color-line);
  --kh-soft: var(--kh-color-soft);
  --kh-range: var(--kh-color-range);
  --kh-accent: var(--kh-color-accent);
  --kh-accent-hover: var(--kh-color-accent-hover);
  --kh-danger: var(--kh-color-danger);
  max-width: 1180px;
  margin: 0 auto;
  color: var(--kh-ink);
  font-family: inherit;
}

.kh-cabin-page * { box-sizing: border-box; }

.kh-cabin-gallery-shell {
  position: relative;
  margin: 10px 0 34px;
}

.kh-cabin-gallery {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: 230px 230px;
  gap: 8px;
  overflow: hidden;
  background: var(--kh-soft);
  border-radius: 18px;
}

.kh-cabin-gallery--empty {
  display: grid;
  min-height: 340px;
  place-items: center;
  color: var(--kh-muted);
}

.kh-cabin-gallery__item {
  display: none;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: var(--kh-soft);
  border: 0;
  border-radius: 0;
  cursor: zoom-in;
}
.kh-cabin-gallery__item:nth-child(-n+5) { display: block; }
.kh-cabin-gallery__item--hero { grid-row: 1 / 3; }
.kh-cabin-gallery__item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .25s ease;
}
.kh-cabin-gallery__item:hover img { transform: scale(1.015); }
.kh-cabin-gallery__item:focus-visible,
.kh-cabin-gallery__show-all:focus-visible,
.kh-gallery-modal button:focus-visible {
  outline: 3px solid rgba(255, 255, 255, .88);
  outline-offset: -5px;
}

.kh-cabin-gallery__show-all {
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 13px;
  color: #1f2923;
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(31,41,35,.18);
  border-radius: 10px;
  box-shadow: 0 3px 12px rgba(0,0,0,.12);
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}
.kh-cabin-gallery__show-all svg { width: 18px; height: 18px; }
.kh-cabin-gallery__mobile-counter { display: none; }

.kh-gallery-modal[hidden] { display: none; }
.kh-gallery-modal {
  position: fixed;
  z-index: 100000;
  inset: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  width: 100%;
  height: 100dvh;
  min-height: 100vh;
  padding: env(safe-area-inset-top, 0) env(safe-area-inset-right, 0) env(safe-area-inset-bottom, 0) env(safe-area-inset-left, 0);
  color: #fff;
  background: #111;
}
html.kh-gallery-open,
html.kh-gallery-open body { overflow: hidden; }

.kh-gallery-modal__toolbar {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  align-items: center;
  min-height: 62px;
  padding: 8px 14px;
}
.kh-gallery-modal__close {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  margin: 0;
  padding: 0;
  color: #fff;
  background: rgba(0,0,0,.42);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}
.kh-gallery-modal__close svg { width: 22px; height: 22px; }
.kh-gallery-modal__counter {
  grid-column: 2;
  justify-self: center;
  font-size: 14px;
  font-weight: 700;
}
.kh-gallery-modal__stage {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 64px;
  align-items: center;
  min-height: 0;
  padding: 0 16px;
  touch-action: pan-y;
  user-select: none;
}
.kh-gallery-modal__figure {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  align-items: center;
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
}
.kh-gallery-modal__figure img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: calc(100dvh - 140px);
  object-fit: contain;
}
.kh-gallery-modal__caption {
  max-width: 760px;
  margin: 12px auto 0;
  padding: 0 16px;
  color: rgba(255,255,255,.84);
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
}
.kh-gallery-modal__nav {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  margin: 0;
  padding: 0;
  color: #fff;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 999px;
  font: inherit;
  font-size: 22px;
  cursor: pointer;
}
.kh-gallery-modal__nav:disabled { opacity: .25; cursor: default; }
.kh-gallery-modal__nav--prev { justify-self: start; }
.kh-gallery-modal__nav--next { justify-self: end; }
.kh-gallery-modal__hint {
  margin: 0;
  padding: 8px 16px 16px;
  color: rgba(255,255,255,.62);
  font-size: 12px;
  text-align: center;
}

.kh-cabin-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 54px;
  align-items: start;
}

.kh-cabin-main { min-width: 0; }
.kh-cabin__eyebrow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}
.kh-cabin__eyebrow span {
  padding: 6px 10px;
  background: var(--kh-soft);
  border-radius: 999px;
  color: var(--kh-muted);
  font-size: 12px;
  font-weight: 700;
}
.kh-cabin__facts {
  margin: 0 0 24px;
  color: var(--kh-muted);
  font-size: 15px;
}
.kh-cabin__summary {
  margin-bottom: 28px;
  font-size: 17px;
  line-height: 1.7;
}
.kh-cabin__summary p { margin: 0; }
.kh-cabin__section {
  padding: 28px 0;
  border-top: 1px solid var(--kh-line);
}
.kh-cabin__section h2 {
  margin: 0 0 14px;
  font-size: 22px;
}
.kh-cabin__amenities {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.kh-cabin__amenities li {
  position: relative;
  padding-left: 20px;
}
.kh-cabin__amenities li::before {
  position: absolute;
  left: 0;
  content: '✓';
  color: var(--kh-accent);
  font-weight: 800;
}
.kh-cabin__api-notice {
  max-width: 1180px;
  margin: 16px auto;
  padding: 14px 16px;
  background: #fff7e6;
  border: 1px solid #edd79e;
  border-radius: 10px;
}

.kh-cabin-booking {
  position: sticky;
  top: 28px;
  z-index: 20;
  padding: 22px;
  background: #fff;
  border: 1px solid var(--kh-line);
  border-radius: 16px;
  box-shadow: 0 14px 40px rgba(25, 35, 29, .10);
}
.kh-cabin-booking__header { margin-bottom: 16px; }
.kh-cabin-booking__header strong {
  display: block;
  font-size: 20px;
  line-height: 1.25;
}
.kh-cabin-booking__kicker {
  display: block;
  margin-bottom: 3px;
  color: var(--kh-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.kh-cabin-booking__control {
  padding: 12px 0;
  border-top: 1px solid var(--kh-line);
}
.kh-cabin-booking__control .kh-booking__date-button,
.kh-cabin-booking__control .kh-booking__occupancy-button {
  min-height: 48px;
}
.kh-cabin-booking__submit {
  width: 100%;
  min-height: 50px;
  margin-top: 12px;
  padding: 12px 18px;
  color: #fff;
  background: var(--kh-accent);
  border: 0;
  border-radius: 11px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.kh-cabin-booking__submit:hover { background: var(--kh-accent-hover); }
.kh-cabin-booking__submit:disabled { opacity: .65; cursor: wait; }
.kh-cabin-booking__status {
  min-height: 22px;
  margin-top: 12px;
  color: var(--kh-muted);
  font-size: 13px;
  line-height: 1.4;
}
.kh-cabin-booking__status.is-success { color: #28733d; font-weight: 700; }
.kh-cabin-booking__status.is-error { color: var(--kh-danger); }
.kh-cabin-booking__price {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--kh-line);
}
.kh-cabin-booking__price[hidden] { display: none; }
.kh-cabin-booking__price strong { font-size: 22px; }
.kh-cabin-booking__price span { color: var(--kh-muted); font-size: 11px; text-align: right; }
.kh-cabin-booking__fineprint {
  margin: 11px 0 0;
  color: var(--kh-muted);
  font-size: 11px;
  line-height: 1.45;
  text-align: center;
}
.kh-cabin-booking .kh-calendar {
  left: auto;
  right: 0;
  width: min(720px, calc(100vw - 40px));
  transform: none;
}
.kh-cabin-booking .kh-occupancy {
  right: 0;
}



/* v0.4 Guesty quote review */
.kh-quote[hidden],
.kh-rate-plans[hidden],
.kh-quote__payment[hidden],
.kh-quote__promo-form[hidden] { display: none; }

.kh-quote {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--kh-line);
}
.kh-quote__heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.kh-quote__heading h3 {
  margin: 0;
  font-family: var(--kh-font-heading);
  font-size: 19px;
  line-height: 1.25;
}
.kh-quote__expires {
  max-width: 150px;
  color: var(--kh-muted);
  font-size: 11px;
  line-height: 1.35;
  text-align: right;
}
.kh-rate-plans { margin: 12px 0 16px; }
.kh-rate-plans__label {
  margin: 0 0 8px;
  color: var(--kh-muted);
  font-size: 12px;
  font-weight: 750;
}
.kh-rate-plan {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  align-items: start;
  margin: 8px 0;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--kh-line);
  border-radius: var(--kh-radius-sm);
  cursor: pointer;
}
.kh-rate-plan:has(input:checked) {
  border-color: var(--kh-accent);
  box-shadow: 0 0 0 1px var(--kh-accent);
}
.kh-rate-plan input { margin-top: 3px; accent-color: var(--kh-accent); }
.kh-rate-plan__copy { min-width: 0; }
.kh-rate-plan__top {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  font-size: 13px;
}
.kh-rate-plan__policy {
  display: block;
  margin-top: 4px;
  color: var(--kh-muted);
  font-size: 11px;
  line-height: 1.35;
}
.kh-quote__rows { display: grid; gap: 7px; }
.kh-quote__row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--kh-ink);
  font-size: 13px;
  line-height: 1.35;
}
.kh-quote__row span:first-child { min-width: 0; }
.kh-quote__row span:last-child { flex: 0 0 auto; font-variant-numeric: tabular-nums; }
.kh-quote__total {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--kh-line);
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}
.kh-quote__payment {
  margin-top: 14px;
  padding: 12px;
  background: var(--kh-soft);
  border-radius: var(--kh-radius-sm);
}
.kh-quote__payment > strong {
  display: block;
  margin-bottom: 7px;
  font-size: 12px;
}
.kh-quote__row--due { font-weight: 750; }
.kh-quote__promo {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--kh-line);
}
.kh-quote__promo-toggle {
  margin: 0;
  padding: 0;
  color: var(--kh-ink);
  background: transparent;
  border: 0;
  font: inherit;
  font-size: 12px;
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.kh-quote__promo-form { margin-top: 10px; }
.kh-quote__promo-form label {
  display: block;
  margin-bottom: 5px;
  color: var(--kh-muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.kh-quote__promo-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.kh-quote__promo-row input {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  color: var(--kh-ink);
  background: #fff;
  border: 1px solid var(--kh-line);
  border-radius: var(--kh-radius-sm);
  font: inherit;
  text-transform: uppercase;
}
.kh-quote__promo-row button {
  min-height: 42px;
  padding: 8px 14px;
  color: #fff;
  background: var(--kh-accent);
  border: 0;
  border-radius: var(--kh-radius-sm);
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}
.kh-quote__promo-row button:disabled { opacity: .6; cursor: wait; }
.kh-quote__promo-status {
  display: block;
  min-height: 18px;
  margin-top: 5px;
  color: var(--kh-danger);
  font-size: 11px;
}
.kh-quote__promo-status.is-success { color: #28733d; }
.kh-quote__locked {
  margin: 12px 0 0;
  color: var(--kh-muted);
  font-size: 10px;
  line-height: 1.45;
}

.kh-mobile-booking-bar { display: none; }

@media (max-width: 900px) {
  .kh-cabin-layout { grid-template-columns: 1fr; gap: 28px; }
  .kh-cabin-booking { position: relative; top: auto; }
  .kh-cabin-gallery { grid-template-columns: 2fr 1fr; grid-template-rows: 190px 190px; }
  .kh-cabin-gallery__item:nth-child(-n+3) { display: block; }
  .kh-cabin-gallery__item:nth-child(n+4) { display: none; }
}

@media (max-width: 620px) {
  .kh-cabin-gallery-shell {
    width: 100vw;
    margin: 0 0 24px calc(50% - 50vw);
  }
  .kh-cabin-gallery {
    display: flex;
    width: 100%;
    gap: 0;
    overflow-x: auto;
    overflow-y: hidden;
    margin: 0;
    padding: 0;
    background: #111;
    border-radius: 0;
    scrollbar-width: none;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }
  .kh-cabin-gallery::-webkit-scrollbar { display: none; }
  .kh-cabin-gallery__item,
  .kh-cabin-gallery__item:nth-child(n+4),
  .kh-cabin-gallery__item:nth-child(n+5) {
    display: block;
    flex: 0 0 100%;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    border-radius: 0;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }
  .kh-cabin-gallery__item img { aspect-ratio: 4 / 3; }
  .kh-cabin-gallery__show-all { display: none; }
  .kh-cabin-gallery__mobile-counter {
    position: absolute;
    right: max(14px, env(safe-area-inset-right, 0px));
    bottom: 14px;
    z-index: 4;
    display: inline-flex;
    min-width: 48px;
    min-height: 30px;
    align-items: center;
    justify-content: center;
    padding: 5px 9px;
    color: #fff;
    background: rgba(20,20,20,.72);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 750;
    letter-spacing: .01em;
    pointer-events: none;
  }
  .kh-gallery-modal__toolbar { min-height: 58px; padding: 6px 12px; }
  .kh-gallery-modal__stage {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    touch-action: pan-y;
  }
  .kh-gallery-modal__figure img {
    max-height: calc(100dvh - 116px);
    object-fit: contain;
  }
  .kh-gallery-modal__nav { display: none; }
  .kh-gallery-modal__caption { padding: 0 20px; }
  .kh-gallery-modal__hint { padding-bottom: max(14px, env(safe-area-inset-bottom, 0px)); }
  .kh-cabin__amenities { grid-template-columns: 1fr; }
  .kh-cabin-booking { padding: 18px; }
  .kh-cabin-booking .kh-calendar,
  .kh-cabin-booking .kh-occupancy {
    position: fixed;
    right: 12px;
    bottom: 12px;
    left: 12px;
    width: auto;
    margin: 0;
    transform: none;
  }
}


@media (max-width: 760px) {
  .kh-cabin-page { padding-bottom: calc(86px + env(safe-area-inset-bottom, 0px)); }
  .kh-cabin-booking { box-shadow: none; }
  .kh-mobile-booking-bar {
    position: fixed;
    z-index: 9990;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    min-height: 72px;
    padding: 10px max(14px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(14px, env(safe-area-inset-left, 0px));
    background: rgba(255,255,255,.97);
    border-top: 1px solid var(--kh-line);
    box-shadow: 0 -8px 28px rgba(25,35,29,.10);
    backdrop-filter: blur(12px);
  }
  .kh-mobile-booking-bar__summary { min-width: 0; }
  .kh-mobile-booking-bar__summary strong,
  .kh-mobile-booking-bar__summary span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .kh-mobile-booking-bar__summary strong { color: var(--kh-ink); font-size: 15px; }
  .kh-mobile-booking-bar__summary span { margin-top: 2px; color: var(--kh-muted); font-size: 11px; }
  .kh-mobile-booking-bar button {
    min-height: 46px;
    padding: 10px 18px;
    color: #fff;
    background: var(--kh-accent);
    border: 0;
    border-radius: 11px;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
  }
  .kh-mobile-booking-bar button:disabled { opacity: .65; cursor: wait; }
  .kh-quote__heading { align-items: flex-start; }
  .kh-rate-plan { min-height: 58px; }
}

/* v0.5 checkout handoff */
.kh-quote__checkout {
  display: inline-flex;
  width: 100%;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  margin-top: 16px;
  padding: 12px 16px;
  color: #fff;
  background: var(--kh-accent);
  border: 0;
  border-radius: 12px;
  font: inherit;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}
.kh-quote__checkout:hover { background: var(--kh-accent-hover); }
.kh-quote__checkout:focus-visible { outline: 3px solid rgba(38,61,49,.22); outline-offset: 3px; }

/* v0.9.2 UX hardening */
.kh-cabin-page :where(a,button,input):focus-visible{outline:3px solid rgba(38,61,49,.30);outline-offset:3px}.kh-cabin-page :where(button,a){touch-action:manipulation;-webkit-tap-highlight-color:transparent}.kh-cabin-booking__submit,.kh-quote__checkout{min-height:50px}.kh-cabin-booking__submit.is-loading{position:relative;cursor:progress;opacity:.82}.kh-cabin-booking__submit.is-loading::after{content:'';display:inline-block;width:14px;height:14px;margin-left:9px;vertical-align:-2px;border:2px solid rgba(255,255,255,.45);border-top-color:#fff;border-radius:50%;animation:khCabinSpin .7s linear infinite}.kh-cabin-booking__status:empty{min-height:0}.kh-cabin__api-notice{line-height:1.5}.kh-gallery-modal__close,.kh-gallery-modal__nav{min-width:44px;min-height:44px}
@keyframes khCabinSpin{to{transform:rotate(360deg)}}
@media(max-width:620px){.kh-cabin-page{width:100%;padding:0 12px}.kh-cabin-layout{gap:20px}.kh-cabin-booking{padding:18px;border-radius:15px}.kh-cabin__summary{font-size:16px;line-height:1.65}.kh-cabin__amenities{grid-template-columns:1fr}.kh-mobile-booking-bar{padding-bottom:max(10px,env(safe-area-inset-bottom))}.kh-gallery-modal__toolbar{padding-top:max(8px,env(safe-area-inset-top))}.kh-gallery-modal__hint{padding-bottom:max(16px,env(safe-area-inset-bottom))}}
@media(prefers-reduced-motion:reduce){.kh-cabin-page *,.kh-cabin-page *::before,.kh-cabin-page *::after,.kh-gallery-modal *{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}

/* v0.9.3 cabin page shell + lodging hierarchy */
.kh-plugin-cabin-page{margin:0;background:var(--kh-paper,#fbfaf7)}
.kh-site--cabin{min-height:100vh}
.kh-site--cabin .kh-site-header{position:sticky;top:0;background:rgba(251,250,247,.97);color:var(--kh-ink);box-shadow:0 1px 0 rgba(0,0,0,.08);backdrop-filter:blur(16px)}
.kh-site--cabin .kh-site-header__book{background:var(--kh-deep);color:#fff!important}
.kh-site--cabin .kh-cabin-page{padding-top:26px;padding-bottom:72px}
.kh-cabin-heading{margin:0 0 28px;padding:0 2px}
.kh-cabin-heading h1{margin:0 0 13px;font-family:var(--kh-font-heading,Georgia,"Times New Roman",serif);font-size:clamp(30px,4vw,46px);line-height:1.08;letter-spacing:-.025em;color:var(--kh-ink)}
.kh-cabin-heading .kh-cabin__eyebrow{margin-bottom:10px}
.kh-cabin-heading .kh-cabin__facts{margin-bottom:0}
@media(max-width:700px){.kh-site--cabin .kh-cabin-page{padding-top:14px;padding-bottom:54px}.kh-cabin-gallery-shell{margin-top:0;margin-bottom:22px}.kh-cabin-heading{margin-bottom:22px;padding:0 2px}.kh-cabin-heading h1{font-size:30px;line-height:1.12;margin-bottom:11px}}
