/* The /book form (src/booking), in the look of the booking widget on Tina the Cleaner's site: a white card with a soft
   blue halo, a pale-blue header with the AGM mark, numbered steps, round days, times grouped by part of the day, fields
   set in pale-blue wells, and one royal-blue pill to send it. Her blue scale is the only colour here; errors are red.
   The type is the site's own Mona Sans. Loaded by book.html only. */

.bk {
  --b-50: #f0f5ff; --b-100: #e0eaff; --b-200: #c7d7fe; --b-300: #a1bcfc; --b-400: #7197f8;
  --b-500: #4a74f1; --b-600: #2f58e3; --b-700: #2545c4; --b-900: #22347a;
  --ink: #0f172a; --ink-soft: #334155; --muted: #64748b;
  --line: rgba(34, 52, 122, .08);
  --err: #d6452b; --err-soft: #fdeee9;
  position: relative; overflow: hidden; border-radius: 1.6rem; background: #fff; color: var(--ink);
  box-shadow: 0 0 0 1px var(--line), 0 2px 4px rgba(34, 52, 122, .06), 0 32px 64px -28px rgba(34, 52, 122, .42), 0 0 70px -12px rgba(74, 116, 241, .16);
}
.bk button, .bk a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.bk :focus-visible { outline: 2px solid var(--b-500); outline-offset: 2px; }

