.kh-booking {
  /* v0.4 design tokens. Brand polish can change these without touching booking logic. */
  --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 10px 30px rgba(25, 35, 29, .08);
  --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);
  position: relative;
  max-width: 1120px;
  margin: 0 auto;
  color: var(--kh-ink);
  font-family: inherit;
}

.kh-booking * {
  box-sizing: border-box;
}

.kh-booking__intro {
  margin-bottom: 22px;
  text-align: center;
}

.kh-booking__title {
  margin: 0 0 6px;
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  line-height: 1.15;
}

.kh-booking__subtitle {
  margin: 0;
  color: var(--kh-muted);
}

.kh-booking__form {
  position: relative;
  display: grid;
  grid-template-columns: minmax(320px, 1.65fr) minmax(220px, .85fr) auto;
  align-items: stretch;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--kh-line);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(25, 35, 29, .08);
}

.kh-booking__field {
  min-width: 0;
  padding: 13px 18px;
  border-right: 1px solid var(--kh-line);
}

.kh-booking__label {
  display: block;
  margin: 0 0 4px;
  color: var(--kh-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.kh-booking__date-button,
.kh-booking__occupancy-button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 42px;
  margin: 0;
  padding: 0;
  color: var(--kh-ink);
  background: transparent;
  border: 0;
  border-radius: 8px;
  outline: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.kh-booking__date-button:focus-visible,
.kh-booking__occupancy-button:focus-visible,
.kh-booking__submit:focus-visible,
.kh-calendar button:focus-visible,
.kh-occupancy button:focus-visible {
  outline: 3px solid rgba(38, 61, 49, .22);
  outline-offset: 3px;
}

.kh-booking__icon {
  flex: 0 0 21px;
  width: 21px;
  height: 21px;
  color: var(--kh-accent);
}

.kh-booking__control-copy {
  min-width: 0;
}

.kh-booking__control-value {
  display: block;
  overflow: hidden;
  color: var(--kh-ink);
  font-size: 16px;
  font-weight: 650;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kh-booking__control-meta {
  display: block;
  margin-top: 2px;
  color: var(--kh-muted);
  font-size: 12px;
  line-height: 1.2;
}

.kh-booking__submit {
  min-height: 58px;
  margin: 7px;
  padding: 0 30px;
  color: #fff;
  background: var(--kh-accent);
  border: 0;
  border-radius: 12px;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
  transition: background .16s ease, transform .16s ease;
}

.kh-booking__submit:hover {
  background: var(--kh-accent-hover);
}

.kh-booking__submit:active {
  transform: translateY(1px);
}

.kh-booking__submit:disabled {
  opacity: .65;
  cursor: wait;
}

.kh-calendar {
  position: absolute;
  z-index: 9999;
  left: 50%;
  width: min(790px, calc(100vw - 34px));
  margin-top: 10px;
  padding: 18px;
  transform: translateX(-50%);
  background: #fff;
  border: 1px solid var(--kh-line);
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(15, 25, 18, .20);
}

.kh-calendar[hidden] {
  display: none;
}

.kh-calendar__header {
  margin-bottom: 12px;
  text-align: center;
}

.kh-calendar__prompt {
  display: block;
  font-size: 16px;
  font-weight: 750;
}

.kh-calendar__status {
  display: block;
  min-height: 18px;
  margin-top: 3px;
  color: var(--kh-muted);
  font-size: 12px;
}

.kh-calendar__navigation {
  position: relative;
}

.kh-calendar__nav {
  position: absolute;
  z-index: 2;
  top: -48px;
  width: 38px;
  height: 38px;
  padding: 0;
  color: var(--kh-ink);
  background: #fff;
  border: 1px solid var(--kh-line);
  border-radius: 50%;
  font-size: 19px;
  cursor: pointer;
}

.kh-calendar__nav--prev {
  left: 0;
}

.kh-calendar__nav--next {
  right: 0;
}

.kh-calendar__months {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.kh-calendar__month-title {
  margin: 4px 0 12px;
  text-align: center;
  font-weight: 750;
}

.kh-calendar__weekdays,
.kh-calendar__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}

.kh-calendar__weekday {
  padding: 4px 0 7px;
  color: var(--kh-muted);
  font-size: 11px;
  font-weight: 750;
  text-align: center;
}

.kh-calendar__day,
.kh-calendar__blank {
  min-width: 38px;
  aspect-ratio: 1;
}

.kh-calendar__day {
  position: relative;
  padding: 0;
  color: var(--kh-ink);
  background: transparent;
  border: 0;
  border-radius: 50%;
  font: inherit;
  cursor: pointer;
}

.kh-calendar__day:hover:not(:disabled),
.kh-calendar__day.is-preview-end {
  background: var(--kh-soft);
}

.kh-calendar__day:disabled {
  color: #bdc5bf;
  cursor: not-allowed;
}

.kh-calendar__day.is-today:not(.is-selected)::after {
  position: absolute;
  right: 50%;
  bottom: 5px;
  width: 3px;
  height: 3px;
  transform: translateX(50%);
  background: currentColor;
  border-radius: 50%;
  content: '';
}

.kh-calendar__day.is-range,
.kh-calendar__day.is-preview-range {
  background: var(--kh-range);
  border-radius: 8px;
}

.kh-calendar__day.is-selected {
  z-index: 1;
  color: #fff;
  background: var(--kh-accent);
  border-radius: 50%;
  font-weight: 750;
}

.kh-calendar__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--kh-line);
}

.kh-calendar__clear,
.kh-calendar__close {
  padding: 8px 4px;
  color: var(--kh-ink);
  background: transparent;
  border: 0;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.kh-calendar__close {
  color: var(--kh-muted);
}

.kh-occupancy {
  position: absolute;
  z-index: 9998;
  right: 82px;
  width: min(390px, calc(100vw - 34px));
  margin-top: 10px;
  padding: 8px 18px 14px;
  background: #fff;
  border: 1px solid var(--kh-line);
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(15, 25, 18, .18);
}

.kh-occupancy[hidden] {
  display: none;
}

.kh-occupancy__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 76px;
  border-bottom: 1px solid var(--kh-line);
}

.kh-occupancy__row strong,
.kh-occupancy__row span {
  display: block;
}

.kh-occupancy__row strong {
  font-size: 15px;
}

.kh-occupancy__row > div:first-child > span {
  margin-top: 3px;
  color: var(--kh-muted);
  font-size: 12px;
}

.kh-stepper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.kh-stepper button {
  display: grid;
  width: 34px;
  height: 34px;
  padding: 0;
  place-items: center;
  color: var(--kh-accent);
  background: #fff;
  border: 1px solid #cfd7d1;
  border-radius: 50%;
  font: inherit;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.kh-stepper button:hover:not(:disabled) {
  background: var(--kh-soft);
}

.kh-stepper button:disabled {
  color: #b6beb8;
  cursor: not-allowed;
  opacity: .6;
}

.kh-stepper [data-count] {
  min-width: 22px;
  font-weight: 750;
  text-align: center;
}

.kh-occupancy__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
}

.kh-occupancy__note {
  max-width: 230px;
  color: var(--kh-muted);
  font-size: 11px;
  line-height: 1.35;
}

.kh-occupancy__done {
  padding: 9px 16px;
  color: #fff;
  background: var(--kh-accent);
  border: 0;
  border-radius: 10px;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}

.kh-booking__message {
  min-height: 24px;
  margin: 16px 0 0;
  color: var(--kh-muted);
  text-align: center;
}

.kh-booking__message.is-error {
  color: var(--kh-danger);
}

.kh-results {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 18px;
}

.kh-result {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--kh-line);
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(25, 35, 29, .06);
}

