/* ─────────────────────────────────────────────────────────────
   Piandré · booking page — multi-step appointment request.
   Ported from the piandre-booking form, restyled onto the
   marketing site's warm-earth palette + Cormorant/Mulish type.
   Form-local token names (--text, --surface, …) are mapped to the
   site tokens (--ink, --white, …) on .book-card so this file
   never overrides styles.css globals.
   ───────────────────────────────────────────────────────────── */

/* ── Intro ───────────────────────────────────────────────── */
.book-main { padding-top: clamp(104px, 14vh, 150px); }
.book-intro { text-align: center; padding-bottom: clamp(22px, 3.5vw, 36px); }
.book-intro h1 { font-family: var(--font-display); font-weight: 500; font-size: clamp(30px, 3.6vw, 46px); line-height: 1.05; }
.book-reassure {
  margin-top: 20px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted);
}

/* ── Form card ───────────────────────────────────────────── */
.book-form-section { padding-bottom: clamp(64px, 10vw, 120px); }

/* Two columns: the form on the left, call/Viber + branches on the right
   (mirrors the layout regulars know). Stacks on smaller screens. */
.book-layout {
  max-width: 1120px; margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 40px);
  display: grid;
  grid-template-columns: minmax(0, 560px) minmax(0, 1fr);
  gap: clamp(28px, 4.5vw, 60px);
  align-items: start;
}
.book-layout .book-card { max-width: none; margin: 0; }   /* fill the left column */

.book-aside-inner { position: sticky; top: 100px; }
.book-aside-inner h2 { font-family: var(--font-display); font-weight: 500; font-size: clamp(24px, 2.6vw, 32px); line-height: 1.1; margin: 0 0 10px; color: var(--ink); }
.book-aside-inner > p { color: var(--ink-soft); line-height: 1.6; margin: 0 0 22px; max-width: 44ch; }
.book-aside-inner > p a { color: var(--red); font-weight: 700; border-bottom: 1px solid transparent; transition: border-color .15s; }
.book-aside-inner > p a:hover { border-bottom-color: var(--red); }
.book-contact { border-top: 1px solid var(--line); padding-top: clamp(18px, 2.5vw, 24px); }
.book-contact .fl-sel-wrap { width: 100%; }
/* This salon picker shows its value directly (no floating label), so center
   the text instead of inheriting the label-offset padding. */
