/* Booking widget (js/booking.js). Reads the design v2 tokens, so it follows the theme.
   One raised card; everything inside sits flat on it (no surface on a surface). Controls
   share the buttons' soft corners (--r-btn). */

.cta-embed:has(.bk) { max-width: 920px; }

.bk {
  position: relative;
  text-align: left;
  background: var(--bg-raised);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-2);
  padding: 32px 36px 36px;
  min-height: 520px;
  color: var(--text);
}
.bk-panel.is-entering > * { animation: bk-in 0.42s var(--spring) both; }
.bk-panel.is-entering > *:nth-child(2) { animation-delay: 0.04s; }
.bk-panel.is-entering > *:nth-child(3) { animation-delay: 0.08s; }
@keyframes bk-in { from { opacity: 0; transform: translateY(6px); } }

.bk-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* head: what you are booking, and the time zone */
.bk-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding-bottom: 24px; border-bottom: 1px solid var(--hairline); }
.bk-meta { margin: 6px 0 0; font-size: 13px; font-weight: 600; letter-spacing: 0.01em; color: var(--accent); }
.bk-title { margin: 0; font-family: var(--font-body, inherit); font-size: 23px; line-height: 1.2; letter-spacing: -0.022em; font-weight: 700; color: var(--text); }
.bk-tz { display: grid; gap: 6px; font-size: 12px; color: var(--text-muted); flex: 0 1 240px; min-width: 0; }
.bk-tz-select, .bk-field input, .bk-field textarea {
  font: inherit; font-size: 15px; color: var(--text);
  background-color: transparent;
  border: 1px solid var(--hairline-strong); border-radius: var(--r-btn, 10px);
  padding: 10px 12px; width: 100%; min-width: 0;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.bk-tz-select {
  appearance: none; -webkit-appearance: none; padding-right: 34px; font-size: 14px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%;
  background-size: 5px 5px; background-repeat: no-repeat;
}
.bk-tz-select option { background: var(--bg-raised); color: var(--text); }
.bk-tz-select:focus-visible, .bk-field input:focus-visible, .bk-field textarea:focus-visible {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}
.bk-notice { margin: 20px 0 0; padding: 12px 14px; font-size: 14px; color: var(--text); border-left: 2px solid var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }

/* body: month on the left, that day's times on the right */
.bk-body { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 0; padding-top: 24px; }
.bk-cal { padding-right: 32px; border-right: 1px solid var(--hairline); }
.bk-slots { padding-left: 32px; min-width: 0; }

.bk-month { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.bk-month-name { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.bk-month-nav { display: flex; gap: 4px; }
.bk-nav {
  display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0;
  color: var(--accent); background: transparent;
  border: 1px solid transparent; border-radius: var(--r-btn, 10px); cursor: pointer;
  transition: background-color 0.15s ease, transform 0.1s ease-out;
}
.bk-nav:hover:not(:disabled) { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.bk-nav:active:not(:disabled) { transform: scale(0.94); }
.bk-nav svg { width: 16px; height: 16px; }
.bk-nav:disabled { color: var(--text-subtle); opacity: 0.45; cursor: default; }

.bk-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.bk-dow { padding: 4px 0 8px; text-align: center; font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-subtle); }
.bk-day {
  position: relative; display: grid; place-items: center; height: 44px; padding: 0;
  font: inherit; font-size: 15px; font-variant-numeric: tabular-nums; color: var(--text-subtle);
  background: transparent; border: 0; border-radius: var(--r-btn, 10px);
}
span.bk-day { opacity: 0.6; }
.bk-day.is-today::after { content: ''; position: absolute; bottom: 5px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: currentColor; }
button.bk-day.is-open {
  cursor: pointer; font-weight: 600; color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.1s ease-out;
}
button.bk-day.is-open:not(.is-selected):hover { background-color: color-mix(in srgb, var(--accent) 18%, transparent); }
button.bk-day:active { transform: scale(0.94); }
button.bk-day.is-open.is-selected { color: #fff; background: var(--grad); box-shadow: 0 6px 16px -8px rgba(110,86,207,0.7); }
.bk-grid.is-loading .bk-day { opacity: 0.35; }

.bk-slots-head { margin: 6px 0 16px; font-size: 15px; font-weight: 600; color: var(--text); }
.bk-slot-list { display: grid; gap: 8px; max-height: 336px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--scroll-thumb) transparent; padding: 2px; margin: -2px; }
.bk-slot {
  font: inherit; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; text-align: center;
  padding: 12px 14px; color: var(--accent); background: transparent;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); border-radius: var(--r-btn, 10px); cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.1s ease-out;
}
.bk-slot:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.bk-slot:active { transform: scale(0.98); }
.bk-skel { display: block; height: 46px; border-radius: var(--r-btn, 10px); background: linear-gradient(90deg, var(--bg-raised-2) 0%, var(--hairline) 50%, var(--bg-raised-2) 100%); background-size: 200% 100%; animation: bk-shimmer 1.4s ease-in-out infinite; }
@keyframes bk-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

.bk-day:focus-visible, .bk-slot:focus-visible, .bk-nav:focus-visible, .bk-back:focus-visible, .bk-check input:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}

/* details */
.bk-back {
  flex: none; font: inherit; font-size: 14px; font-weight: 600; color: var(--accent); background: transparent;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); border-radius: var(--r-btn, 10px); padding: 9px 14px; cursor: pointer;
  transition: background-color 0.15s ease, transform 0.1s ease-out;
}
.bk-back:hover { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.bk-back:active { transform: scale(0.97); }
.bk-form { display: grid; gap: 18px; padding-top: 24px; }
.bk-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.bk-field { display: grid; gap: 7px; font-size: 13px; font-weight: 600; color: var(--text); min-width: 0; }
.bk-field em { font-style: normal; font-weight: 400; color: var(--text-muted); }
.bk-field textarea { resize: vertical; min-height: 84px; line-height: 1.5; }
.bk-field input::placeholder { color: var(--text-subtle); }
.bk-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.bk-check { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; line-height: 1.5; color: var(--text-muted); cursor: pointer; }
.bk-check input { flex: none; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); border-radius: 4px; }
.bk-fine { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--text-muted); }
.bk-fine a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.bk-error { margin: 0; padding: 12px 14px; font-size: 14px; color: var(--text); border-left: 2px solid var(--danger); background: color-mix(in srgb, var(--danger) 9%, transparent); }
.bk .bk-submit { justify-self: start; min-width: 220px; justify-content: center; border: 0; cursor: pointer; font: inherit; font-weight: 600; }
.bk .bk-submit:disabled { opacity: 0.7; cursor: progress; transform: none !important; }

