/* Customer Flow Studio — interactive booking demo page.
   Loaded after site.css; reuses its tokens, buttons, fields and choices. */

.bd-page {
  background: var(--cream);
}

.bd {
  padding: 20px var(--gutter) 72px;
}

.bd:focus {
  outline: none;
}

.bd-shell {
  max-width: 680px;
  margin-inline: auto;
}

/* Top: label + progress ---------------------------------------------------- */

.bd-top {
  display: grid;
  gap: 14px;
  margin-bottom: 26px;
}

.bd-flag {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

.bd-progress {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bd-progress li {
  display: grid;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 650;
  line-height: 1.2;
  color: var(--muted);
}

/* The bar for each step */
.bd-progress li::before {
  content: "";
  height: 4px;
  border-radius: 4px;
  background: var(--line-strong);
}

.bd-progress li.is-done::before,
.bd-progress li[aria-current]::before {
  background: var(--thread);
}

.bd-progress li[aria-current] {
  color: var(--teal);
}

.bd-progress__num {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

@media (max-width: 419.98px) {
  .bd-progress__label {
    display: none;
  }
  .bd-progress li[aria-current] .bd-progress__label {
    display: block;
    white-space: nowrap;
  }
}

/* Steps -------------------------------------------------------------------- */

.bd-step {
  display: grid;
  gap: 18px;
}

.bd-step[hidden] {
  display: none;
}

.bd-step h1,
.bd-step h2 {
  font-size: clamp(1.9rem, 1.4rem + 2.4vw, 2.8rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.bd-step h1:focus,
.bd-step h2:focus {
  outline: none;
}

.bd-welcome h1 {
  font-size: clamp(2.2rem, 1.5rem + 3.4vw, 3.4rem);
}

.bd-welcome .eyebrow {
  margin-bottom: -4px;
}

.bd-lede {
  font-size: 1.05rem;
  color: var(--muted);
}

.bd-plan {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: plan;
}

.bd-plan li {
  position: relative;
  padding: 14px 16px 14px 52px;
  border-radius: var(--radius);
  background: var(--paper);
  border: 1px solid var(--line);
  counter-increment: plan;
}

.bd-plan li::before {
  content: counter(plan);
  position: absolute;
  left: 16px;
  top: 14px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--teal);
  color: var(--cream);
  font-size: 0.8rem;
  font-weight: 700;
}

.bd-noscript {
  display: grid;
  gap: 8px;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--sand);
}

.bd-fine {
  font-size: 0.85rem;
  color: var(--muted);
}

/* Actions row: Back on the left, primary on the right */
.bd-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  margin-top: 8px;
}

.bd-actions .btn--primary {
  margin-left: auto;
}

@media (max-width: 479.98px) {
  .bd-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
  .bd-actions .btn {
    width: 100%;
  }
  .bd-actions .btn--primary {
    order: -1;
    margin-left: 0;
  }
  .bd-actions .bd-link {
    justify-self: center;
  }
}

.bd-actions--start {
  margin-top: 0;
}

.bd-actions--start .btn--primary {
  margin-left: 0;
}

.bd-link {
  min-height: 44px;
  padding: 8px 4px;
  border: 0;
  background: none;
  color: var(--teal);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 650;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  cursor: pointer;
}

.bd-link:hover {
  text-decoration-thickness: 2px;
}

.bd-link:focus-visible,
.bd-stepper__btn:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 6px;
}

.bd-field legend {
  margin-bottom: 8px;
}

.bd-choices {
  margin-top: 0;
}

/* Radio variant of the site's choice cards */
.choice--radio label::before {
  border-radius: 50%;
}

.choice--radio label::after {
  left: 20px;
  width: 8px;
  height: 8px;
  margin-top: -4px;
  border: 0;
  border-radius: 50%;
  background: var(--cream);
  transform: scale(0);
}

.choice--radio input:checked + label::after {
  transform: scale(1);
}

.bd-choices--compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.bd-choices--compact .choice label {
  padding: 10px 10px 10px 40px;
  font-size: 0.875rem;
}

.bd-choices--compact .choice label::before {
  left: 12px;
}

.bd-choices--compact .choice--radio label::after {
  left: 18px;
}

.bd-callout {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff1e6;
  border: 1px solid rgba(194, 65, 12, 0.25);
  font-size: 0.9rem;
  color: var(--ink);
}

/* Customer simulation: a phone-sized booking page -------------------------- */

.bd-phone {
  --tint: var(--teal);
  --tint-soft: var(--teal-50);
  max-width: 420px;
  width: 100%;
  margin-inline: auto;
  padding: 16px;
  border-radius: 30px;
  background: var(--white);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
}

.bd-phone[data-tint="beauty"] {
  --tint: #a4305c;
  --tint-soft: #fbe9f0;
}

.bd-phone[data-tint="hair"] {
  --tint: #2f3e56;
  --tint-soft: #e8ecf3;
}

.bd-phone[data-tint="fitness"] {
  --tint: #9a4a0c;
  --tint-soft: #fdf0e3;
}

.bd-phone__bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 4px 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.bd-phone__avatar {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--tint-soft);
  border: 2px solid var(--tint);
}

