/* Book Online page. Shared nav, buttons and footer live in site.css. */

.book-page {
  padding: calc(var(--nav-h) + 64px) 32px 100px;
}

/* One centred column: the Book now · Get a free quote · Trip fee calculator tabs, the form right
   under them, then Good to know */
.book-shell {
  max-width: 820px;
  margin: 0 auto;
  display: grid;
  gap: 48px;
}

.book-lead {
  font-size: 1.12rem;
  line-height: 1.7;
  color: var(--gray-500);
  margin-bottom: 22px;
}

.book-alt {
  padding-top: 22px;
  line-height: 1.6;
  border-top: 1px solid rgba(28, 53, 83, 0.12);
  color: var(--gray-500);
}

.book-alt a {
  color: var(--navy);
  font-weight: 700;
  white-space: nowrap;
}

.book-form {
  min-height: 320px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(28, 53, 83, 0.06);
  padding: 16px;
  position: relative;
}

.book-privacy {
  margin: 14px 10px 4px;
  font-size: 0.86rem;
  line-height: 1.6;
  color: var(--gray-500);
  text-align: center;
}

.book-privacy a {
  color: var(--navy);
  font-weight: 600;
}

@media (max-width: 960px) {
  .book-page {
    padding: calc(var(--nav-h) + 40px) 18px 72px;
  }

  .book-form {
    padding: 6px;
  }
}

@media (max-width: 560px) {
  .book-lead {
    font-size: 1rem;
    margin-bottom: 16px;
  }
}

/* ---------- Booking form steps ---------- */
.bk {
  padding: 30px 32px 32px;
  min-height: 0;
}

.bk-progress {
  height: 6px;
  margin-bottom: 32px;
  border-radius: var(--r-sm);
  background: var(--gray-100);
  overflow: hidden;
}

.bk-progress-bar {
  display: block;
  height: 100%;
  width: 20%;
  background: var(--red);
  border-radius: var(--r-sm);
  transition: width 0.35s ease;
}

.bk-step {
  border: 0;
  min-width: 0;
  animation: bkIn 0.3s ease;
}

@keyframes bkIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.bk-title {
  display: block;
  padding: 0;
  font-family: var(--display);
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
}

.bk-help {
  color: var(--gray-500);
  line-height: 1.6;
  margin-bottom: 18px;
}

.bk-help a {
  color: var(--navy);
  font-weight: 700;
}

.bk-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.bk-field > span {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--navy);
}

.bk-field em {
  font-style: normal;
  font-weight: 500;
  color: var(--gray-500);
}

.bk-field input,
.bk-field textarea {
  width: 100%;
  font: inherit;
  font-size: 16px; /* 16px stops iPhone zooming in on focus */
  color: var(--gray-800);
  background: var(--white);
  border: 1.5px solid rgba(28, 53, 83, 0.2);
  border-radius: var(--r-md);
  padding: 13px 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.bk-field textarea {
  resize: vertical;
}

.bk-field input:focus,
.bk-field textarea:focus {
  outline: 3px solid var(--navy);
  outline-offset: 2px;
  border-color: var(--navy);
}

.bk-field [aria-invalid="true"] {
  border-color: var(--red);
}

.bk-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 14px;
}

.bk-span {
  grid-column: 1 / -1;
}

.bk-check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 14px;
  font-size: 0.95rem;
  color: var(--gray-800);
  cursor: pointer;
}

.bk-check input {
  width: 20px;
  height: 20px;
  accent-color: var(--navy);
}

/* Quote photos */
.bk-photos {
  margin-top: 6px;
}

.bk-photos-label {
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 10px;
}

.bk-photos-label em {
  font-weight: 400;
  font-style: normal;
  color: var(--gray-500);
}

.bk-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.bk-photo,
.bk-photo-add {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--r-md);
  overflow: hidden;
}

.bk-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bk-photo.is-uploading img {
  opacity: 0.45;
}

.bk-photo.is-error img {
  opacity: 0.3;
  filter: grayscale(1);
}

.bk-photo-state {
  position: absolute;
  inset: auto 6px 6px;
  padding: 3px 6px;
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.92);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--navy);
  text-align: center;
}

.bk-photo.is-error .bk-photo-state {
  color: var(--red);
}

