/* Public booking page. Calm, trustworthy, single-accent — "software the salon
   paid for", mobile-first at 390px. All colour flows from the brand tokens. */

.wrap {
  max-width: 560px;
  margin: 0 auto;
  padding: 24px 18px 48px;
  min-height: 100dvh;
}

/* Business header */
.biz { text-align: center; margin: 8px 0 20px; }
.biz-name { font-size: 1.5rem; font-weight: 700; margin: 0; letter-spacing: -.01em; }
.biz-tag { color: var(--brand-muted); margin: 4px 0 0; font-size: .95rem; }

/* Step indicator */
.steps {
  display: flex; gap: 6px; list-style: none; padding: 0; margin: 0 0 20px;
  counter-reset: step; font-size: .78rem;
}
.steps li {
  flex: 1; text-align: center; color: var(--brand-muted);
  padding: 8px 4px 10px; border-top: 3px solid var(--brand-line);
  counter-increment: step; position: relative;
}
.steps li::before {
  content: counter(step); display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 50%; background: var(--brand-line);
  color: var(--brand-text); font-size: .7rem; margin-right: 5px; vertical-align: middle;
}
.steps li[aria-current="step"] { color: var(--brand-text); border-top-color: var(--brand-primary); font-weight: 600; }
.steps li[aria-current="step"]::before,
.steps li[data-done]::before { background: var(--brand-primary); color: var(--brand-primary-ink); }
.steps li[data-done] { border-top-color: var(--brand-primary); }

/* Panel */
.panel { background: var(--brand-surface); border: 1px solid var(--brand-line);
  border-radius: var(--brand-radius); box-shadow: var(--brand-shadow); padding: 18px; }
.panel h2 { font-size: 1.05rem; margin: 0 0 14px; }
.loading { color: var(--brand-muted); text-align: center; padding: 24px 0; }

.back {
  background: none; border: none; color: var(--brand-muted); font: inherit;
  padding: 0 0 12px; cursor: pointer; display: inline-flex; align-items: center; gap: 4px;
}
.back:hover { color: var(--brand-text); }

/* Service list */
.svc-list { display: grid; gap: 10px; }
.svc {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  width: 100%; text-align: left; background: var(--brand-surface);
  border: 1px solid var(--brand-line); border-radius: var(--brand-radius);
  padding: 14px 16px; cursor: pointer; font: inherit; color: inherit;
  transition: border-color .12s, box-shadow .12s;
}
.svc:hover { border-color: var(--brand-primary); box-shadow: var(--brand-shadow); }
.svc-main { min-width: 0; }
.svc-name { font-weight: 600; }
.svc-desc { color: var(--brand-muted); font-size: .88rem; margin-top: 2px; }
.svc-meta { text-align: right; white-space: nowrap; }
.svc-price { font-weight: 700; }
.svc-dur { color: var(--brand-muted); font-size: .82rem; }

/* Calendar */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cal-title { font-weight: 600; }
.cal-nav { display: flex; gap: 6px; }
.cal-nav button {
  width: 40px; height: 40px; border: 1px solid var(--brand-line); background: var(--brand-surface);
  border-radius: 10px; cursor: pointer; font-size: 1.1rem; color: var(--brand-text);
}
.cal-nav button:disabled { opacity: .35; cursor: not-allowed; }
.dow { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-bottom: 4px;
  font-size: .7rem; color: var(--brand-muted); text-align: center; }
.grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.day {
  aspect-ratio: 1; border: 1px solid transparent; border-radius: 10px; background: transparent;
  font: inherit; font-size: .95rem; color: var(--brand-text); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.day.open { background: var(--brand-primary-weak); border-color: transparent; font-weight: 600; }
.day.open:hover { border-color: var(--brand-primary); }
.day[disabled] { color: var(--brand-muted); opacity: .4; cursor: default; background: transparent; }
.day.sel { background: var(--brand-primary); color: var(--brand-primary-ink); }
.day.pad { visibility: hidden; }

/* Time slots */
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.slot {
  padding: 12px 6px; border: 1px solid var(--brand-line); background: var(--brand-surface);
  border-radius: 10px; font: inherit; font-weight: 600; cursor: pointer; color: var(--brand-text);
}
.slot:hover { border-color: var(--brand-primary); }
.chosen-line { color: var(--brand-muted); font-size: .9rem; margin: 0 0 14px; }

/* Details form */
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 5px; }
.field input, .field textarea {
  width: 100%; padding: 12px; border: 1px solid var(--brand-line); border-radius: 10px;
  font: inherit; background: var(--brand-surface); color: var(--brand-text);
}
.field .hint { color: var(--brand-muted); font-size: .8rem; font-weight: 400; }
.field textarea { min-height: 72px; resize: vertical; }
/* honeypot — visually and from AT hidden, still in the DOM for bots */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.privacy { background: var(--brand-primary-weak); border-radius: 10px; padding: 12px 14px;
  font-size: .82rem; color: var(--brand-text); margin: 4px 0 16px; }
.privacy strong { display: block; margin-bottom: 2px; }

.btn {
  width: 100%; padding: 14px; border: none; border-radius: var(--brand-radius);
  background: var(--brand-primary); color: var(--brand-primary-ink); font: inherit;
  font-weight: 700; font-size: 1rem; cursor: pointer;
}
.btn:disabled { opacity: .6; cursor: progress; }
.btn.secondary { background: var(--brand-surface); color: var(--brand-text); border: 1px solid var(--brand-line); }

.summary { list-style: none; padding: 0; margin: 0 0 16px; }
.summary li { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--brand-line); }
.summary li span:first-child { color: var(--brand-muted); }

/* Confirmation */
.done { text-align: center; }
.done .tick { width: 52px; height: 52px; border-radius: 50%; background: var(--ok); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-size: 1.6rem; margin-bottom: 8px; }
.ref { font-size: 1.2rem; font-weight: 700; letter-spacing: .06em; }
.done .when { font-size: 1.05rem; margin: 10px 0; }
.done .actions { display: grid; gap: 10px; margin-top: 18px; }

.empty { color: var(--brand-muted); text-align: center; padding: 20px 0; }

.err { background: #fdecea; color: var(--bad); border: 1px solid #f3c6bf; border-radius: 10px;
  padding: 12px 14px; margin-top: 14px; font-size: .9rem; }

.foot { text-align: center; margin-top: 22px; color: var(--brand-muted); font-size: .82rem; }
.foot .credit { margin-top: 6px; opacity: .8; }
