/* ==========================================================================
   Booking drawer — dates → room → details → done
   ========================================================================== */
.booking {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  justify-content: flex-end;
}
.booking[hidden] {
  display: none;
}
.booking-scrim {
  position: absolute;
  inset: 0;
  background: rgba(5, 9, 16, 0.62);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.45s var(--ease-out);
}
.booking.is-open .booking-scrim {
  opacity: 1;
}
.booking-panel {
  position: relative;
  width: min(540px, 100vw);
  height: 100%;
  background: var(--cotton);
  color: var(--ink);
  display: grid;
  grid-template-rows: auto 1fr auto;
  box-shadow: -30px 0 80px -30px rgba(0, 0, 0, 0.5);
  transform: translateX(104%);
  transition: transform 0.6s var(--ease-out);
  outline: none;
}
.booking.is-open .booking-panel {
  transform: none;
}
.bk-head {
  padding: 22px 28px 16px;
  border-bottom: 1px solid var(--line);
}
.bk-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.bk-head .kicker {
  margin: 0;
  color: var(--laterite);
}
.bk-head h2 {
  margin: 14px 0 18px;
  font-size: clamp(30px, 3vw, 40px);
}
.bk-close {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  background: rgba(27, 22, 18, 0.06);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.2s, transform 0.3s var(--ease-out);
}
.bk-close:hover {
  background: rgba(27, 22, 18, 0.12);
  transform: rotate(90deg);
}
.bk-close svg {
  width: 20px;
  height: 20px;
}
.bk-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  counter-reset: s;
}
.bk-steps li {
  counter-increment: s;
  position: relative;
  padding-top: 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.bk-steps li::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  border-radius: 3px;
  background: var(--sand-2);
  transition: background 0.4s;
}
.bk-steps li.is-done,
.bk-steps li.is-active {
  color: var(--ink);
}
.bk-steps li.is-done::before,
.bk-steps li.is-active::before {
  background: var(--laterite);
}

.bk-body {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 22px 28px 28px;
}
.bk-step[hidden] {
  display: none;
}
.bk-step {
  animation: stepIn 0.5s var(--ease-out);
}
@keyframes stepIn {
  from {
    opacity: 0;
    transform: translateX(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* calendar */
.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.cal-range {
  margin: 0;
  font-family: var(--f-display);
  font-size: 21px;
}
.cal-months {
  display: grid;
  gap: 6px;
}
.cal-mlabel {
  margin: 10px 0 4px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--laterite);
}
.cal-nav {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.cal-nav:hover:not(:disabled) {
  background: var(--sand);
}
.cal-nav:disabled {
  opacity: 0.3;
  cursor: default;
}
.cal-nav svg {
  width: 18px;
  height: 18px;
}
.cal-dow,
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}
.cal-dow {
  position: sticky;
  top: -22px;
  z-index: 2;
  background: var(--cotton);
  border-bottom: 1px solid var(--line);
}
.cal-dow span {
  text-align: center;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  padding: 6px 0;
}
.cal-grid {
  row-gap: 4px;
}
.cal-day {
  position: relative;
  aspect-ratio: 1.22;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 15px;
  font-weight: 650;
  cursor: pointer;
  border-radius: 0;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  -webkit-tap-highlight-color: transparent;
}
.cal-day span {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  transition: background 0.2s, color 0.2s;
}
.cal-day:hover:not(:disabled) span {
  background: var(--sand);
}
.cal-day:disabled {
  color: rgba(27, 22, 18, 0.25);
  cursor: default;
}
.cal-day.is-today span::after {
  content: "";
  position: absolute;
  bottom: 6px;
  left: 50%;
  width: 4px;
  height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: var(--laterite);
}
.cal-day.in-range {
  background: rgba(180, 80, 43, 0.12);
}
.cal-day.is-start,
.cal-day.is-end {
  background: rgba(180, 80, 43, 0.12);
}
.cal-day.is-start {
  border-radius: 12px 0 0 12px;
}
.cal-day.is-end {
  border-radius: 0 12px 12px 0;
}
.cal-day.is-start.is-end {
  border-radius: 12px;
  background: transparent;
}
.cal-day.is-start span,
.cal-day.is-end span {
  background: var(--ink) !important;
  color: var(--cotton);
}
.cal-day.is-start.is-today span::after,
.cal-day.is-end.is-today span::after {
  background: var(--gold);
}
.cal-empty {
  aspect-ratio: 1.22;
}
.cal-hint {
  margin: 12px 0 0;
  font-size: 14px;
  color: var(--ink-2);
  min-height: 1.6em;
}

.bk-guests {
  margin-top: 22px;
  border-top: 1px solid var(--line);
}
.bk-guest {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.bk-guest p {
  margin: 0;
}
.bk-guest .stepper {
  width: 150px;
}

/* rooms */
.bk-rooms {
  display: grid;
  gap: 12px;
}
.bk-room {
  position: relative;
  display: grid;
  grid-template-columns: 88px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 12px 16px 12px 12px;
  border-radius: 18px;
  background: var(--cotton-2);
  box-shadow: inset 0 0 0 1.5px var(--line);
  cursor: pointer;
  transition: box-shadow 0.25s, transform 0.25s var(--ease-out);
}
.bk-room:hover {
  transform: translateY(-2px);
}
.bk-room input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.bk-room:has(input:checked) {
  box-shadow: inset 0 0 0 2px var(--laterite);
}
.bk-room:has(input:focus-visible) {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}
.bk-room.is-off {
  opacity: 0.45;
  cursor: not-allowed;
}
.bk-room-art {
  width: 88px;
  height: 88px;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  background: var(--sand-2);
}
.bk-room-art img,
.bk-room-art canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.bk-room h3 {
  margin: 0 0 4px;
  font-family: var(--f-display);
  font-weight: 500;
  font-size: 19px;
  line-height: 1.15;
}
.bk-room .meta {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-2);
}
.bk-room .warn {
  margin: 4px 0 0;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--laterite);
}
.bk-room .price {
  text-align: right;
}
.bk-room .price b {
  display: block;
  font-family: var(--f-display);
  font-weight: 500;
  font-size: 24px;
  line-height: 1;
}
.bk-room .price small {
  font-size: 12px;
  color: var(--ink-3);
  font-weight: 600;
}
.bk-room .tick {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--laterite);
  color: #fff;
  display: grid;
  place-items: center;
  transform: scale(0);
  transition: transform 0.3s var(--ease-out);
}
.bk-room .tick svg {
  width: 13px;
  height: 13px;
}
.bk-room:has(input:checked) .tick {
  transform: scale(1);
}
.bk-room:has(input:checked) .price {
  padding-right: 18px;
}