.bk-photo-remove {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 50%;
  background: rgba(20, 40, 64, 0.78);
  color: var(--white);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.bk-photo-add {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 2px dashed rgba(28, 53, 83, 0.28);
  color: var(--navy);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  background: var(--offwhite);
}

.bk-photo-add[hidden] {
  display: none;
}

.bk-photo-add:hover,
.bk-photo-add:focus-within {
  border-color: var(--navy);
}

.bk-photo-add svg {
  width: 26px;
  height: 26px;
}

.bk-photo-add input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.bk-optin {
  border: 0;
  padding: 0;
  margin: 18px 0 8px;
}

.bk-optin legend {
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
}

.bk-optin legend em {
  font-weight: 400;
  color: var(--gray-500);
}

.bk-optin .bk-check {
  align-items: flex-start;
  margin-bottom: 10px;
}

.bk-optin .bk-check input {
  flex: none;
  margin-top: 1px;
}

.bk-where-eg {
  margin: -8px 0 10px;
}

.bk-where-gps {
  margin: 0 0 12px;
}

.bk-msg {
  min-height: 0;
  font-size: 0.92rem;
  line-height: 1.5;
}

.bk-msg[data-tone="error"] {
  color: var(--red);
  margin: 4px 0 8px;
}

.bk-msg[data-tone="info"] {
  color: var(--navy);
  background: rgba(28, 53, 83, 0.06);
  padding: 10px 12px;
  border-radius: var(--r-sm);
  margin: 4px 0 8px;
}

.bk-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
}

.bk-actions .btn {
  margin-left: auto;
  min-width: 150px;
}

.bk-actions .btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

/* Navy buttons sit on the white card here, so the focus ring stays navy */
.bk-actions .btn-navy:focus-visible {
  outline-color: var(--navy);
}

.bk-back,
.bk-link {
  background: none;
  border: 0;
  padding: 10px 0;
  min-height: 44px;
  font: inherit;
  font-weight: 700;
  color: var(--gray-500);
  cursor: pointer;
}

.bk-back {
  min-width: 44px;
  text-align: left;
}

.bk-link {
  color: var(--navy);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* New / existing */
.bk-choice-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 8px 0 20px;
}

.bk-choice,
.bk-time {
  font: inherit;
  text-align: left;
  background: var(--white);
  border: 2px solid rgba(28, 53, 83, 0.14);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.bk-choice {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px;
}

.bk-choice strong {
  font-family: var(--display);
  font-weight: 700;
  color: var(--navy);
}

.bk-choice span {
  font-size: 0.88rem;
  color: var(--gray-500);
}

.bk-choice[aria-pressed="true"],
.bk-time:has(input:checked) {
  border-color: var(--navy);
  background: rgba(28, 53, 83, 0.05);
  box-shadow: 0 0 0 3px rgba(28, 53, 83, 0.1);
}

@media (hover: hover) {
  .bk-choice:hover,
  .bk-time:hover {
    border-color: rgba(28, 53, 83, 0.4);
  }
}

.bk-alert {
  margin: 0 0 14px;
  padding: 14px 16px;
  border-radius: var(--r-md);
  background: #FDECEC;
  border: 1.5px solid rgba(155, 44, 44, 0.3);
  color: var(--gray-800);
  line-height: 1.5;
}

.bk-alert strong {
  display: block;
  color: var(--red);
}

.bk-alert a {
  color: var(--red);
  font-weight: 700;
}

/* Dates and times */
.bk-times {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.bk-time {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 14px;
}

.bk-time input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* Window already booked on the picked day (from the Jobber schedule) */
.bk-time.is-taken {
  cursor: not-allowed;
  background: #F1F1F1;
  border-color: rgba(28, 53, 83, 0.08);
  box-shadow: none;
}

.bk-time.is-taken strong {
  color: var(--gray-500);
  text-decoration: line-through;
}

.bk-time.is-taken span {
  color: var(--red);
  font-weight: 700;
}

.bk-time strong {
  font-family: var(--display);
  font-weight: 700;
  color: var(--navy);
}

.bk-time span {
  font-size: 0.84rem;
  color: var(--gray-500);
}

/* Review */
.bk-summary {
  display: grid;
  gap: 0;
  margin: 8px 0 18px;
  border: 1.5px solid rgba(28, 53, 83, 0.12);
  border-radius: var(--r-md);
  overflow: hidden;
}

.bk-summary > div {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 12px;
  padding: 12px 16px;
}

.bk-summary > div + div {
  border-top: 1px solid rgba(28, 53, 83, 0.1);
}

.bk-summary dt {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray-500);
  padding-top: 2px;
}

.bk-summary dd {
  color: var(--gray-800);
  line-height: 1.5;
}

.bk-summary small {
  display: block;
  color: var(--red);
  font-weight: 600;
}

.bk-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Done */
.bk-done {
  text-align: center;
  padding: 20px 0 8px;
}

.bk-done-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--green);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
}