.bd-phone__biz {
  display: grid;
  line-height: 1.25;
}

.bd-phone__biz strong {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 560;
  color: var(--tint);
}

.bd-phone__biz span {
  font-size: 0.78rem;
  color: var(--muted);
}

.bd-view {
  display: grid;
  gap: 14px;
}

.bd-view[hidden] {
  display: none;
}

.bd-phone__set {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.bd-phone__label {
  padding: 0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.bd-phone__sample {
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.bd-phone__picked {
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--tint-soft);
  color: var(--tint);
  font-weight: 650;
  font-size: 0.95rem;
}

.bd-phone__next {
  width: 100%;
}

.bd-phone__next[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

.bd-phone__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
}

.bd-phone__row .bd-phone__next {
  width: auto;
  flex: 1 1 160px;
}

.bd-phone__customer {
  font-size: 0.9rem;
}

.bd-phone__customer span {
  color: var(--muted);
}

/* Options inside the phone (services, days, times) */
.bd-services,
.bd-days,
.bd-slots {
  display: grid;
  gap: 8px;
}

.bd-days {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.bd-slots {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.bd-opt {
  position: relative;
}

.bd-opt input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.bd-opt label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 48px;
  padding: 10px 14px;
  border: 1.5px solid var(--line-strong);
  border-radius: 12px;
  background: var(--white);
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s;
}

.bd-opt__main {
  font-weight: 650;
  color: var(--ink);
}

.bd-opt__sub {
  font-size: 0.85rem;
  color: var(--muted);
}

.bd-days .bd-opt label,
.bd-slots .bd-opt label {
  flex-direction: column;
  justify-content: center;
  gap: 0;
  padding: 8px 4px;
  text-align: center;
}

.bd-days .bd-opt__main {
  font-size: 0.85rem;
}

.bd-days .bd-opt__sub {
  font-size: 0.75rem;
}

.bd-opt label:hover {
  border-color: var(--tint);
}

.bd-opt input:checked + label {
  border-color: var(--tint);
  background: var(--tint);
}

.bd-opt input:checked + label .bd-opt__main,
.bd-opt input:checked + label .bd-opt__sub {
  color: var(--white);
}

.bd-opt input:focus-visible + label {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.bd-opt input:disabled + label {
  border-style: dashed;
  background: transparent;
  cursor: not-allowed;
}

.bd-opt input:disabled + label .bd-opt__main {
  color: #7d8c88;
  text-decoration: line-through;
}

.bd-slots__empty {
  grid-column: 1 / -1;
  padding: 12px;
  border-radius: 12px;
  border: 1.5px dashed var(--line-strong);
  font-size: 0.9rem;
  color: var(--muted);
  text-align: center;
}

.bd-summary {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--tint-soft);
}

.bd-summary div {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 8px;
}

.bd-summary dt {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
}

.bd-summary dd {
  margin: 0;
  font-weight: 600;
  color: var(--ink);
}

.bd-done {
  justify-items: center;
  text-align: center;
}

.bd-done .bd-summary {
  width: 100%;
  text-align: left;
}

.bd-done__tick {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--tint);
}

.bd-done__tick::after {
  content: "";
  position: absolute;
  left: 19px;
  top: 13px;
  width: 12px;
  height: 22px;
  border: solid var(--white);
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}

.bd-done__title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--tint);
}