/* header */
.bk-head { padding: 1.25rem 1.75rem 0; border-bottom: 1px solid rgba(34, 52, 122, .06); background: linear-gradient(to bottom, var(--b-50), #fff); }
.bk-who { display: flex; align-items: center; gap: .875rem; padding-bottom: 1.25rem; }
.bk-avatar { flex: 0 0 auto; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--b-200); }
.bk-avatar i { display: block; width: 1.6rem; height: 1.6rem; background: var(--b-600); -webkit-mask: url(/images/logo-icon.png) center / contain no-repeat; mask: url(/images/logo-icon.png) center / contain no-repeat; }
.bk-who-text { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.25; }
.bk-who-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .78rem; font-weight: 500; color: var(--muted); }
.bk-who-text b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 1.08rem; font-weight: 700; letter-spacing: -.01em; color: var(--ink); }
.bk-badge { flex: 0 0 auto; display: inline-flex; align-items: center; gap: .4rem; padding: .4rem .75rem; border-radius: 999px; background: #fff; box-shadow: 0 0 0 1px var(--b-100); font-size: .74rem; font-weight: 600; color: var(--b-700); white-space: nowrap; }
.bk-badge svg { width: .8rem; height: .8rem; }

/* the steps */
.bk-steps { display: grid; gap: .75rem; margin: 0; padding: 0 0 1rem; list-style: none; }
.bk-steps button { display: block; width: 100%; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; border-radius: .375rem; }
.bk-steps button:disabled { cursor: default; }
.bk-bar { position: relative; display: block; height: 4px; overflow: hidden; border-radius: 999px; background: rgba(34, 52, 122, .08); }
.bk-bar i { position: absolute; inset: 0; transform-origin: left; border-radius: 999px; background: var(--b-600); }
.bk-step-label { display: flex; align-items: center; gap: .4rem; min-width: 0; margin-top: .55rem; font-size: .8rem; font-weight: 600; color: var(--muted); transition: color .2s; }
.bk-step-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk-step-num { flex: 0 0 auto; display: grid; place-items: center; width: 1.1rem; height: 1.1rem; border-radius: 50%; background: rgba(34, 52, 122, .07); font-size: .62rem; font-weight: 700; color: var(--muted); }
.bk-step-num svg { width: .62rem; height: .62rem; }
.bk-step-label.is-here { color: var(--ink); }
.bk-step-label.is-here .bk-step-num { background: var(--b-600); color: #fff; }
.bk-step-label.is-done { color: var(--b-700); }
.bk-step-label.is-done .bk-step-num { background: var(--b-100); color: var(--b-700); }
.bk-steps button:not(:disabled):hover .bk-step-label { color: var(--b-900); }

/* a page */
.bk-page { padding: 1.5rem 1.75rem 1.75rem; }
.bk-heading { display: flex; align-items: flex-start; gap: .75rem; margin-bottom: 1.25rem; }
.bk-heading h2 { font-size: 1.25rem; line-height: 1.25; font-weight: 700; letter-spacing: -.015em; color: var(--ink); outline: none; text-wrap: balance; }
.bk-heading p { margin-top: .25rem; font-size: .86rem; line-height: 1.4; color: var(--muted); }
.bk-heading p b { font-weight: 700; color: var(--ink); }
.bk-back { flex: 0 0 auto; display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 50%; border: 1px solid var(--b-200); background: #fff; color: var(--b-700); cursor: pointer; transition: border-color .2s, background-color .2s; }
.bk-back:hover { border-color: var(--b-400); background: var(--b-50); }
.bk-back svg { width: 1rem; height: 1rem; }
.bk-alert { display: flex; align-items: center; gap: .5rem; margin-bottom: 1rem; padding: .65rem .85rem; border-radius: .75rem; background: var(--err-soft); color: #7a2412; font-size: .82rem; font-weight: 600; }
.bk-alert svg { flex: 0 0 auto; width: 1rem; height: 1rem; color: var(--err); }
.bk-empty { padding: 1.1rem; border-radius: .875rem; background: var(--b-50); font-size: .88rem; line-height: 1.5; color: var(--ink-soft); text-align: center; }
.bk-empty a { font-weight: 700; color: var(--b-700); text-decoration: underline; text-underline-offset: 2px; }

/* the month */
.bk-cal { overflow-x: clip; }
.bk-cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .75rem; }
.bk-cal-month { font-size: 1rem; font-weight: 700; color: var(--ink); }
.bk-cal-head div { display: flex; gap: .375rem; }
.bk-cal-head button { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border: 0; border-radius: 50%; background: var(--b-50); color: var(--b-700); cursor: pointer; transition: background-color .2s, color .2s; }
.bk-cal-head button:hover:not(:disabled) { background: var(--b-100); }
.bk-cal-head button:disabled { background: transparent; color: rgba(100, 116, 139, .3); cursor: default; }
.bk-cal-head svg { width: 1rem; height: 1rem; }
.bk-cal-dows, .bk-cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); column-gap: .25rem; }
.bk-cal-dows { padding-bottom: .5rem; }
.bk-cal-grid { row-gap: .375rem; }
.bk-cal-dow { font-size: .7rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; text-align: center; color: var(--muted); }
.bk-day { position: relative; isolation: isolate; display: grid; place-items: center; width: 100%; max-width: 3.1rem; aspect-ratio: 1; margin: 0 auto; padding: 0; border: 0; border-radius: 50%; background: none; font-size: .92rem; font-weight: 500; color: rgba(100, 116, 139, .35); cursor: default; transition: background-color .2s, color .2s, box-shadow .2s; }
.bk-day.is-open { background: var(--b-50); font-weight: 700; color: var(--b-700); cursor: pointer; }
.bk-day.is-open:hover { background: var(--b-100); box-shadow: inset 0 0 0 1.5px var(--b-400); }
.bk-day.is-picked, .bk-day.is-picked:hover { color: #fff; box-shadow: none; }
.bk-today { position: absolute; bottom: 18%; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--b-500); }
.bk-day.is-picked .bk-today { background: #fff; }

/* the highlight under a picked day or time: one element that glides to the new pick (layoutId) */
.bk-pick { position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: var(--b-600); box-shadow: 0 10px 22px -10px rgba(47, 88, 227, .95); }
.bk-num { position: relative; display: inline-flex; align-items: center; gap: .35rem; }
.bk-num svg { width: .9rem; height: .9rem; }

/* the times */
.bk-parts { display: flex; flex-direction: column; gap: 1.25rem; max-height: 26rem; overflow-y: auto; margin: -3px; padding: 3px 3px 8px; overscroll-behavior: contain; }
.bk-part { display: flex; align-items: center; gap: .5rem; margin-bottom: .625rem; font-size: .72rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.bk-part svg { width: .9rem; height: .9rem; color: var(--b-500); }
.bk-times { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
.bk-time { position: relative; isolation: isolate; height: 3rem; border: 1px solid var(--b-200); border-radius: .75rem; background: #fff; font-size: .95rem; font-weight: 600; color: var(--b-700); cursor: pointer; transition: border-color .2s, background-color .2s, color .2s; }
.bk-time:hover { border-color: var(--b-500); background: var(--b-50); }
.bk-time.is-picked, .bk-time.is-picked:hover { border-color: var(--b-600); background: transparent; color: #fff; }

.bk-zone { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .5rem; margin-top: 1.1rem; font-size: .8rem; color: var(--muted); }
.bk-zone svg { width: .9rem; height: .9rem; color: var(--b-500); }
.bk-zone button { padding: 0; border: 0; background: none; font-size: .8rem; font-weight: 700; color: var(--b-700); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }

/* the details: fields in pale-blue wells that lift to white with a blue ring on focus */
.bk-hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.bk-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.bk-field { display: flex; flex-direction: column; min-width: 0; }
.bk-field.is-wide { grid-column: 1 / -1; }
.bk-field label { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; margin-bottom: .375rem; font-size: .8rem; font-weight: 600; color: var(--ink); }
.bk-field label span { font-size: .74rem; font-weight: 500; color: var(--muted); }
.bk-field input, .bk-field textarea, .bk-phone select { width: 100%; min-width: 0; height: 2.85rem; padding: 0 .875rem; border: 1px solid rgba(15, 23, 42, .1); border-radius: .75rem; background: rgba(240, 245, 255, .45); font: inherit; font-size: 16px; color: var(--ink); transition: border-color .25s, background-color .25s, box-shadow .25s; }
.bk-field textarea { height: auto; min-height: 5.5rem; padding: .65rem .875rem; line-height: 1.5; resize: vertical; }
.bk-field input::placeholder, .bk-field textarea::placeholder { color: rgba(100, 116, 139, .7); }
.bk-field input:hover, .bk-field textarea:hover, .bk-phone select:hover { border-color: rgba(15, 23, 42, .2); }
.bk-field input:focus, .bk-field textarea:focus, .bk-phone select:focus { outline: none; border-color: var(--b-500); background: #fff; box-shadow: 0 0 0 4px rgba(199, 215, 254, .6); }
.bk-field.is-error input, .bk-field.is-error textarea { border-color: var(--err); }
.bk-field.is-error input:focus, .bk-field.is-error textarea:focus { box-shadow: 0 0 0 4px rgba(214, 69, 43, .15); }
.bk-err { margin-top: .375rem; font-size: .75rem; font-weight: 500; line-height: 1.35; color: var(--err); }
.bk-phone { display: grid; grid-template-columns: 7.4rem minmax(0, 1fr); gap: .5rem; }
.bk-phone select { padding: 0 .55rem; font-size: 15px; }

/* the buttons */
.bk-btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; height: 3.25rem; padding: 0 1.5rem; border: 0; border-radius: 999px; font: inherit; font-size: 1rem; font-weight: 700; white-space: nowrap; cursor: pointer; transition: background-color .25s, box-shadow .25s, color .25s; }
.bk-btn svg { width: 1rem; height: 1rem; }
.bk-btn.is-red { background: var(--b-600); color: #fff; box-shadow: 0 1px 2px rgba(34, 52, 122, .2); }
.bk-btn.is-red:hover { background: var(--b-700); box-shadow: 0 14px 28px -14px rgba(47, 88, 227, .7); }
.bk-btn.is-red:disabled { cursor: progress; background: var(--b-700); }
.bk-btn.is-ghost { background: #fff; color: var(--b-700); box-shadow: inset 0 0 0 1px var(--b-200); }
.bk-btn.is-ghost:hover { background: var(--b-50); box-shadow: inset 0 0 0 1px var(--b-400); }
form .bk-btn.is-red { width: 100%; margin-top: 1.5rem; }
.bk-dots { display: inline-flex; gap: 3px; margin-left: 2px; }
.bk-dots i { width: 4px; height: 4px; border-radius: 50%; background: currentColor; animation: bk-dot 1s ease-in-out infinite; }
.bk-dots i:nth-child(2) { animation-delay: .15s; }
.bk-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes bk-dot { 0%, 100% { opacity: .3; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-2px); } }
.bk-small { margin-top: .75rem; font-size: .76rem; color: var(--muted); text-align: center; }
.bk-small a { font-weight: 700; color: var(--b-700); }
.bk-small a:hover { text-decoration: underline; text-underline-offset: 2px; }
.bk-fail { margin-bottom: 1.25rem; padding: .9rem 1rem; border-radius: .875rem; background: var(--err-soft); font-size: .82rem; line-height: 1.5; color: #5c1d10; }
.bk-fail p:first-child { display: flex; align-items: center; gap: .45rem; margin-bottom: .2rem; font-weight: 700; color: var(--ink); }
.bk-fail svg { width: 1rem; height: 1rem; color: var(--err); }
.bk-fail a { font-weight: 700; color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }

/* the foot */
.bk-foot { margin: 0; padding: .75rem 1.25rem; border-top: 1px solid rgba(34, 52, 122, .06); background: rgba(240, 245, 255, .5); font-size: .74rem; font-weight: 500; line-height: 1.6; color: var(--muted); text-align: center; }
.bk-foot span { white-space: nowrap; }
.bk-foot svg { display: inline-block; width: .82rem; height: .82rem; margin-right: .35rem; vertical-align: -2px; color: var(--b-600); }

/* closed, failed to load, booked */
.bk-notice, .bk-done { padding: 2rem 1.75rem 1.9rem; }
.bk-notice h2, .bk-done h2 { margin-top: 1.1rem; font-size: 1.5rem; line-height: 1.2; font-weight: 700; letter-spacing: -.02em; outline: none; }
.bk-notice > p { margin-top: .6rem; font-size: .95rem; line-height: 1.55; color: var(--ink-soft); white-space: pre-line; }
.bk-notice-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.5rem; }
.bk-mark { display: inline-grid; place-items: center; width: 3rem; height: 3rem; border-radius: 50%; background: var(--b-50); color: var(--b-700); }
.bk-mark svg { width: 1.3rem; height: 1.3rem; }
.bk-tick { width: 3.5rem; height: 3.5rem; overflow: visible; filter: drop-shadow(0 10px 18px rgba(47, 88, 227, .35)); }
.bk-tick-disc { fill: var(--b-600); transform-origin: center; transform-box: fill-box; }
.bk-tick-mark { stroke: #fff; }
.bk-done-when { display: flex; flex-direction: column; gap: .2rem; margin-top: 1rem; padding: 1rem 1.1rem; border-radius: 1rem; background: var(--b-50); box-shadow: inset 0 0 0 1px var(--b-100); }
.bk-done-when b { font-size: 1.08rem; font-weight: 700; color: var(--ink); }
.bk-done-when span { font-size: .85rem; color: var(--muted); }
.bk-done-list { display: flex; flex-direction: column; gap: .6rem; margin: 1.2rem 0 1.5rem; }
.bk-done-list li { display: flex; align-items: flex-start; gap: .6rem; font-size: .88rem; line-height: 1.45; color: var(--ink-soft); overflow-wrap: anywhere; }
.bk-done-list svg { flex: 0 0 auto; width: 1rem; height: 1rem; margin-top: .15rem; color: var(--b-600); }
.bk-done-list a { font-weight: 700; color: var(--b-700); }

/* loading */
.bk-sk, .bk-sk-bars i, .bk-sk-grid i { display: block; height: .9rem; border-radius: .4rem; background: linear-gradient(90deg, #eef2fb 0%, #e3e9f7 50%, #eef2fb 100%) 0 0 / 200% 100%; animation: bk-shimmer 1.4s linear infinite; }
.bk-mark.is-sk { width: 2.75rem; height: 2.75rem; background: #e8eefc; }
.bk-sk-bars { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; padding-bottom: 2.2rem; }
.bk-sk-bars i { height: 4px; }
.bk-sk-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: .375rem .25rem; margin-top: 1.6rem; }
.bk-sk-grid i { height: auto; aspect-ratio: 1; max-width: 3.1rem; border-radius: 50%; }
@keyframes bk-shimmer { to { background-position: -200% 0; } }

/* the booked moment (celebrate.ts): a blue flash and two shockwaves from the card, and the card popping with a glow */
.bk-celebrate { position: fixed; inset: 0; z-index: 389; pointer-events: none; overflow: hidden; }
.bk-flash { position: absolute; inset: 0; background: radial-gradient(circle at var(--x) var(--y), rgba(74, 116, 241, .38) 0%, rgba(74, 116, 241, .12) 32%, rgba(74, 116, 241, 0) 62%); opacity: 0; animation: bk-flash 1.5s cubic-bezier(.16, 1, .3, 1) forwards; }
.bk-ring { position: absolute; left: var(--x); top: var(--y); width: 48px; height: 48px; margin: -24px 0 0 -24px; border-radius: 50%; border: 3px solid rgba(74, 116, 241, .9); box-shadow: 0 0 24px rgba(74, 116, 241, .55), inset 0 0 18px rgba(74, 116, 241, .3); opacity: 0; animation: bk-ring 1.15s cubic-bezier(.16, 1, .3, 1) forwards; }
.bk-ring.is-2 { border-width: 2px; animation-delay: .16s; animation-duration: 1.35s; }
@keyframes bk-flash { 0% { opacity: 0; } 10% { opacity: 1; } 100% { opacity: 0; } }
@keyframes bk-ring { 0% { opacity: .95; transform: scale(.2); } 100% { opacity: 0; transform: scale(34); } }
.bk.bk-pop { animation: bk-pop 1.2s cubic-bezier(.16, 1, .3, 1); }
@keyframes bk-pop {
  8% { transform: scale(.975); }
  30% { transform: scale(1.018); box-shadow: 0 0 0 6px rgba(74, 116, 241, .25), 0 30px 70px -20px rgba(47, 88, 227, .55); }
  100% { transform: scale(1); }
}

@media (max-width: 480px) {
  .bk-head { padding: 1.1rem 1.1rem 0; }
  .bk-page { padding: 1.25rem 1.1rem 1.4rem; }
  .bk-notice, .bk-done { padding-left: 1.2rem; padding-right: 1.2rem; }
  .bk-badge { display: none; }
  .bk-fields { grid-template-columns: minmax(0, 1fr); }
  .bk-phone { grid-template-columns: 6.6rem minmax(0, 1fr); }
}
@media (min-width: 560px) { .bk-times { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) { .bk-celebrate { display: none; } .bk.bk-pop { animation: none; } .bk-dots i, .bk-sk, .bk-sk-bars i, .bk-sk-grid i { animation: none; } }