.kh-result__image-wrap {
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--kh-soft);
}

.kh-result__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.kh-result__placeholder {
  display: grid;
  height: 100%;
  place-items: center;
  color: var(--kh-muted);
  font-size: 13px;
}

.kh-result__body {
  padding: 16px;
}

.kh-result__title {
  margin: 0 0 7px;
  font-size: 18px;
  line-height: 1.25;
}

.kh-result__meta {
  margin: 0;
  color: var(--kh-muted);
  font-size: 14px;
}

.kh-result__footer {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
  margin-top: 15px;
  padding-top: 13px;
  border-top: 1px solid var(--kh-line);
}

.kh-result__availability {
  font-size: 13px;
  font-weight: 700;
}

.kh-result__price {
  color: var(--kh-muted);
  font-size: 14px;
  text-align: right;
}

.kh-result__price strong {
  display: block;
  color: var(--kh-ink);
  font-size: 18px;
}

.kh-results-empty {
  grid-column: 1 / -1;
  padding: 32px 16px;
  background: var(--kh-soft);
  border-radius: 14px;
  text-align: center;
}

@media (max-width: 800px) {
  .kh-booking__form {
    grid-template-columns: minmax(0, 1.35fr) minmax(210px, .85fr) auto;
  }

  .kh-calendar__months {
    grid-template-columns: 1fr;
  }

  .kh-results {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .kh-booking__form {
    display: block;
    overflow: visible;
    border-radius: 14px;
  }

  .kh-booking__field {
    border-right: 0;
    border-bottom: 1px solid var(--kh-line);
  }

  .kh-booking__submit {
    width: calc(100% - 14px);
    min-height: 54px;
    padding: 14px 20px;
  }

  .kh-results {
    grid-template-columns: 1fr;
  }

  .kh-calendar {
    position: fixed;
    top: auto;
    right: 12px;
    bottom: 12px;
    left: 12px;
    width: auto;
    max-height: 86vh;
    margin: 0;
    overflow: auto;
    transform: none;
    border-radius: 18px;
  }

  .kh-calendar__day,
  .kh-calendar__blank {
    min-height: 42px;
    aspect-ratio: auto;
  }
  .kh-occupancy {
    position: fixed;
    z-index: 10000;
    right: 12px;
    bottom: 12px;
    left: 12px;
    width: auto;
    margin: 0;
    padding-bottom: 16px;
    border-radius: 18px;
  }

}

/* v0.3 search result cabin links */
.kh-result__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: 15px;
  padding: 10px 15px;
  color: #fff;
  background: var(--kh-accent);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 750;
  text-decoration: none;
}