.bd-done__title:focus {
  outline: none;
}

.bd-done__note {
  font-size: 0.85rem;
  color: var(--muted);
}

/* Current process ---------------------------------------------------------- */

.bd-define {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--paper);
  border: 1px solid var(--line);
  font-size: 0.92rem;
}

.bd-form {
  display: grid;
  gap: 22px;
}

.bd-num label {
  line-height: 1.35;
}

.bd-num__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}

.bd-num__row input[type="text"] {
  width: 9.5rem;
  max-width: 100%;
}

.bd-num__row input:disabled {
  background: var(--sand);
  color: var(--muted);
}

.bd-unit {
  margin-left: -6px;
  color: var(--muted);
}

.bd-unsure {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-size: 0.925rem;
  font-weight: 600;
}

.bd-unsure input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--teal);
}

.bd-unsure label {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-right: 6px;
  font-weight: 600;
  cursor: pointer;
}

.bd-optional {
  border-radius: var(--radius);
  border: 1px dashed var(--line-strong);
  background: var(--paper);
}

.bd-optional summary {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 12px 16px;
  font-weight: 650;
  color: var(--teal);
  cursor: pointer;
}

.bd-optional summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: var(--radius);
}

.bd-optional .field {
  padding: 0 16px 16px;
}

.bd-form-error {
  padding: 12px 14px;
  border-radius: 12px;
  background: #fdecea;
  color: #8c1d18;
  font-weight: 600;
  font-size: 0.925rem;
}

/* Result ------------------------------------------------------------------- */

.bd-result {
  display: grid;
  gap: 14px;
}

.bd-figure {
  display: grid;
  gap: 6px;
  padding: 18px 18px 20px;
  border-radius: var(--radius-lg);
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.bd-figure__label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.bd-figure__value {
  font-family: var(--font-display);
  font-size: clamp(2rem, 1.6rem + 2vw, 2.6rem);
  line-height: 1.05;
  color: var(--teal);
}

.bd-figure__math {
  display: inline-block;
  justify-self: start;
  padding: 4px 10px;
  border-radius: 8px;
  background: var(--teal-50);
  color: var(--teal-900);
  font-size: 0.875rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.bd-figure__note,
.bd-figure__text {
  font-size: 0.925rem;
  color: var(--muted);
}

.bd-rec {
  display: grid;
  gap: 8px;
  padding: 18px 18px 20px;
  border-radius: var(--radius-lg);
  background: var(--teal);
  color: var(--on-dark);
}

.bd-rec h3 {
  color: var(--on-dark);
  font-size: 1.3rem;
  line-height: 1.2;
}

.bd-rec p {
  color: var(--on-dark-muted);
  font-size: 0.95rem;
}

.bd-rec .bd-rec__team {
  padding-top: 8px;
  border-top: 1px solid var(--line-dark);
  color: var(--on-dark);
}

.bd-scenario {
  display: grid;
  gap: 10px;
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1.5px dashed var(--line-strong);
  background: var(--white);
}

.bd-scenario[hidden] {
  display: none;
}

.bd-scenario h3 {
  font-size: 1.2rem;
  line-height: 1.25;
}

.bd-scenario__intro,
.bd-scenario__out {
  font-size: 0.925rem;
  color: var(--muted);
}

.bd-scenario__out {
  color: var(--ink);
  font-weight: 600;
}

.bd-stepper {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.bd-stepper input[type="text"] {
  width: 4.2rem;
  text-align: center;
}

.bd-stepper__btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  background: var(--paper);
  color: var(--teal);
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
}

/* Request ------------------------------------------------------------------ */

.bd-include label {
  padding-block: 14px;
}

.bd-preview {
  min-height: 190px;
  background: var(--paper) !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.8rem !important;
  line-height: 1.5;
  white-space: pre-wrap;
}

.bd-privacy {
  font-size: 0.875rem;
  color: var(--muted);
}

/* Sending, success, fallback and FAQ */
.bd-need {
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  font-size: 0.9rem;
  color: var(--muted);
}

.bd-svc__list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bd-svc__row[hidden] {
  display: none;
}

.bd-add {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 14px 8px 10px;
  border: 1.5px dashed var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--teal);
  font: inherit;
  font-size: 0.925rem;
  font-weight: 650;
  cursor: pointer;
}

.bd-add::before {
  content: "+";
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--teal);
  color: var(--cream);
  font-weight: 700;
  line-height: 1;
}

