/* ═══════════════════════════════════════════
   BONO BEAUTY — book.css
   App-like booking flow, mobile-first
═══════════════════════════════════════════ */

.book-body {
  background: var(--sand);
  color: var(--text);
  cursor: auto;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom);
}
.book-body button, .book-body a { cursor: pointer; }
#cursor, #bgCanvas { display: none; } /* keep booking app lightweight/native-feeling */

/* ── APP HEADER ── */
.app-header {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 5%;
  background: var(--cream);
  border-bottom: 1px solid var(--sand2);
}
.app-back {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--sand2); color: var(--text);
  transition: background .2s;
}
.app-back:hover { background: var(--sand3); }
.app-header-title { display: flex; align-items: center; gap: 10px; }
.app-logo { height: 28px; width: auto; }
.app-logo-fb { display: flex; align-items: center; gap: 8px; }
.app-logo-mark {
  width: 26px; height: 26px; border-radius: 7px;
  background: var(--g3); display: flex; align-items: center; justify-content: center;
}
.app-logo-fb span { font-family: var(--display); font-size: 1.05rem; color: var(--text); }
.app-header-spacer { width: 40px; }

/* ── PROGRESS BAR ── */
.progress-track {
  height: 3px; background: var(--sand2); width: 100%;
  position: sticky; top: 69px; z-index: 99;
}
.progress-fill {
  height: 100%; width: 20%; background: linear-gradient(90deg,var(--g3),var(--gold));
  transition: width .4s cubic-bezier(.4,0,.2,1);
}

/* ── STEP DOTS ── */
.step-dots {
  display: flex; justify-content: space-between;
  max-width: 640px; margin: 0 auto; width: 100%;
  padding: 18px 5% 0;
}
.step-dot {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  flex: 1; position: relative;
}
.step-dot span {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--sand2); color: var(--muted);
  font-size: .78rem; font-weight: 700;
  transition: all .3s;
  border: 1.5px solid transparent;
}
.step-dot label {
  font-size: .62rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); transition: color .3s;
}
.step-dot.active span { background: var(--g3); color: white; }
.step-dot.active label { color: var(--g3); }
.step-dot.done span { background: var(--gold); color: white; }
.step-dot.done label { color: var(--gold); }
@media (max-width: 480px) {
  .step-dot label { display: none; }
  .step-dots { padding: 14px 5% 0; }
}

/* ── APP MAIN ── */
.app-main {
  flex: 1; max-width: 640px; margin: 0 auto; width: 100%;
  padding: 28px 5% 60px;
}

/* ── STEP CONTAINERS ── */
.app-step { display: none; animation: stepIn .35s ease; }
.app-step.active { display: block; }
@keyframes stepIn { from{opacity:0;transform:translateX(16px)} to{opacity:1;transform:translateX(0)} }

.step-head { margin-bottom: 28px; }
.step-eyebrow {
  display: block; font-size: .68rem; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase; color: var(--orange);
  margin-bottom: 10px;
}
.step-title {
  font-family: var(--display); font-size: clamp(1.6rem,5vw,2.3rem);
  font-weight: 400; color: var(--ink); margin-bottom: 10px; line-height: 1.18;
}
.step-sub { font-size: .88rem; color: var(--muted); line-height: 1.6; }

/* ── SELECTED SUMMARY CHIP (shown on steps 2-4) ── */
.selected-summary {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 24px;
}
.selected-summary:empty { display: none; }
.sum-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: var(--r-xl);
  background: var(--gold-p); border: 1px solid var(--gold-l);
  font-size: .76rem; font-weight: 600; color: var(--text);
}
.sum-chip svg { width: 14px; height: 14px; color: var(--gold); flex-shrink: 0; }

/* ── SERVICE SELECTION ── */
.svc-cat { margin-bottom: 28px; }
.svc-cat-label {
  font-size: .68rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 12px;
}
.opt-grid { display: flex; flex-direction: column; gap: 10px; }
.opt-card {
  display: flex; align-items: center; gap: 14px;
  width: 100%; padding: 16px 18px; border-radius: var(--r);
  background: white; border: 1.5px solid var(--sand2);
  text-align: left; transition: all .2s;
}
.opt-card:hover { border-color: var(--g4); }
.opt-card.selected {
  border-color: var(--g3); background: var(--gold-p);
  box-shadow: 0 0 0 3px rgba(45,106,79,.08);
}
.opt-icon {
  width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0;
  background: var(--sand2); display: flex; align-items: center; justify-content: center;
  color: var(--g3); transition: all .2s;
}
.opt-icon svg { width: 20px; height: 20px; }
.opt-card.selected .opt-icon { background: var(--g3); color: white; }
.opt-name { flex: 1; font-size: .9rem; font-weight: 600; color: var(--ink); }
.opt-price { font-size: .85rem; font-weight: 700; color: var(--g3); font-family: var(--serif); }