.kh-result__cta:hover {
  color: #fff;
  background: var(--kh-accent-hover);
}

.kh-result__cta--disabled {
  color: var(--kh-muted);
  background: var(--kh-soft);
}


/* v0.9.2 UX hardening */
.kh-booking :where(a,button,input):focus-visible{outline:3px solid rgba(38,61,49,.28);outline-offset:3px}.kh-booking :where(button,a){touch-action:manipulation;-webkit-tap-highlight-color:transparent}.kh-booking__submit{min-height:50px}.kh-results[aria-busy="true"]{min-height:280px}.kh-result-skeleton{min-height:310px;border:1px solid var(--kh-line);border-radius:14px;background:linear-gradient(100deg,#f1f3f0 20%,#fafbf9 38%,#f1f3f0 56%);background-size:220% 100%;animation:khResultSkeleton 1.25s linear infinite}.kh-results-empty{display:grid;gap:7px;padding:38px 20px}.kh-results-empty strong{font-size:18px}.kh-results-empty span{color:var(--kh-muted);line-height:1.5}.kh-result__cta{min-height:46px}.kh-result__image{background:var(--kh-soft)}
@keyframes khResultSkeleton{to{background-position:-220% 0}}
@media(max-width:620px){.kh-booking__field{padding:14px 16px}.kh-booking__date-button,.kh-booking__occupancy-button{min-height:48px}.kh-calendar,.kh-occupancy{bottom:max(12px,env(safe-area-inset-bottom));max-height:calc(100dvh - 24px)}.kh-calendar__day,.kh-calendar__blank{min-height:44px}.kh-stepper button{width:40px;height:40px}.kh-occupancy__done,.kh-calendar__close,.kh-calendar__clear{min-height:44px}.kh-result-skeleton{min-height:360px}}
@media(prefers-reduced-motion:reduce){.kh-booking *,.kh-booking *::before,.kh-booking *::after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}

/* v1.0.3 — cabin-specific calendar availability states. */
.kh-calendar__day.is-unavailable,
.kh-calendar__day.is-past{
  color:#a9ada8;
  text-decoration:line-through;
  text-decoration-thickness:1px;
  text-decoration-color:currentColor;
}
.kh-calendar__day.is-restricted:not(.is-unavailable){
  color:#b8bdb8;
}
.kh-calendar__day:disabled{
  opacity:1;
}
.kh-calendar__day.is-unavailable:disabled,
.kh-calendar__day.is-past:disabled{
  background:transparent;
}