.bd-add:hover {
  border-color: var(--teal);
}

.bd-add:focus-visible,
.bd-preview-wrap summary:focus-visible,
.bd-faq summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

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

.bd-preview-wrap summary {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 650;
  color: var(--teal);
  cursor: pointer;
}

.bd-preview-wrap .bd-preview {
  margin-top: 6px;
}

.bd-send {
  display: grid;
  gap: 10px;
}

.bd-send .bd-actions {
  margin-top: 0;
}

.bd-send__status {
  font-weight: 600;
  color: var(--teal-900);
}

.bd-send__status:empty {
  display: none;
}

.bd-send__status.is-error {
  padding: 12px 14px;
  border-radius: 12px;
  background: #fdecea;
  color: #8c1d18;
}

.bd-form-error:focus {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.bd-sent {
  display: grid;
  justify-items: start;
  gap: 10px;
  padding: 22px 20px;
  border-radius: var(--radius-lg);
  background: var(--teal);
  color: var(--on-dark);
}

.bd-sent[hidden] {
  display: none;
}

.bd-sent:focus {
  outline: none;
}

.bd-sent .bd-done__tick {
  --tint: var(--cream);
  width: 44px;
  height: 44px;
  background: var(--cream);
}

.bd-sent .bd-done__tick::after {
  left: 16px;
  top: 10px;
  width: 10px;
  height: 19px;
  border-color: var(--teal);
}

.bd-sent h3 {
  color: var(--on-dark);
  font-size: 1.5rem;
}

.bd-sent p {
  color: var(--on-dark-muted);
}

.bd-sent strong {
  color: var(--on-dark);
  overflow-wrap: anywhere;
}

.bd-fallback {
  display: grid;
  gap: 8px;
  padding: 16px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--paper);
  font-size: 0.925rem;
}

.bd-fallback[hidden] {
  display: none;
}

.bd-fallback.is-highlight {
  border: 2px solid var(--teal);
}

.bd-fallback p {
  color: var(--muted);
}

.bd-fallback__title {
  color: var(--ink) !important;
}

.bd-fallback__addr {
  font-weight: 700;
  overflow-wrap: anywhere;
}

.bd-fallback__row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bd-fallback__status {
  font-weight: 600;
  color: var(--teal-900) !important;
}

.bd-fallback__status:empty {
  display: none;
}

.bd-faq {
  display: grid;
  gap: 6px;
}

.bd-faq h3 {
  font-size: 1.15rem;
}

.bd-faq details {
  border-bottom: 1px solid var(--line);
}

.bd-faq summary {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 8px 0;
  font-weight: 650;
  color: var(--ink);
  cursor: pointer;
}

.bd-faq details p {
  padding-bottom: 12px;
  font-size: 0.925rem;
  color: var(--muted);
}

.bd-time {
  margin-top: -8px;
  font-size: 0.925rem;
  font-weight: 600;
  color: var(--teal);
}

.bd-define__note {
  font-size: 0.875rem;
  color: var(--muted);
}

.bd-note {
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--teal-50);
  font-size: 0.875rem;
  color: var(--teal-900);
}

.bd-note[hidden] {
  display: none;
}

@media (max-width: 479.98px) {
  .bd-fallback__row .btn {
    width: 100%;
  }
}

@media (min-width: 720px) {
  .bd {
    padding-top: 40px;
  }
  .bd-phone {
    padding: 20px;
  }
}

.bd-request textarea#r-notes {
  min-height: 84px;
}