.book-contact .fl-select { padding: 14px 42px 14px 16px; }
.book-contact-out { display: flex; gap: 10px; margin-top: 16px; }
.book-contact-out[hidden] { display: none; }   /* [hidden] loses to display:flex otherwise */
.book-contact-btn { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 14px; border-radius: var(--radius); font-size: 15px; font-weight: 700; line-height: 1; }
.book-contact-call { background: var(--paper-2); border: 1px solid var(--line-2); color: var(--ink); }
.book-contact-call:hover { border-color: var(--red); color: var(--red); }
.book-contact-viber { background: #7360f2; color: #fff; }       /* Viber purple */
.book-contact-viber:hover { background: #5d4bd6; }
.book-contact-viber svg { flex-shrink: 0; }

@media (max-width: 880px) {
  .book-layout { grid-template-columns: 1fr; gap: clamp(32px, 7vw, 48px); }
  .book-aside-inner { position: static; }
}
@media (max-width: 440px) { .book-contact-out { flex-direction: column; } }

.book-card {
  /* map form-local tokens onto the site palette */
  --text:    var(--ink);
  --text-2:  var(--ink-soft);
  --text-3:  var(--muted);
  --border:  var(--line);
  --surface: var(--white);
  --red-dim: rgba(192, 45, 47, 0.07);

  max-width: 600px;
  margin: 0 auto;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.book-pad { padding: clamp(24px, 4vw, 40px) clamp(20px, 4vw, 40px) clamp(28px, 4.5vw, 44px); }

/* Progress stripe — pinned to the top edge of the card, not the window */
.book-progress { height: 3px; background: var(--line); }
.book-progress-fill {
  height: 100%; width: 0%;
  background: var(--red);
  transition: width 0.5s cubic-bezier(.4, 0, .2, 1);
}

/* ── Loading sequence ────────────────────────────────────────
   The branch list is fetched at runtime; until the first step is
   ready we show a shimmer skeleton instead of flashing a half-built
   step. JS drops .is-loading once the step (and its chips) are set. */
.book-loading { display: none; }
.book-card.is-loading .book-loading { display: block; }
.book-card.is-loading .step-meta,
.book-card.is-loading #steps-wrap { display: none; }
.skel {
  background: linear-gradient(100deg, var(--paper-2) 28%, var(--line) 50%, var(--paper-2) 72%);
  background-size: 220% 100%;
  animation: skelShimmer 1.3s ease-in-out infinite;
}
@keyframes skelShimmer { from { background-position: 175% 0; } to { background-position: -40% 0; } }
.skel-title { height: 30px; width: 62%; margin: 6px auto 30px; border-radius: 6px; }
.skel-pills { display: flex; flex-wrap: wrap; gap: 9px; }
.skel-pill { height: 41px; border-radius: 100px; }
@media (prefers-reduced-motion: reduce) { .skel { animation: none; } }

/* ── Step counter ────────────────────────────────────────── */
.step-meta { text-align: center; margin-bottom: 22px; }
.step-label {
  font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}

/* ── Steps container ─────────────────────────────────────── */
.steps-wrap { position: relative; }
.step { display: none; }
.step.is-enter      { display: block; animation: sEnter     .38s cubic-bezier(.4,0,.2,1) both; }
.step.is-enter-back { display: block; animation: sEnterBack .38s cubic-bezier(.4,0,.2,1) both; }
.step.is-leave      { display: block; position: absolute; inset: 0; animation: sLeave     .26s cubic-bezier(.4,0,.2,1) both; pointer-events: none; }
.step.is-leave-back { display: block; position: absolute; inset: 0; animation: sLeaveBack .26s cubic-bezier(.4,0,.2,1) both; pointer-events: none; }
@keyframes sEnter     { from { opacity:0; transform:translateX(28px);  } to { opacity:1; transform:translateX(0); } }
@keyframes sEnterBack { from { opacity:0; transform:translateX(-28px); } to { opacity:1; transform:translateX(0); } }
@keyframes sLeave     { from { opacity:1; transform:translateX(0); } to { opacity:0; transform:translateX(-28px); } }
@keyframes sLeaveBack { from { opacity:1; transform:translateX(0); } to { opacity:0; transform:translateX(28px);  } }

/* ── Question layout ─────────────────────────────────────── */
.q-tag {
  font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: var(--red); text-align: center; margin-bottom: 12px;
}
.q-text {
  font-family: var(--font-display); font-size: clamp(23px, 3vw, 31px); font-style: italic; font-weight: 500;
  line-height: 1.15; text-align: center; color: var(--ink); margin-bottom: 8px;
}
.q-sub { font-size: 14.5px; color: var(--ink-soft); text-align: center; margin: 0 auto 24px; max-width: 42ch; }

/* ── Service chips ───────────────────────────────────────── */
.chip-section { margin-bottom: 22px; }
.chip-section-label {
  font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
/* Branch picker: compact pill cloud (was a full-width single column) */
#branch-chips { gap: 9px; }
#branch-chips .chip-lbl { padding: 11px 17px; font-size: 15px; }
.chip { display: inline-flex; }
.chip input[type="checkbox"], .chip input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }
.chip-lbl {
  display: inline-block; padding: 9px 16px;
  border: 1px solid var(--line); border-radius: 100px;
  font-size: 14.5px; font-weight: 600; color: var(--ink-soft); background: var(--white);
  cursor: pointer; transition: border-color .15s, color .15s, background .15s; user-select: none;
}
.chip:hover .chip-lbl { border-color: var(--red); color: var(--red); }
.chip input:checked + .chip-lbl { background: var(--red); border-color: var(--red); color: #fff; }

/* ── Radio cards ─────────────────────────────────────────── */
.radio-cards { display: flex; gap: 14px; margin-bottom: 4px; }
.rcard { display: flex; flex: 1; }
.rcard input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }
.rcard-lbl {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  padding: 28px 16px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--white); cursor: pointer; transition: border-color .2s, background .2s; text-align: center; position: relative;
}
.rcard-lbl:hover { border-color: var(--red); }
.rcard input:checked + .rcard-lbl { border: 2px solid var(--red); background: var(--red-dim); }
.rcard input:checked + .rcard-lbl::after {
  content: '✓'; position: absolute; top: 10px; right: 12px; width: 20px; height: 20px;
  background: var(--red); color: #fff; border-radius: 50%; font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; line-height: 20px;
}
.rcard-icon { line-height: 1; color: var(--muted); transition: color .2s; }
.rcard-lbl:hover .rcard-icon, .rcard input:checked + .rcard-lbl .rcard-icon { color: var(--red); }
.rcard-title { font-family: var(--font-display); font-size: 21px; font-weight: 600; color: var(--ink); }
.rcard input:checked + .rcard-lbl .rcard-title { color: var(--red); }
.rcard-text { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.rcard-sub { font-size: 13.5px; color: var(--ink-soft); line-height: 1.5; }

/* ── Floating label inputs ───────────────────────────────── */
.fl { position: relative; margin-bottom: 16px; }
.fl-input, .fl-textarea, .fl-select {
  width: 100%; padding: 22px 14px 8px;
  border: 1px solid var(--line); border-radius: var(--radius);
  font-family: var(--font-sans); font-size: 15px; font-weight: 600; color: var(--ink); background: var(--white);
  transition: border-color .2s, box-shadow .2s; appearance: none; -webkit-appearance: none;
}
.fl-input:focus, .fl-textarea:focus, .fl-select:focus {
  outline: none; border-color: var(--red); box-shadow: 0 0 0 3px var(--red-dim);
}
.fl-textarea { resize: vertical; min-height: 108px; }
.fl-label {
  position: absolute; left: 14px; top: 16px; font-size: 14px; font-weight: 600; color: var(--muted); pointer-events: none;
  transition: top .18s ease, font-size .18s ease, color .18s ease, letter-spacing .18s ease;
}
.fl-input:focus ~ .fl-label,
.fl-input:not(:placeholder-shown) ~ .fl-label,
.fl-textarea:focus ~ .fl-label,
.fl-textarea:not(:placeholder-shown) ~ .fl-label,
.fl-input[type="date"] ~ .fl-label,
.fl-select ~ .fl-label {
  top: 7px; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--red);
}
.fl-opt { font-size: 10px; color: var(--muted); font-weight: 400; text-transform: none; letter-spacing: 0; }
.fl-sel-wrap { position: relative; }
.fl-sel-wrap::after {
  content: ''; position: absolute; right: 15px; top: 50%; transform: translateY(-50%);
  width: 13px; height: 13px; pointer-events: none;
  background: center / contain no-repeat
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23837a72' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}
.fl-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ── Navigation ──────────────────────────────────────────── */
.step-nav { display: flex; align-items: center; justify-content: space-between; margin-top: 32px; gap: 16px; }
.btn-back {
  font-family: var(--font-sans); font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); background: none; border: none; cursor: pointer; padding: 0;
  transition: color .15s; opacity: 0; pointer-events: none; display: flex; align-items: center; gap: 5px;
}
.btn-back.on { opacity: 1; pointer-events: all; }
.btn-back:hover { color: var(--ink); }
.btn-next {
  margin-left: auto; padding: 15px 30px; background: var(--red); color: #fff; border: none; border-radius: var(--radius);
  font-family: var(--font-sans); font-size: 12.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  cursor: pointer; transition: background .2s, transform .1s, opacity .2s;
}
.btn-next:hover:not(:disabled) { background: var(--red-deep); transform: translateY(-2px); }
.btn-next:active:not(:disabled) { transform: scale(.98); }
.btn-next:disabled { opacity: .45; cursor: not-allowed; }

.step-skip { text-align: center; margin-top: 16px; }
.btn-skip {
  background: none; border: none; font-family: var(--font-sans); font-size: 13.5px; font-weight: 600; color: var(--muted);
  cursor: pointer; text-decoration: underline; text-decoration-color: transparent;
  transition: color .15s, text-decoration-color .15s;
}
.btn-skip:hover { color: var(--ink); text-decoration-color: var(--line-2); }

/* ── Error ───────────────────────────────────────────────── */
.f-err {
  background: var(--red-dim); border: 1px solid rgba(192,45,47,.18); border-radius: var(--radius);
  padding: 11px 14px; font-size: 14px; font-weight: 600; color: var(--red); margin-top: 14px; display: none;
}
.f-err.on { display: block; }

/* ── Success ─────────────────────────────────────────────── */
.f-success { display: none; text-align: center; padding: 40px 0 8px; }
.f-success.on { display: block; animation: fadeUp .5s ease both; }
.ok-icon {
  width: 60px; height: 60px; background: var(--red); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; margin: 0 auto 28px;
  animation: popIn .45s cubic-bezier(.175,.885,.32,1.275) .1s both;
}
.ok-title { font-family: var(--font-display); font-size: 32px; font-style: italic; font-weight: 500; margin-bottom: 12px; }
.ok-body { font-size: 16px; color: var(--ink-soft); line-height: 1.8; max-width: 38ch; margin: 0 auto; }
.ok-home {
  display: inline-block; margin-top: 32px;
  font-size: 12.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--red);
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes popIn { from { transform: scale(.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ── Below-card callout ──────────────────────────────────── */
.book-callout { text-align: center; margin-top: 26px; font-size: 14.5px; color: var(--muted); }
.book-callout a { color: var(--red); font-weight: 700; border-bottom: 1px solid transparent; transition: border-color .15s; }
.book-callout a:hover { border-bottom-color: var(--red); }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 560px) {
  .step-meta   { margin-bottom: 18px; }
  .q-text      { font-size: 26px; }
  .q-sub       { margin-bottom: 22px; }
  .radio-cards { flex-direction: column; gap: 12px; }
  .rcard-lbl   { flex-direction: row; align-items: center; justify-content: flex-start; text-align: left; padding: 20px 18px; gap: 16px; min-height: 80px; }
  .rcard-text  { flex: 1; align-items: flex-start; gap: 4px; }
  .rcard-icon  { flex-shrink: 0; }
  .fl-row      { grid-template-columns: 1fr; }
  .step-nav    { margin-top: 22px; }
  /* iOS Safari auto-zooms inputs below 16px — bump up on small screens */
  .fl-input, .fl-textarea, .fl-select { font-size: 16px; }
  /* widen tap targets for the back/skip text buttons */
  .btn-back    { padding: 11px 4px; margin: -11px 0; }
  .btn-skip    { padding: 11px 8px; }
}

/* First-time policy note on the Schedule step (informational, shown to all). */
.book-firsttime {
  margin: 14px 2px 2px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
}
.book-firsttime strong { color: var(--ink-soft); font-weight: 700; }