.bk-done-icon svg {
  width: 32px;
  height: 32px;
}

.bk-done h2 {
  font-size: 2rem;
  margin-bottom: 10px;
}

.bk-done p {
  color: var(--gray-800);
  line-height: 1.6;
  margin-bottom: 8px;
}

@media (max-width: 560px) {
  .bk {
    padding: 20px 16px 22px;
  }

  .bk-grid,
  .bk-choice-row {
    grid-template-columns: 1fr;
  }

  .bk-times {
    grid-template-columns: 1fr;
  }

  .bk-time {
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
  }

  .bk-summary > div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .bk-actions .btn {
    min-width: 0;
    flex: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bk-step,
  .bk-progress-bar {
    animation: none;
    transition: none;
  }
}

/* ---------- What's going on: stages ---------- */
.bk-stage {
  animation: bkIn 0.3s ease;
}

.bk-kicker {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 6px;
}

.bk-kicker strong {
  color: var(--navy);
}

#bk-describe {
  min-height: 140px;
  line-height: 1.55;
}

/* Category tiles */
.bk-cats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.bk-cat,
.bk-answer {
  font: inherit;
  background: var(--white);
  border: 2px solid rgba(28, 53, 83, 0.14);
  border-radius: var(--r-md);
  cursor: pointer;
  color: var(--navy);
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.bk-cat {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  text-align: left;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.25;
}

.bk-cat svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  color: var(--red);
}

.bk-cat[aria-checked="true"],
.bk-answer[aria-checked="true"] {
  border-color: var(--navy);
  background: rgba(28, 53, 83, 0.05);
  box-shadow: 0 0 0 3px rgba(28, 53, 83, 0.1);
}

@media (hover: hover) {
  .bk-cat:hover,
  .bk-answer:hover {
    border-color: rgba(28, 53, 83, 0.4);
  }
}

/* Questions */
.bk-answers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.bk-answer {
  padding: 15px 16px;
  text-align: left;
  font-weight: 600;
}

#bk-q-alert {
  margin-top: 14px;
}

/* Recommendation */
.bk-reco-card {
  border: 2px solid var(--navy);
  border-radius: var(--r-md);
  padding: 18px;
  background: rgba(28, 53, 83, 0.03);
}

.bk-reco-card.is-diag {
  border-color: var(--red);
  background: rgba(155, 44, 44, 0.04);
}

.bk-reco-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 8px;
}

.bk-reco-top strong {
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.25;
}

.bk-reco-price {
  flex-shrink: 0;
  text-align: right;
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--navy);
}

.is-diag .bk-reco-price {
  color: var(--red);
}

.bk-reco-price small {
  display: block;
  font-family: var(--body);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--gray-500);
}

.bk-reco-card > p {
  color: var(--gray-800);
  line-height: 1.55;
}

.bk-reco-credit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 6px 12px 6px 8px;
  border-radius: var(--pill);
  background: var(--navy);
  color: var(--white) !important;
  font-family: var(--display);
  font-size: 0.8rem;
  font-weight: 700;
}

.bk-reco-credit svg {
  width: 14px;
  height: 14px;
  color: var(--white);
}

.bk-reco-note {
  margin-top: 10px;
  font-size: 0.94rem;
}

.bk-reco-price s {
  font-size: 0.8em;
  color: var(--gray-500);
  font-weight: 700;
}

.bk-done-member {
  margin-top: 10px;
  padding: 10px 14px;
  border-radius: var(--r-md);
  background: var(--green-tint);
  color: var(--gray-800);
}

.bk-recap {
  list-style: none;
  margin: 16px 0 6px;
  display: grid;
  gap: 6px;
}

.bk-recap li {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  font-size: 0.88rem;
  padding-bottom: 6px;
  border-bottom: 1px dashed rgba(28, 53, 83, 0.15);
}

.bk-recap span {
  color: var(--gray-500);
}

.bk-recap strong {
  color: var(--navy);
  text-align: right;
}

/* ---------- Calendar ---------- */
.bk-cal {
  border: 1.5px solid rgba(28, 53, 83, 0.14);
  border-radius: var(--r-md);
  padding: 14px;
  margin-bottom: 18px;
}