/* details */
.bk-form {
  display: grid;
  gap: 14px;
}
.field {
  display: grid;
  gap: 7px;
  min-width: 0;
}
.field > span {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.field > span em {
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--ink-3);
}
.field input,
.field textarea {
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: var(--cotton-2);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  min-height: 50px;
  width: 100%;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea {
  resize: vertical;
  min-height: 84px;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--laterite);
  box-shadow: 0 0 0 4px rgba(180, 80, 43, 0.14);
}
.field.is-invalid input {
  border-color: #b3261e;
  box-shadow: 0 0 0 4px rgba(179, 38, 30, 0.12);
}
.field-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
}
.field-note {
  margin: -4px 0 0;
  font-size: 13px;
  color: var(--ink-3);
}
.field-note.is-error {
  color: #b3261e;
  font-weight: 700;
}
.toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(237, 178, 91, 0.2);
  cursor: pointer;
  font-weight: 600;
}
.toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.toggle-ui {
  flex: 0 0 44px;
  height: 26px;
  border-radius: 999px;
  background: var(--sand-2);
  position: relative;
  transition: background 0.25s;
}
.toggle-ui::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.3s var(--ease-out);
}
.toggle input:checked + .toggle-ui {
  background: var(--laterite);
}
.toggle input:checked + .toggle-ui::after {
  transform: translateX(18px);
}
.toggle input:focus-visible + .toggle-ui {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* done */
.bk-done {
  text-align: left;
}
.done-mark {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--laterite);
  color: #fff;
  display: grid;
  place-items: center;
  margin-bottom: 22px;
  animation: pop 0.6s var(--ease-out);
}
.done-mark svg {
  width: 30px;
  height: 30px;
}
@keyframes pop {
  from {
    transform: scale(0.4);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}
.bk-done .lede {
  margin: 12px 0 22px;
  font-size: 17px;
}
.done-summary {
  margin: 0 0 20px;
  border-radius: 16px;
  background: var(--cotton-2);
  box-shadow: inset 0 0 0 1px var(--line);
  padding: 6px 18px;
}
.done-summary div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}
.done-summary div:last-child {
  border-bottom: 0;
}
.done-summary dt {
  color: var(--ink-2);
}
.done-summary dd {
  margin: 0;
  font-weight: 700;
  text-align: right;
}
.done-summary .ref dd {
  font-family: var(--f-display);
  font-size: 20px;
  letter-spacing: 0.04em;
  color: var(--laterite);
}
.done-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.bk-preview {
  margin: 4px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(180, 80, 43, 0.1);
  color: var(--laterite-deep);
  font-size: 14px;
  font-weight: 600;
}

/* foot */
.bk-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 28px calc(16px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: var(--cotton-2);
}
.bk-foot[hidden] {
  display: none;
}
.bk-summary {
  font-size: 14px;
  line-height: 1.35;
  color: var(--ink-2);
  min-width: 0;
}
.bk-summary b {
  display: block;
  color: var(--ink);
  font-size: 15px;
}
.bk-summary .sum-meta {
  display: block;
}
.bk-summary .total {
  display: block;
  font-family: var(--f-display);
  font-size: 22px;
  color: var(--ink);
  font-weight: 500;
}
.bk-summary .total small {
  font-size: 0.62em;
}
.bk-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.bk-actions .btn--ghost {
  color: var(--ink);
}
.bk-actions .btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  animation: none;
}

@media (max-width: 600px) {
  .booking {
    align-items: flex-end;
  }
  .booking-panel {
    width: 100vw;
    height: calc(100% - 12px);
    height: calc(100dvh - 12px);
    border-radius: 22px 22px 0 0;
    transform: translateY(104%);
  }
  .bk-head {
    padding: 16px 16px 12px;
  }
  .bk-head h2 {
    margin: 8px 0 12px;
    font-size: 28px;
  }
  .bk-body {
    padding: 16px 16px 24px;
  }
  .bk-foot {
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  }
  .field-row {
    grid-template-columns: minmax(0, 1fr);
  }
  .bk-room {
    grid-template-columns: 64px 1fr;
    gap: 12px;
  }
  .bk-room-art {
    width: 64px;
    height: 64px;
  }
  .bk-room .price {
    grid-column: 2;
    text-align: left;
    display: flex;
    align-items: baseline;
    gap: 6px;
  }
  .bk-room .price b {
    display: inline;
    font-size: 20px;
  }
  .bk-actions .btn--primary {
    padding: 0 18px;
  }
  .bk-actions .btn--ghost {
    padding: 0 12px;
  }
  .bk-summary {
    font-size: 13px;
  }
  .bk-summary b {
    font-size: 14px;
  }
  .bk-summary .total {
    font-size: 19px;
  }
  .bk-foot:has(.total) .sum-meta {
    display: none;
  }
}
