/* Hairloom Beauty booking widget. Every selector is bk- scoped; colors and fonts come only from host tokens. */
.bk-app {
  --bk-pad: clamp(18px, 4.6vw, 40px);
  --bk-tint: color-mix(in srgb, var(--rose) 8%, var(--paper));
  --bk-ring: color-mix(in srgb, var(--rose) 72%, var(--ink));
  --bk-alert: color-mix(in srgb, var(--rose) 70%, var(--ink));
  position: relative;
  box-sizing: border-box;
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  padding: var(--bk-pad);
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.5;
  text-align: left;
  overflow-wrap: break-word;
  scroll-margin-top: 24px;
}
.bk-app *, .bk-app *::before, .bk-app *::after { box-sizing: border-box; }
.bk-app :focus { outline: none; }
.bk-app :focus-visible { outline: 2px solid var(--bk-ring); outline-offset: 2px; }
.bk-sr {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* top row + preview chip */
.bk-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 20px; }
.bk-eyebrow { margin: 0; min-width: 0; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); }
.bk-chip {
  flex: 0 0 auto; padding: 5px 8px 4px; border: 1px solid var(--brass); border-radius: 2px;
  font-size: 10.5px; line-height: 1; letter-spacing: .16em; text-transform: uppercase; color: var(--brass);
}

/* progress */
.bk-prog { display: flex; gap: 6px; list-style: none; margin: 0 0 clamp(24px, 4vw, 36px); padding: 0; }
.bk-prog-i {
  flex: 1 1 0; min-width: 0; display: flex; align-items: baseline; gap: 6px; padding-top: 9px;
  border-top: 2px solid var(--line); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bk-prog-i.is-done { border-top-color: color-mix(in srgb, var(--rose) 45%, var(--line)); }
.bk-prog-i.is-cur { border-top-color: var(--rose); color: var(--ink); }
.bk-prog-n { font-family: var(--f-display); font-style: italic; font-size: 14px; letter-spacing: 0; color: var(--brass); }
@media (max-width: 559px) {
  .bk-prog-i:not(.is-cur) .bk-prog-l { display: none; }
  .bk-prog-i.is-cur { flex-grow: 3; }
}

/* headings */
.bk-head { margin: 0 0 clamp(20px, 3.5vw, 30px); }
.bk-h {
  margin: 0; font-family: var(--f-display); font-style: italic; font-weight: 400;
  font-size: clamp(28px, 5.2vw, 40px); line-height: 1.08; letter-spacing: -.01em; color: var(--ink);
}
.bk-h:focus, .bk-h:focus-visible { outline: none; }
.bk-sub { margin: 10px 0 0; max-width: 56ch; font-size: 15.5px; color: var(--ink-2); }
.bk-group { margin: 0 0 clamp(22px, 3.5vw, 30px); min-width: 0; }
.bk-cat {
  display: flex; align-items: center; gap: 12px; margin: 0 0 12px; font-family: var(--f-body);
  font-weight: 500; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--brass);
}
.bk-cat::after { content: ""; flex: 1 1 auto; height: 1px; background: var(--line); }
.bk-leg { display: flex; align-items: baseline; gap: 12px; margin: 0 0 12px; font-family: var(--f-body); font-weight: 500; font-size: 17px; line-height: 1.3; color: var(--ink); }
.bk-num { flex: 0 0 auto; font-family: var(--f-display); font-style: italic; font-weight: 400; font-size: 15px; color: var(--brass); }