/* ── CALENDAR ── */
.cal-card {
  background: white; border-radius: var(--r-lg);
  border: 1.5px solid var(--sand2); padding: 20px;
  box-shadow: var(--sh-sm);
}
.cal-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px;
}
.cal-month { font-family: var(--display); font-size: 1.2rem; color: var(--ink); }
.cal-nav-btn {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1.5px solid var(--sand2); background: white; color: var(--muted);
  display: flex; align-items: center; justify-content: center;
  transition: all .2s;
}
.cal-nav-btn:hover { border-color: var(--g3); color: var(--g3); }
.cal-nav-btn:disabled { opacity: .3; pointer-events: none; }
.cal-weekdays {
  display: grid; grid-template-columns: repeat(7,1fr);
  margin-bottom: 8px;
}
.cal-weekdays span {
  text-align: center; font-size: .65rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
  padding: 6px 0;
}
.cal-days {
  display: grid; grid-template-columns: repeat(7,1fr); gap: 4px;
}
.cal-day {
  aspect-ratio: 1; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem; font-weight: 500; color: var(--text);
  background: var(--sand); border: 1.5px solid transparent;
  transition: all .15s; position: relative;
}
.cal-day.empty { background: transparent; pointer-events: none; }
.cal-day.avail { cursor: pointer; }
.cal-day.avail:hover { border-color: var(--g4); }
.cal-day.selected { background: var(--g3); color: white; font-weight: 700; }
.cal-day.today:not(.selected) { border-color: var(--gold); color: var(--gold); font-weight: 700; }
.cal-day.full, .cal-day.off, .cal-day.past {
  color: var(--stone); pointer-events: none; background: var(--sand2);
}
.cal-day.full::after {
  content: ''; position: absolute; bottom: 4px; width: 4px; height: 4px;
  border-radius: 50%; background: var(--orange);
}
.cal-legend {
  display: flex; gap: 16px; flex-wrap: wrap; margin-top: 16px;
  padding-top: 16px; border-top: 1px solid var(--sand2);
}
.cal-legend span {
  display: flex; align-items: center; gap: 6px;
  font-size: .72rem; color: var(--muted);
}
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot-avail { background: var(--g3); }
.dot-full { background: var(--orange); }
.dot-off { background: var(--stone); }

/* ── TIME SLOTS ── */
.slots-card {
  background: white; border-radius: var(--r-lg);
  border: 1.5px solid var(--sand2); padding: 20px;
  box-shadow: var(--sh-sm);
}
.slots-grid {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 10px;
}
.slot-btn {
  padding: 14px 8px; border-radius: var(--r);
  border: 1.5px solid var(--sand2); background: var(--sand);
  font-size: .88rem; font-weight: 600; color: var(--text);
  transition: all .2s; text-align: center;
}
.slot-btn:hover:not(.taken) { border-color: var(--g4); }
.slot-btn.selected { background: var(--g3); color: white; border-color: var(--g3); }
.slot-btn.taken {
  background: var(--sand2); color: var(--stone);
  text-decoration: line-through; pointer-events: none; font-size: .78rem;
}
.no-slots {
  grid-column: 1 / -1; text-align: center; padding: 30px 10px;
  color: var(--muted); font-size: .85rem;
}

/* ── FORM FIELDS ── */
.field-group { margin-bottom: 20px; }
.field-label {
  display: block; font-size: .72rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
  margin-bottom: 8px;
}
.field-label .req { color: var(--orange); }
.field-label .opt-label { font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--stone); }
.field-wrap {
  display: flex; align-items: center; gap: 12px;
  background: white; border: 1.5px solid var(--sand2); border-radius: var(--r);
  padding: 0 16px; transition: border-color .2s;
}
.field-wrap:focus-within { border-color: var(--g3); box-shadow: 0 0 0 3px rgba(45,106,79,.08); }
.field-wrap.error { border-color: var(--orange); }
.field-icon { color: var(--stone); flex-shrink: 0; }
.field-wrap:focus-within .field-icon { color: var(--g3); }
.field-input {
  flex: 1; border: none; outline: none; background: none;
  padding: 15px 0; font-family: var(--body); font-size: .92rem; color: var(--text);
}
.field-wrap-textarea { align-items: flex-start; padding: 14px 16px; }
.field-textarea { resize: vertical; min-height: 70px; font-family: var(--body); }
.field-error {
  display: none; font-size: .74rem; color: var(--orange); margin-top: 6px;
}
.field-wrap.error + .field-error { display: block; }

