/* =========================================================
   KKF Booking Search
   Version: 1.0.0
   Loads after kkf-hotel-single.css and reuses its tokens.
   ========================================================= */

.kkf-book {
  --b-sun: var(--kkf-sun, #f0522b);
  --b-mango: var(--kkf-mango, #f7941d);
  --b-ink: var(--kkf-ink, #17211f);
  --b-soft: var(--kkf-ink-soft, #5f6f6a);
  --b-line: var(--kkf-line, #ecdfd3);
  --b-sand: var(--kkf-sand, #fbf6f0);
  --b-teal: var(--kkf-teal, #0e6e63);
  --b-ease: 0.22s cubic-bezier(0.32, 0.72, 0.35, 1);

  position: relative;
  z-index: 20;
  margin: 0 0 34px;
  font-family: var(--kkf-font-body, "Plus Jakarta Sans", system-ui, sans-serif);
}

.kkf-book *,
.kkf-book *::before,
.kkf-book *::after { box-sizing: border-box; }

/* ---------------------------------------- the bar */

.kkf-book-bar {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) 190px;
  gap: 10px;
  padding: 10px;
  border: 2px solid var(--b-mango);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 18px 40px -26px rgba(23, 33, 31, 0.5);
}

.kkf-book-field {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  min-height: 62px;
  padding: 10px 18px;
  border: 1.5px solid transparent;
  border-radius: 14px;
  background: var(--b-sand);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color var(--b-ease), background var(--b-ease);
}

.kkf-book-field:hover { border-color: #f6c9b6; }

.kkf-book-field.is-open {
  border-color: var(--b-sun);
  background: #fff;
}

.kkf-book-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--b-soft);
}

.kkf-book-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--b-ink);
}

.kkf-book-nights {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--kkf-teal-wash, #eaf5f3);
  color: var(--b-teal);
  font-size: 12px;
  font-weight: 700;
}

.kkf-book-go {
  min-height: 62px;
  padding: 14px 22px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(120deg, var(--b-mango), var(--b-sun));
  color: #fff;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: transform var(--b-ease);
}

.kkf-book-go:hover { transform: translateY(-1px); }

/* ---------------------------------------- popovers */

.kkf-book-pop {
  position: absolute;
  top: calc(100% + 10px);
  z-index: 40;
  border: 1px solid var(--b-line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 30px 70px -30px rgba(23, 33, 31, 0.5);
  animation: kkf-book-in 0.18s ease both;
}

.kkf-book-pop[hidden] { display: none; }

@keyframes kkf-book-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.kkf-book-cal {
  left: 0;
  width: min(680px, 100%);
  padding: 18px;
}

.kkf-book-cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.kkf-book-arrow {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border: 1.5px solid var(--b-line);
  border-radius: 50%;
  background: #fff;
  color: var(--b-ink);
  font-size: 21px;
  line-height: 1;
  cursor: pointer;
  transition: border-color var(--b-ease), background var(--b-ease);
}

.kkf-book-arrow:hover {
  border-color: var(--b-sun);
  background: var(--kkf-sun-wash, #fff1ea);
}

.kkf-book-cal-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.kkf-book-loading {
  grid-column: 1 / -1;
  padding: 50px 20px;
  color: var(--b-soft);
  font-size: 14px;
  text-align: center;
}

.kkf-book-month-name {
  margin-bottom: 10px;
  font-family: var(--kkf-font-display, Georgia, serif);
  font-size: 16px;
  font-weight: 600;
  text-align: center;
}

.kkf-book-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 2px;
}

.kkf-book-dow {
  padding: 4px 0;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--b-soft);
  text-align: center;
}

.kkf-book-blank { aspect-ratio: 1 / 1; }

.kkf-book-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  aspect-ratio: 1 / 1;
  min-height: 46px;
  padding: 2px;
  border: 0;
  border-radius: 10px;
  background: none;
  font-family: inherit;
  cursor: pointer;
  transition: background var(--b-ease), color var(--b-ease);
}

.kkf-book-day:hover:not(.is-off) { background: var(--b-sand); }

/* The labels inside a day must never intercept the click. */
.kkf-book-day > * { pointer-events: none; }

.kkf-book-num {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--b-ink);
  line-height: 1.2;
}

.kkf-book-price {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--b-teal);
  line-height: 1.2;
}

.kkf-book-was {
  font-size: 9px;
  color: var(--b-soft);
  text-decoration: line-through;
  line-height: 1.1;
}

.kkf-book-shut {
  font-size: 11px;
  color: #c9a6a2;
}

.kkf-book-day.is-off {
  cursor: default;
  opacity: 0.45;
}

.kkf-book-day.is-off .kkf-book-num {
  color: var(--b-soft);
  text-decoration: line-through;
}