/* grids + option cards */
.bk-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.bk-grid--who { grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }
.bk-grid--slots { gap: 8px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 128px), 1fr)); }
.bk-opt { position: relative; display: block; min-width: 0; margin: 0; cursor: pointer; }
.bk-opt > input { position: absolute; top: 0; left: 0; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.bk-face {
  display: flex; align-items: center; gap: 14px; height: 100%; min-height: 60px; padding: 14px 16px;
  border: 1px solid var(--line); border-radius: 4px; background: var(--paper);
  transition: border-color .16s ease, background-color .16s ease;
}
.bk-face--svc { justify-content: space-between; }
.bk-opt.is-on .bk-face { border-color: var(--rose); background: var(--bk-tint); }
.bk-opt > input:focus-visible + .bk-face { outline: 2px solid var(--bk-ring); outline-offset: 2px; }
.bk-opt-main { flex: 1 1 auto; min-width: 0; }
.bk-opt-t { display: block; min-width: 0; font-size: 16px; line-height: 1.3; color: var(--ink); }
.bk-opt-s { display: block; margin-top: 3px; font-size: 13px; line-height: 1.35; color: var(--ink-2); }
.bk-tick {
  flex: 0 0 auto; display: grid; place-items: center; width: 26px; height: 26px;
  border: 1px solid var(--line); border-radius: 2px; font-size: 12.5px; font-weight: 500;
  font-variant-numeric: tabular-nums; color: var(--rose-ink);
  transition: background-color .16s ease, border-color .16s ease;
}
.bk-opt.is-on .bk-tick { background: var(--rose); border-color: var(--rose); }

/* cameo monograms */
.bk-cameo {
  flex: 0 0 auto; display: grid; place-items: center; width: 40px; height: 52px;
  border: 1px solid var(--brass); border-radius: 50%; background: var(--paper);
  box-shadow: inset 0 0 0 3px var(--paper), inset 0 0 0 4px color-mix(in srgb, var(--brass) 35%, var(--paper));
  font-family: var(--f-display); font-style: italic; font-size: 23px; line-height: 1; color: var(--ink);
}
.bk-opt.is-on .bk-cameo {
  background: var(--bk-tint);
  box-shadow: inset 0 0 0 3px var(--bk-tint), inset 0 0 0 4px color-mix(in srgb, var(--brass) 35%, var(--bk-tint));
}
.bk-cameo--any { border-style: dashed; font-size: 12px; letter-spacing: .03em; }
.bk-cameo--lg { width: 64px; height: 84px; font-size: 38px; }
.bk-note {
  margin: 0 0 clamp(22px, 3.5vw, 30px); padding: 12px 16px; border-left: 2px solid var(--sage);
  border-radius: 0 3px 3px 0; background: color-mix(in srgb, var(--sage) 10%, var(--paper));
  font-size: 15px; line-height: 1.45; color: var(--ink);
}

/* day strip */
.bk-days {
  position: relative; display: flex; gap: 8px; overflow-x: auto; overflow-y: hidden;
  margin: 0 -4px clamp(20px, 3.5vw, 28px); padding: 4px 4px 12px;
  scroll-snap-type: x proximity; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch;
  scrollbar-width: thin; scrollbar-color: var(--line) var(--paper);
}
.bk-day {
  flex: 0 0 66px; scroll-snap-align: start; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 1px; min-height: 82px; padding: 8px 4px; border: 1px solid var(--line);
  border-radius: 4px; background: var(--paper); color: var(--ink); font: inherit; cursor: pointer;
  transition: border-color .16s ease, background-color .16s ease;
}
.bk-day-w, .bk-day-m { font-size: 10.5px; line-height: 1.4; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.bk-day-n { font-family: var(--f-display); font-style: italic; font-size: 27px; line-height: 1.1; }
.bk-day.is-on { border-color: var(--rose); background: var(--bk-tint); }
.bk-day.is-full .bk-day-n { color: var(--ink-2); }
.bk-day:disabled { opacity: .42; cursor: not-allowed; }

/* time slots */
.bk-slot {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px;
  min-width: 0; min-height: 52px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 4px;
  background: var(--paper); color: var(--ink); font: inherit; text-align: left; cursor: pointer;
  transition: border-color .16s ease, background-color .16s ease;
}
.bk-slot-t { font-size: 16px; font-weight: 500; letter-spacing: .01em; font-variant-numeric: tabular-nums; }
.bk-slot-w { font-size: 12.5px; line-height: 1.3; color: var(--ink-2); }
.bk-slot.is-on { border-color: var(--rose); background: var(--bk-tint); }
.bk-with { margin: -4px 0 18px; font-size: 15px; color: var(--ink-2); }
.bk-pick { margin: 4px 0 0; font-size: 15px; color: var(--ink-2); }
.bk-strong { font-weight: 500; color: var(--ink); }
.bk-empty { padding: 28px 20px; border: 1px dashed var(--line); border-radius: 4px; text-align: center; }
.bk-empty-t { margin: 0 0 6px; font-family: var(--f-display); font-style: italic; font-size: 21px; line-height: 1.25; color: var(--ink); }
.bk-empty-s { margin: 0; font-size: 15px; color: var(--ink-2); }

/* footer + buttons */
.bk-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: clamp(24px, 4vw, 34px); padding-top: 18px; border-top: 1px solid var(--line);
}
.bk-foot--sticky {
  position: sticky; bottom: 0; z-index: 2;
  margin-left: calc(var(--bk-pad) * -1); margin-right: calc(var(--bk-pad) * -1); margin-bottom: calc(var(--bk-pad) * -1);
  padding: 14px var(--bk-pad); background: var(--paper); border-radius: 0 0 5px 5px;
}
.bk-count { margin: 0; min-width: 0; font-size: 14.5px; color: var(--ink-2); }
.bk-foot .bk-btn--pri { margin-left: auto; }
.bk-btn {
  -webkit-appearance: none; appearance: none; display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; max-width: 100%; padding: 0 24px; border: 1px solid var(--line); border-radius: 3px;
  background: none; color: var(--ink); font-family: var(--f-body); font-size: 15px; font-weight: 500;
  line-height: 1.2; letter-spacing: .05em; text-align: center; cursor: pointer;
  transition: background-color .16s ease, border-color .16s ease, opacity .16s ease;
}
.bk-btn--pri { background: var(--rose); border-color: var(--rose); color: var(--rose-ink); }
.bk-btn:disabled { opacity: .42; cursor: not-allowed; }
@media (hover: hover) {
  .bk-opt:hover .bk-face, .bk-day:hover:not(:disabled), .bk-slot:hover { border-color: color-mix(in srgb, var(--rose) 45%, var(--line)); }
  .bk-opt.is-on:hover .bk-face, .bk-day.is-on:hover, .bk-slot.is-on:hover { border-color: var(--rose); }
  .bk-btn--pri:hover:not(:disabled) {
    background: color-mix(in srgb, var(--rose) 86%, var(--ink));
    border-color: color-mix(in srgb, var(--rose) 86%, var(--ink));
  }
  .bk-btn--ghost:hover { border-color: var(--ink-2); }
}
@media (max-width: 479px) {
  .bk-foot--stack { flex-direction: column-reverse; align-items: stretch; }
  .bk-foot--stack .bk-btn { width: 100%; margin-left: 0; }
}

/* details form */
.bk-form { display: grid; gap: 20px; min-width: 0; }
.bk-row { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.bk-field { display: flex; flex-direction: column; gap: 7px; min-width: 0; margin: 0; padding: 0; border: 0; }
.bk-label { padding: 0; font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.bk-req { font-weight: 400; letter-spacing: .04em; text-transform: none; color: var(--brass); }
.bk-input {
  display: block; width: 100%; min-height: 50px; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: 3px; background: var(--bg); color: var(--ink); font-family: var(--f-body);
  font-size: 16px; line-height: 1.4; transition: border-color .16s ease;
}
.bk-input::placeholder { color: var(--ink-2); opacity: .8; }
.bk-input:focus-visible { border-color: var(--rose); outline-offset: 1px; }
.bk-ta { min-height: 112px; resize: vertical; }
.bk-field.is-bad .bk-input { border-color: var(--bk-alert); }
.bk-err { margin: 0; font-size: 13.5px; line-height: 1.4; color: var(--bk-alert); }
.bk-err:empty { display: none; }
.bk-hint { margin: -8px 0 0; font-size: 13.5px; color: var(--ink-2); }
.bk-form > .bk-err { margin-top: -14px; }
.bk-seg { display: flex; gap: 8px; margin-top: 2px; }
.bk-seg-i { position: relative; flex: 0 1 128px; min-width: 0; cursor: pointer; }
.bk-seg-i > input { position: absolute; top: 0; left: 0; width: 1px; height: 1px; margin: 0; opacity: 0; }
.bk-seg-face {
  display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 18px;
  border: 1px solid var(--line); border-radius: 3px; background: var(--paper); font-size: 15px;
  transition: border-color .16s ease, background-color .16s ease;
}
.bk-seg-i > input:checked + .bk-seg-face { border-color: var(--rose); background: var(--bk-tint); }
.bk-seg-i > input:focus-visible + .bk-seg-face { outline: 2px solid var(--bk-ring); outline-offset: 2px; }
.bk-check { display: flex; align-items: center; gap: 12px; width: fit-content; max-width: 100%; min-height: 48px; font-size: 15.5px; cursor: pointer; }
.bk-check > input { flex: 0 0 auto; width: 20px; height: 20px; margin: 0; accent-color: var(--rose); }

/* confirm summary */
.bk-sum { padding: clamp(16px, 3.4vw, 28px); border: 1px solid var(--line); border-radius: 4px; background: var(--bg); }
.bk-sum-top {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px;
  margin-bottom: 4px; padding-bottom: 14px; border-bottom: 1px solid var(--line);
}
.bk-sum-date { margin: 0; font-family: var(--f-display); font-style: italic; font-size: clamp(21px, 3.6vw, 26px); line-height: 1.2; }
.bk-sum-guest { margin: 0; font-size: 15px; }
.bk-dim { color: var(--ink-2); }
.bk-sum-list { list-style: none; margin: 0; padding: 0; }
.bk-sum-i { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.bk-sum-time { padding-top: 2px; font-size: 14px; letter-spacing: .02em; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--brass); }
.bk-sum-svc { display: block; font-weight: 500; }
.bk-sum-who { display: block; font-size: 14.5px; color: var(--ink-2); }
.bk-dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 18px; margin: 16px 0 0; font-size: 14.5px; }
.bk-dt { padding-top: 2px; font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }
.bk-dd { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }

/* final state */
.bk-done { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: clamp(16px, 5vw, 48px) 0 clamp(8px, 3vw, 24px); text-align: center; }
.bk-lede { margin: 0; max-width: 48ch; font-size: 16px; color: var(--ink-2); }

/* motion */
.bk-step--in { animation: bk-in .34s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes bk-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .bk-app *, .bk-app *::before, .bk-app *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