/* booked */
.bk-done { display: grid; justify-items: center; text-align: center; padding: 40px 0 8px; }
.bk-done-mark { position: relative; width: 56px; height: 56px; margin-bottom: 20px; border-radius: 50%; background-image: var(--grad); box-shadow: 0 10px 24px -10px rgba(110,86,207,0.7); animation: bk-pop 0.5s var(--spring) both; }
.bk-done-mark::after { content: ''; position: absolute; left: 21px; top: 15px; width: 11px; height: 20px; border: solid #fff; border-width: 0 3px 3px 0; transform: rotate(45deg); }
@keyframes bk-pop { from { opacity: 0; transform: scale(0.6); } }
.bk-done .bk-title { font-size: 28px; outline: none; }
.bk-done-when { margin: 10px 0 0; font-size: 17px; font-weight: 600; color: var(--accent); }
.bk-done-note { margin: 8px 0 0; font-size: 15px; color: var(--text-muted); max-width: 440px; }
.bk-done-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 28px; }

/* none of these times work: the way to suggest one, under the calendar, and its form */
.bk-other { margin: 24px 0 0; padding-top: 18px; border-top: 1px solid var(--hairline); font-size: 14px; color: var(--text-muted); }
.bk-other-btn {
  font: inherit; font-weight: 600; color: var(--accent); background: none; border: 0; padding: 6px 2px; margin: -6px 0; cursor: pointer;
  text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent); text-underline-offset: 3px;
  transition: text-decoration-color 0.15s ease;
}
.bk-other-btn:hover { text-decoration-color: var(--accent); }
.bk-other-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.bk-lead { margin: 0; font-size: 15px; line-height: 1.55; color: var(--text-muted); }
.bk-field textarea::placeholder { color: var(--text-subtle); }

.bk-fallback { display: grid; justify-items: center; gap: 20px; text-align: center; padding: 80px 0; }
.bk-fallback-msg { margin: 0; font-size: 16px; color: var(--text-muted); max-width: 420px; }

/* phones: one column, times under the month */
@media (max-width: 760px) {
  .bk { padding: 22px 18px 24px; min-height: 0; border-radius: var(--r-md); }
  .bk-head { flex-direction: column; align-items: stretch; gap: 16px; padding-bottom: 18px; }
  .bk-tz { flex: none; }
  .bk-title { font-size: 20px; }
  .bk-day { height: 40px; }
  .bk-body { grid-template-columns: 1fr; padding-top: 18px; }
  .bk-cal { padding-right: 0; border-right: 0; padding-bottom: 20px; border-bottom: 1px solid var(--hairline); }
  .bk-slots { padding-left: 0; padding-top: 18px; }
  .bk-slot-list { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: none; }
  .bk-row { grid-template-columns: 1fr; }
  .bk-other { margin-top: 20px; }
  .bk-other-btn { padding: 12px 2px; margin: -12px 0; }
  .bk .bk-submit { justify-self: stretch; }
  .bk-done-actions { flex-direction: column; align-self: stretch; }
}

@media (prefers-reduced-motion: reduce) {
  .bk-panel.is-entering > *, .bk-done-mark { animation: none; }
  .bk-skel { animation: none; }
  .bk-day, .bk-slot, .bk-nav, .bk-back, .bk-other-btn { transition: none; }
}
@media (prefers-contrast: more) {
  button.bk-day.is-open, .bk-slot { border: 1px solid var(--accent); }
}

/* where to look if the confirmation is not in the inbox */
.bk-spam { max-width: 480px; margin: 0; padding: 12px 16px; font-size: 13.5px; line-height: 1.55; text-align: left; color: var(--text-muted); border: 1px solid var(--hairline-strong); border-radius: var(--r-btn, 10px); background: color-mix(in srgb, var(--accent) 6%, transparent); }
.bk-spam strong { color: var(--text); font-weight: 600; }
.bk-done .bk-spam { margin-top: 20px; }