.bk-cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.bk-cal-month {
  font-family: var(--display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
}

.bk-cal-nav {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid rgba(28, 53, 83, 0.18);
  background: var(--white);
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.bk-cal-nav svg {
  width: 18px;
  height: 18px;
}

.bk-cal-nav:disabled {
  opacity: 0.3;
  cursor: default;
}

.bk-cal-dow,
.bk-cal-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.bk-cal-dow span {
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--gray-500);
  padding: 4px 0;
}

.bk-cal-day {
  min-height: 44px;
  height: 52px;
  width: 100%;
  border: 0;
  border-radius: var(--r-md);
  background: rgba(28, 53, 83, 0.05);
  font: inherit;
  font-family: var(--display);
  font-weight: 700;
  color: var(--navy);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

@media (hover: hover) {
  .bk-cal-day:not(:disabled):hover {
    background: rgba(28, 53, 83, 0.14);
  }
}

.bk-cal-day:disabled {
  background: none;
  color: rgba(28, 53, 83, 0.25);
  cursor: default;
}

.bk-cal-day.is-today {
  box-shadow: inset 0 0 0 1.5px rgba(155, 44, 44, 0.5);
}

.bk-cal-day[aria-pressed="true"] {
  background: var(--navy);
  color: var(--white);
}

@media (max-width: 560px) {
  .bk-answers {
    grid-template-columns: 1fr;
  }

  .bk-cats {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .bk-cat {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 11px 12px;
    font-size: 0.86rem;
  }

  /* No bottom Call bar on the booking page (it competed with Continue), so no space for it either */
  body {
    padding-bottom: env(safe-area-inset-bottom);
  }

  .bk-cal {
    padding: 8px;
  }

  .bk-cal-day {
    height: 46px;
  }

  .bk-reco-top {
    flex-direction: column;
    gap: 4px;
  }

  .bk-reco-price {
    text-align: left;
  }

  .bk-reco-price small {
    display: inline;
    margin-left: 6px;
  }
}

/* Smallest phones: tighter calendar spacing so each day stays at least 44 px wide */
@media (max-width: 360px) {
  .bk-cal {
    padding: 6px;
  }

  .bk-cal-dow,
  .bk-cal-grid {
    gap: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bk-stage {
    animation: none;
  }
}

/* Keyboard focus: solid navy on the cream and white cards (well over 3:1). Step titles take focus
   from the script only, so screen readers announce each new screen; they don't need a ring. */
.bk :focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 2px;
}

.bk-time:has(input:focus-visible) {
  outline: 3px solid var(--navy);
  outline-offset: 2px;
}

.bk .bk-title:focus,
.bk-done h2:focus {
  outline: none;
}

/* Urgent: calling is the main action, booking online the quiet one */
#bk-call-now {
  margin-left: auto;
}

.bk-actions .bk-next-quiet {
  min-width: 0;
  margin-left: 0;
  background: none;
  border: 0;
  box-shadow: none;
  padding: 10px 0;
  color: var(--navy);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.bk-actions:has(#bk-call-now:not([hidden])) {
  flex-wrap: wrap;
}

.bk-summary > div.is-urgent dd {
  color: var(--red);
  font-weight: 700;
}

.bk-member-quiet {
  margin-top: 12px;
  color: var(--gray-800);
  font-size: 0.94rem;
}

.bk-done-preview {
  display: inline-block;
  margin: 8px 0 12px;
  padding: 6px 12px;
  border-radius: var(--r-sm);
  background: #FFF4D6;
  color: #6B4E00;
  font-weight: 700;
}

/* Membership sign-up: plan cards are shared .plan-card styles in site.css */
.bk-agree a {
  color: var(--navy);
  font-weight: 700;
}

.bk-check.bk-agree {
  align-items: flex-start;
  margin-top: 12px;
  font-weight: 600;
}

.bk-agree input {
  flex-shrink: 0;
  margin-top: 1px;
}


/* Membership sign-up: the details Alberta's internet sales rules ask us to show, as plain short lines */
.plan-terms {
  margin: 18px 0 14px;
}

.plan-terms .plan-note {
  margin-top: 8px;
}

.plan-terms strong {
  color: var(--navy);
}

.bk-print {
  padding: 0;
  border: 0;
  background: none;
  color: var(--navy);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

@media print {
  .site-header,
  .site-footer,
  .mobile-cta,
  .book-switch,
  .bk-actions,
  .bk-print {
    display: none !important;
  }
}
