/* Residency booking flow */

:root {
  --bk-terracotta: #C1442E;
  --bk-sand: #F5E6D3;
  --bk-ink: #2b2b2b;
  --bk-line: #e6e0d8;
}

.bk-wrap {
  background: #faf7f3;
  /* .navbar is position:absolute over the page and every other page has a 400px
     hero behind it. This page has none, so it must make its own room. */
  padding-top: 9.5rem;
  padding-bottom: 3rem;
}
@media (max-width: 991.98px) { .bk-wrap { padding-top: 7.5rem; } }
/* flatpickr swaps in its own input; keep our styling on it */
.flatpickr-input.bk-input, input.bk-input.form-control { height: 50px; }

/* ---- stepper ---- */
.bk-stepper { display: flex; gap: .5rem; list-style: none; padding: 0; margin: 0 0 2rem; }
.bk-stepper-item {
  flex: 1; text-align: center; font-size: .82rem; color: #9b9088;
  padding-top: .6rem; border-top: 3px solid var(--bk-line); transition: color .2s, border-color .2s;
}
.bk-stepper-item.is-active { color: var(--bk-terracotta); border-top-color: var(--bk-terracotta); font-weight: 600; }
.bk-stepper-item.is-done { color: var(--bk-ink); border-top-color: var(--bk-terracotta); }
.bk-stepper-item.is-done::before { content: "✓ "; color: var(--bk-terracotta); }