/* ── CONFIRMATION CARD ── */
.confirm-card {
  background: white; border-radius: var(--r-lg);
  border: 1.5px solid var(--sand2); padding: 8px 20px;
  box-shadow: var(--sh-sm); margin-bottom: 18px;
}
.confirm-row {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 0; border-bottom: 1px solid var(--sand2);
}
.confirm-row:last-child { border-bottom: none; }
.confirm-icon {
  width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
  background: var(--gold-p); color: var(--gold);
  display: flex; align-items: center; justify-content: center;
}
.confirm-icon svg { width: 18px; height: 18px; }
.confirm-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.confirm-label {
  font-size: .65rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted);
}
.confirm-val { font-size: .92rem; font-weight: 600; color: var(--ink); word-break: break-word; }

/* ── POLICY NOTE ── */
.policy-card {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--gold-p); border: 1px solid var(--gold-l);
  border-radius: var(--r); padding: 16px 18px; margin-bottom: 28px;
}
.policy-card svg { color: var(--gold); flex-shrink: 0; margin-top: 1px; }
.policy-card p { font-size: .8rem; color: var(--text); line-height: 1.6; }

/* ── STEP ACTIONS ── */
.step-actions {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; margin-top: 32px;
}

/* ── APP BUTTONS ── */
.btn-app {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 15px 28px; border-radius: var(--r-xl);
  font-family: var(--body); font-size: .82rem; font-weight: 700;
  letter-spacing: .05em; border: none;
  transition: all .25s; flex: 1;
}
.btn-app-primary { background: var(--g3); color: white; }
.btn-app-primary:hover { background: var(--g4); }
.btn-app-primary:disabled { background: var(--sand3); color: var(--stone); pointer-events: none; }
.btn-app-gold { background: linear-gradient(135deg,var(--gold),#b8923e); color: white; }
.btn-app-gold:hover { opacity: .92; }
.btn-app-ghost { background: var(--sand2); color: var(--text); flex: 0 0 auto; }
.btn-app-ghost:hover { background: var(--sand3); }

/* ── SUCCESS SCREEN ── */
.success-step { text-align: center; padding-top: 10vh; }
.success-content { display: flex; flex-direction: column; align-items: center; }
.success-icon {
  width: 100px; height: 100px; border-radius: 50%;
  background: var(--g3); color: white;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 24px;
  animation: popIn .5s cubic-bezier(.34,1.56,.64,1);
}
@keyframes popIn { from{transform:scale(0);opacity:0} to{transform:scale(1);opacity:1} }
.success-title { font-family: var(--display); font-size: 1.9rem; color: var(--ink); margin-bottom: 12px; }
.success-sub { font-size: .9rem; color: var(--muted); line-height: 1.65; max-width: 400px; margin-bottom: 28px; }
.success-summary {
  background: white; border: 1.5px solid var(--sand2); border-radius: var(--r-lg);
  padding: 20px 24px; width: 100%; text-align: left; margin-bottom: 28px;
}
.success-summary .confirm-row { padding: 10px 0; }
.success-actions { display: flex; flex-direction: column; gap: 12px; width: 100%; }

/* ── TOAST (book page) ── */
#toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--g3); color: white; padding: 12px 24px; border-radius: 50px;
  font-size: .8rem; font-weight: 600; z-index: 9999; opacity: 0;
  transition: all .3s; pointer-events: none; max-width: 90vw; text-align: center;
  box-shadow: 0 4px 20px rgba(45,106,79,.35);
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── DESKTOP REFINEMENT ── */
@media (min-width: 768px) {
  .app-main { padding: 40px 0 80px; }
  .step-title { font-size: 2.3rem; }
  .opt-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; }
  .slots-grid { grid-template-columns: repeat(4,1fr); }
}


/* ── LOADING PLACEHOLDER (step 1 while fetching services) ── */
.loading-placeholder {
  text-align: center; padding: 48px 20px;
  color: var(--muted); font-size: .85rem; font-style: italic;
  background: var(--sand2); border-radius: var(--r); margin-bottom: 24px;
}
 
/* ── SERVICE OPT THUMBNAIL (when service has image) ── */
.opt-thumb {
  width: 40px; height: 40px; border-radius: 10px;
  object-fit: cover; flex-shrink: 0;
  border: 1.5px solid var(--sand2);
}
 
/* ── PHOTO UPLOAD (step 4) ── */
.photo-upload-card {
  background: white; border-radius: var(--r-lg);
  border: 1.5px solid var(--sand2); padding: 6px;
  box-shadow: var(--sh-sm); margin-bottom: 8px;
}
 
.photo-placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; padding: 48px 20px; border-radius: var(--r);
  border: 2px dashed var(--sand3); background: var(--sand);
  cursor: pointer; transition: all .25s;
}
.photo-placeholder:hover {
  border-color: var(--g4); background: var(--green-pale, #d4edda);
}
.photo-placeholder svg { stroke: var(--muted); }
.photo-placeholder-title { font-size: .92rem; font-weight: 600; color: var(--ink); }
.photo-placeholder-sub { font-size: .76rem; color: var(--muted); }
 
.photo-preview-wrap {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  padding: 16px;
}
.photo-preview-wrap img {
  width: 100%; max-height: 260px; object-fit: contain;
  border-radius: var(--r); border: 1.5px solid var(--sand2);
}
.photo-remove-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 18px; border-radius: var(--r-xl);
  background: none; border: 1.5px solid var(--orange, #D4622A);
  color: var(--orange, #D4622A); font-size: .78rem; font-weight: 600;
  cursor: pointer; transition: all .2s;
}
.photo-remove-btn:hover { background: rgba(212,98,42,.08); }
 
/* ── ADD TO CALENDAR (success screen) ── */
.add-to-calendar {
  width: 100%; margin-bottom: 24px;
}
.cal-hint {
  font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 12px; text-align: center;
}
.cal-btns {
  display: flex; gap: 12px; flex-wrap: wrap; justify-content: center;
}
.btn-cal {
  flex: 1; min-width: 150px; max-width: 220px;
  padding: 13px 18px; font-size: .78rem;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-cal-google {
  background: white; color: var(--text);
  border: 1.5px solid var(--sand3);
}
.btn-cal-google:hover { border-color: #4285F4; color: #4285F4; }
.btn-cal-apple {
  background: var(--ink); color: white;
}
.btn-cal-apple:hover { background: #222; }
 
/* ── STEP DOTS: 6 steps on small screens ── */
@media (max-width: 400px) {
  .step-dot label { display: none; }
  .step-dot span  { width: 24px; height: 24px; font-size: .72rem; }
  .step-dots      { gap: 4px; }
}

/* ══════════════════════════════════════════
   SALON CARD (step 2)
══════════════════════════════════════════ */
.salon-card {
  width: 100%; text-align: left; background: #fff;
  border: 1.5px solid var(--sand3); border-radius: 14px;
  padding: 18px 20px; cursor: pointer; transition: all .2s;
  display: flex; align-items: center; gap: 14px;
}
.salon-card:hover { border-color: var(--green); background: rgba(45,106,79,.04); }
.salon-card.selected { border-color: var(--green); background: rgba(45,106,79,.07); }
.salon-card-icon { font-size: 22px; flex-shrink: 0; }
.salon-card-info { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.salon-card-name { font-weight: 600; font-size: .95rem; color: var(--ink); }
.salon-card-address { font-size: .8rem; color: var(--muted); }
.salon-card-check { color: var(--green); opacity: 0; flex-shrink: 0; transition: opacity .2s; }
.salon-card.selected .salon-card-check { opacity: 1; }

/* ══════════════════════════════════════════
   DISCOUNT WRAP (step 7)
══════════════════════════════════════════ */
.discount-wrap {
  background: #fff; border-radius: 14px;
  border: 1.5px solid var(--sand3); padding: 22px 20px;
}
.discount-wrap input {
  border: 1.5px solid var(--sand3); border-radius: 10px;
  padding: 13px 16px; font-family: inherit;
  transition: border-color .2s; background: #fafafa;
}
.discount-wrap input:focus { outline: none; border-color: var(--green); }

/* 8 step dots on small screens */
@media (max-width: 480px) {
  .step-dot label { display: none; }
  .step-dot span  { width: 22px; height: 22px; font-size: .68rem; }
  .step-dots      { gap: 3px; }
}

.salon-card-map {
  display: inline-block;
  margin-top: 5px;
  font-size: 0.75rem;
  color: var(--green, #2D6A4F);
  text-decoration: none;
  font-weight: 500;
}
.salon-card-map:hover { text-decoration: underline; }