.kkf-book-day.is-between {
  border-radius: 0;
  background: var(--kkf-sun-wash, #fff1ea);
}

.kkf-book-day.is-start,
.kkf-book-day.is-end {
  background: linear-gradient(120deg, var(--b-mango), var(--b-sun));
}

.kkf-book-day.is-start { border-radius: 10px 0 0 10px; }
.kkf-book-day.is-end { border-radius: 0 10px 10px 0; }

.kkf-book-day.is-start.is-end { border-radius: 10px; }

.kkf-book-day.is-start .kkf-book-num,
.kkf-book-day.is-end .kkf-book-num,
.kkf-book-day.is-start .kkf-book-price,
.kkf-book-day.is-end .kkf-book-price,
.kkf-book-day.is-start .kkf-book-was,
.kkf-book-day.is-end .kkf-book-was { color: #fff; }

.kkf-book-cal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--b-line);
}

.kkf-book-stay {
  font-size: 14.5px;
  color: var(--b-soft);
}

.kkf-book-stay strong {
  color: var(--b-ink);
  font-size: 16px;
}

.kkf-book-total {
  margin-left: 6px;
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--kkf-teal-wash, #eaf5f3);
  color: var(--b-teal);
  font-size: 13px;
  font-weight: 700;
}

.kkf-book-cal-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.kkf-book-clear {
  border: 0;
  background: none;
  padding: 10px 6px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: var(--b-soft);
  cursor: pointer;
}

.kkf-book-clear:hover { color: var(--b-ink); }

/* ---------------------------------------- guests */

.kkf-book-people {
  right: 0;
  width: min(360px, 100%);
  padding: 20px;
}

.kkf-book-count {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--b-line);
}

.kkf-book-count-copy strong {
  display: block;
  font-size: 15.5px;
  color: var(--b-ink);
}

.kkf-book-count-copy span {
  font-size: 12.5px;
  color: var(--b-soft);
}

.kkf-book-stepper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.kkf-book-stepper button {
  width: 36px;
  height: 36px;
  border: 1.5px solid var(--b-line);
  border-radius: 50%;
  background: #fff;
  color: var(--b-ink);
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
  transition: border-color var(--b-ease), background var(--b-ease),
    color var(--b-ease);
}

.kkf-book-stepper button:hover {
  border-color: var(--b-sun);
  background: var(--b-sun);
  color: #fff;
}

.kkf-book-count-value {
  min-width: 22px;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.kkf-book-people-note {
  margin: 14px 0 16px;
  color: var(--b-soft);
  font-size: 13px;
}

.kkf-book-people .kkf-modal-primary,
.kkf-book-cal-actions .kkf-modal-primary {
  min-height: 44px;
  padding: 11px 24px;
  font-size: 14.5px;
}

.kkf-book-people .kkf-modal-primary { width: 100%; justify-content: center; }

/* ---------------------------------------- summary strip */

.kkf-book-summary {
  margin-top: 12px;
  padding: 14px 20px;
  border: 1px solid var(--b-line);
  border-left: 4px solid var(--b-teal);
  border-radius: 14px;
  background: var(--kkf-teal-wash, #eaf5f3);
  color: var(--b-ink);
  font-size: 14.5px;
}

.kkf-book-summary[hidden] { display: none; }

.kkf-book-summary-price {
  margin-left: 8px;
  font-weight: 700;
  color: var(--b-teal);
}

/* ---------------------------------------- room cards */

.kkf-room-stay {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--b-line);
  text-align: right;
}

.kkf-room-stay[hidden] { display: none; }

.kkf-room-stay-nights {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--b-soft);
}

.kkf-room-stay-total {
  font-family: var(--kkf-font-display, Georgia, serif);
  font-size: 26px;
  font-weight: 600;
  line-height: 1;
  color: var(--b-teal);
}

.kkf-room-stay-warn {
  font-size: 11.5px;
  color: var(--kkf-warning, #96560a);
}

.kkf-room-stay-off {
  font-size: 13px;
  font-weight: 700;
  color: #b42318;
}

.kkf-hotel-room.is-unavailable { opacity: 0.6; }

.kkf-hotel-room.is-unavailable .kkf-modal-primary {
  pointer-events: none;
  filter: grayscale(1);
}

/* ---------------------------------------- responsive */

@media (max-width: 860px) {
  .kkf-book-bar { grid-template-columns: minmax(0, 1fr); }
  .kkf-book-cal { width: 100%; }
  .kkf-book-cal-body { grid-template-columns: minmax(0, 1fr); }
  .kkf-book-people { left: 0; right: auto; width: 100%; }
}

@media (max-width: 600px) {
  .kkf-book-day { min-height: 42px; border-radius: 8px; }
  .kkf-book-num { font-size: 12.5px; }
  .kkf-book-price { font-size: 9.5px; }
  .kkf-book-was { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .kkf-book * { transition: none !important; animation: none !important; }
}