/* ---- panels ---- */
.bk-card {
  background: #fff; border: 1px solid var(--bk-line); border-radius: 14px;
  padding: 1.75rem; box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.bk-card + .bk-card { margin-top: 1.25rem; }
.bk-h { font-size: 1.45rem; color: var(--bk-terracotta); margin-bottom: .35rem; }
.bk-sub { color: #6f665f; font-size: .95rem; margin-bottom: 1.5rem; }

/* ---- fields: large targets, visible labels, no placeholder-only inputs ---- */
.bk-label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: .35rem; color: var(--bk-ink); }
.bk-optional { font-weight: 400; color: #9b9088; font-size: .8rem; }
.bk-input, .bk-select, .bk-textarea {
  width: 100%; padding: .75rem .9rem; font-size: 1rem; line-height: 1.4;
  border: 1px solid #d8d0c6; border-radius: 10px; background: #fff; color: var(--bk-ink);
  transition: border-color .15s, box-shadow .15s;
  font-family: inherit;
  -webkit-appearance: none; appearance: none;
  box-sizing: border-box;
}
.bk-input, .bk-select { height: 50px; }
.bk-select {
  padding-right: 2.5rem;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%236f665f'%3E%3Cpath d='M4.5 6.5 8 10l3.5-3.5'  stroke='%236f665f' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .9rem center; background-size: 16px;
}
.bk-input:focus, .bk-select:focus, .bk-textarea:focus {
  outline: none; border-color: var(--bk-terracotta);
  box-shadow: 0 0 0 3px rgba(193,68,46,.14);
}
.bk-input.is-invalid { border-color: #c0392b; background: #fdf6f5; }
.bk-textarea { min-height: 90px; resize: vertical; }
.bk-field { margin-bottom: 1.1rem; }
.bk-error { color: #c0392b; font-size: .85rem; margin-top: .35rem; }
.bk-hint { color: #8a8078; font-size: .82rem; margin-top: .3rem; }

/* ---- availability pill ---- */
.bk-avail { margin-top: .9rem; padding: .6rem .9rem; border-radius: 10px; font-size: .9rem; }
.bk-avail-ok { background: #eef7ee; color: #2f6b34; border: 1px solid #cfe6d0; }

.bk-note {
  background: var(--bk-sand); border-radius: 10px; padding: .75rem .9rem;
  font-size: .88rem; color: #6b5a49; margin-top: 1rem;
}

/* ---- add-on choice ---- */
.bk-choice {
  display: block; width: 100%; text-align: left; cursor: pointer;
  border: 2px solid var(--bk-line); border-radius: 12px; padding: 1rem 1.1rem;
  background: #fff; transition: border-color .15s, background .15s;
}
.bk-choice + .bk-choice { margin-top: .75rem; }
.bk-choice:hover { border-color: #d3bda9; }
.bk-choice.is-selected { border-color: var(--bk-terracotta); background: #fdf6f4; }
.bk-choice-title { font-weight: 600; color: var(--bk-ink); }

.bk-addon-list { list-style: none; padding: 0; margin: .75rem 0 0; }
.bk-addon-list li { padding-left: 1.5rem; position: relative; margin-bottom: .4rem; font-size: .92rem; }
.bk-addon-list li::before {
  content: "✓"; position: absolute; left: 0; color: var(--bk-terracotta); font-weight: 700;
}

/* ---- summary ---- */
.bk-summary { position: sticky; top: 1.5rem; }
.bk-summary .bk-card { padding: 1.35rem; }
.bk-sum-row { display: flex; justify-content: space-between; gap: 1rem; font-size: .92rem; padding: .3rem 0; }
.bk-sum-row dt { color: #6f665f; font-weight: 400; }
.bk-sum-row dd { margin: 0; text-align: right; font-weight: 500; }
.bk-sum-sep { border: 0; border-top: 1px solid var(--bk-line); margin: .8rem 0; }
.bk-sum-total { font-size: 1.05rem; font-weight: 700; }
.bk-sum-now { color: var(--bk-terracotta); font-weight: 700; font-size: 1.15rem; }
.bk-sum-arrival { color: #6f665f; }
.bk-sum-explain { font-size: .8rem; color: #9b9088; margin-top: .25rem; }

.bk-linkish {
  background: none; border: 0; padding: 0; font-size: .82rem;
  color: var(--bk-terracotta); text-decoration: underline; cursor: pointer;
}
#bk-summary-detail { display: none; }
#bk-summary-detail.show { display: block; }

/* ---- buttons ---- */
.bk-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .8rem 1.5rem; border-radius: 10px; font-weight: 600; font-size: 1rem;
  border: 1px solid transparent; cursor: pointer; transition: filter .15s;
}
.bk-btn-primary { background: var(--bk-terracotta); color: #fff; }
.bk-btn-primary:hover { filter: brightness(.93); }
.bk-btn-ghost { background: transparent; color: #6f665f; border-color: #d8d0c6; }
.bk-btn-ghost:hover { background: #f3ede6; }
.bk-actions { display: flex; gap: .75rem; align-items: center; margin-top: 1.5rem; }
.bk-actions .bk-btn-primary { margin-left: auto; }

/* ---- confirmation ---- */
.bk-done-badge {
  width: 56px; height: 56px; border-radius: 50%; background: #eef7ee; color: #2f6b34;
  display: flex; align-items: center; justify-content: center; font-size: 1.6rem; margin-bottom: 1rem;
}
.bk-ref {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1.2rem;
  letter-spacing: .04em; color: var(--bk-terracotta); font-weight: 700;
}

.bk-demo {
  background: #fff8e6; border: 1px solid #f0dfae; color: #7a5f16;
  border-radius: 10px; padding: .7rem 1rem; font-size: .85rem; margin-bottom: 1.5rem;
}

@media (max-width: 991.98px) {
  .bk-summary { position: static; margin-top: 1.5rem; }
  .bk-stepper-item { font-size: .72rem; }
  .bk-actions { flex-wrap: wrap; }
  .bk-actions .bk-btn { flex: 1 1 auto; }
}

/* ---- flatpickr, themed to match ---- */
.flatpickr-calendar { border-radius: 12px; box-shadow: 0 8px 30px rgba(0,0,0,.12); font-family: inherit; }
.flatpickr-day.selected, .flatpickr-day.startRange, .flatpickr-day.endRange {
  background: var(--bk-terracotta); border-color: var(--bk-terracotta);
}
.flatpickr-day.inRange {
  background: #fdf0ec; border-color: #fdf0ec; box-shadow: -5px 0 0 #fdf0ec, 5px 0 0 #fdf0ec;
}
.flatpickr-day.today { border-color: var(--bk-terracotta); }
.flatpickr-day.flatpickr-disabled { text-decoration: line-through; opacity: .45; }
.flatpickr-months .flatpickr-month { color: var(--bk-ink); }
.bk-input[readonly] { background: #fff; cursor: pointer; }

/* The flow's two columns (content 7 + summary 3) span the same ten columns as the
   page heading above them, so their left edges line up. On the confirmation the
   summary is hidden, leaving one 7-column child that flexbox re-centres — which
   pushed the card ~1.5 columns right of the heading. Pin it back to the same grid
   line instead, keeping the card's reading width rather than stretching it. */
@media (min-width: 992px) {
  .bk-row-noaside { justify-content: flex-start !important; }
  .bk-row-noaside > .col-lg-7 { margin-left: 8.3333%; }
}
