/* Страницы записи клиента по макетам Booking.html и BookingMobile.html. */
:root {
  --paper: #EFEEE7; --paper-2: #F7F6F1; --sage-bg: #B5BE9E; --border-input: #D6D8CC;
  --ink: #262B22; --ink-2: #4E5547; --muted: #5E6457;
  --moss: #3E4A2E; --sage: #6B7A4B; --sage-soft: #DCE0CC; --sage-mid: #C9CFB4;
  --apricot: #E9B98F; --apricot-soft: #F6E3D1; --apricot-ink: #5C3415; --danger: #A23B2A;
  --font-display: 'Lora', Georgia, serif; --font-ui: 'Manrope', system-ui, sans-serif;
  --ease-out: cubic-bezier(.2, .7, .2, 1);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--sage-bg); color: var(--ink); font-family: var(--font-ui); }
a { color: var(--moss); }
a:hover { color: var(--ink); }

.bk { position: relative; overflow: hidden; min-height: 100vh; padding: 40px 24px; }
.bk-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.draw { stroke-dasharray: 1600; stroke-dashoffset: 1600; animation: draw 6s cubic-bezier(.4, 0, .2, 1) forwards; }
@keyframes draw { to { stroke-dashoffset: 0 } }
.bk-wrap { position: relative; max-width: 1120px; margin: 0 auto; display: flex; flex-direction: column; gap: 28px; }

.bk-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; }
.bk-back { text-decoration: none; display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; color: var(--ink); min-height: 44px; }
.stepper { display: flex; gap: 8px; flex-wrap: wrap; }
.step { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 999px; font-size: 14px; font-weight: 600; background: rgba(247, 246, 241, .55); color: var(--ink); }
.step-dot { width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; background: var(--paper-2); }
.step.cur { background: var(--ink); color: var(--paper-2); }
.step.cur .step-dot { background: var(--apricot); color: var(--ink); }
.step.done .step-dot { background: var(--sage); color: var(--paper-2); }

.bk-row { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.info { flex: 1 1 340px; min-width: 0; background: var(--ink); color: var(--paper); border-radius: 32px; padding: 36px; display: flex; flex-direction: column; gap: 24px; }
.info-who { display: flex; align-items: center; gap: 14px; }
.info-avatar { width: 56px; height: 56px; border-radius: 50%; background: var(--sage); display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-style: italic; font-size: 24px; flex: none; }
.info-name { font-weight: 700; font-size: 17px; }
.info-role { font-size: 14px; color: #BFC3B5; }
.info-title { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: clamp(26px, 2.6vw, 34px); line-height: 1.15; hyphens: manual; }
.info-title em { font-style: italic; color: var(--apricot); }
.info-list { display: flex; flex-direction: column; gap: 14px; font-size: 15px; }
.info-list span { display: flex; gap: 12px; align-items: center; }
.info-list svg { flex: none; }
.info-rule { background: #353B30; border-radius: 20px; padding: 18px 20px; font-size: 14px; line-height: 1.6; color: #D5D8CC; }

.card { flex: 999 1 560px; min-width: 0; background: var(--paper-2); border-radius: 32px; padding: 36px; min-height: 640px; display: flex; flex-direction: column; }
.pane { display: flex; flex-direction: column; gap: 28px; animation: fadeUp .6s var(--ease-out) both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px) } to { opacity: 1; transform: none } }
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
.pane-title { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 30px; }
.pane-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

/* календарь месяца */
.month-nav { display: flex; align-items: center; gap: 8px; }
.round-btn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border-input); background: transparent; cursor: pointer; color: var(--ink); font-size: 18px; }
.round-btn:disabled { color: #B4B9AA; cursor: default; }
.month-label { font-weight: 700; font-size: 16px; min-width: 130px; text-align: center; }
.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.wd { text-align: center; font-size: 13px; font-weight: 600; color: var(--muted); padding-bottom: 4px; }
.day {
  height: 56px; border-radius: 16px; border: 0; font: 600 16px var(--font-ui); display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 4px; background: transparent; color: #A3A898; cursor: default; transition: background-color .25s, color .25s, transform .25s;
}
.day .dot { width: 6px; height: 6px; border-radius: 50%; }
.day.has { background: #EAEBE2; color: var(--ink); cursor: pointer; }
.day.has .dot { background: var(--sage); }
.day.has:hover { transform: translateY(-2px); }
.day.sel { background: var(--moss); color: var(--paper-2); }
.day.sel .dot { background: var(--apricot); }
.day.blank { visibility: hidden; }
.legend { display: flex; flex-wrap: wrap; gap: 18px; font-size: 13px; color: var(--muted); }
.legend span { display: flex; align-items: center; gap: 8px; }

/* лента дней на телефоне */
.strip { display: none; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -20px; padding: 0 20px; }
.strip-day { flex: none; width: 60px; height: 76px; border-radius: 18px; border: 0; background: #EAEBE2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-family: var(--font-ui); color: var(--ink); cursor: pointer; }
.strip-day .wd2 { font-size: 12px; color: var(--muted); }
.strip-day .num { font-size: 20px; font-weight: 700; }
.strip-day.sel { background: var(--moss); color: var(--paper-2); }
.strip-day.sel .wd2 { color: var(--paper-2); opacity: .8; }

.times-box { border-top: 1px solid #E2E3DA; padding-top: 24px; display: flex; flex-direction: column; gap: 16px; }
.times { display: flex; flex-wrap: wrap; gap: 10px; }
.time {
  height: 52px; min-width: 96px; padding: 0 20px; border-radius: 999px; font: 600 16px var(--font-ui); cursor: pointer;
  background: #fff; color: var(--ink); border: 1.5px solid var(--border-input); transition: background-color .25s, color .25s, border-color .25s;
}
.time:hover { border-color: var(--sage); }
.time.sel { background: var(--moss); color: var(--paper-2); border-color: var(--moss); }
.muted { color: var(--muted); }

.primary {
  height: 56px; padding: 0 30px; border-radius: 999px; border: 0; font: 600 16px var(--font-ui); display: inline-flex; align-items: center;
  justify-content: center; gap: 12px; background: var(--moss); color: var(--paper-2); cursor: pointer; text-decoration: none;
}
.primary:hover { background: var(--ink); color: var(--paper-2); }
.primary:disabled { background: var(--border-input); color: #6F7567; cursor: not-allowed; }
.outline {
  height: 54px; padding: 0 24px; border-radius: 999px; border: 1.5px solid var(--moss); background: transparent; color: var(--moss);
  font: 600 15px var(--font-ui); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center;
}
.outline:hover { background: rgba(62, 74, 46, .06); color: var(--moss); }
.actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.actions--end { justify-content: flex-end; }
.sticky-summary { display: none; }

/* шаг «Данные» */
.summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; background: var(--sage-soft); border-radius: 20px; padding: 18px 22px; }
.summary-main { display: flex; align-items: center; gap: 14px; }
.summary b { display: block; font-size: 16px; }
.summary span { font-size: 14px; color: var(--ink-2); }
.link-btn { border: 0; background: transparent; font: 600 14px var(--font-ui); color: var(--moss); text-decoration: underline; cursor: pointer; min-height: 44px; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.field { display: flex; flex-direction: column; gap: 8px; font-size: 14px; font-weight: 600; }
.field input { height: 52px; border-radius: 14px; border: 1px solid var(--border-input); background: #fff; padding: 0 16px; font: 500 16px var(--font-ui); color: var(--ink); width: 100%; }
.field input:focus { outline: 2px solid var(--sage); outline-offset: 1px; }
.field input[aria-invalid="true"] { border-color: var(--danger); }
.field small { font-weight: 400; font-size: 13px; color: var(--muted); }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; line-height: 1.5; color: var(--ink-2); cursor: pointer; }
.consent input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--moss); flex: none; }
.error { color: var(--danger); font-size: 14px; font-weight: 600; line-height: 1.5; }
.note { display: flex; gap: 12px; align-items: flex-start; background: var(--sage-soft); border-radius: 18px; padding: 14px 16px; font-size: 13px; line-height: 1.5; color: var(--moss); }

/* окно документа при записи */
.doc-modal { position: fixed; inset: 0; background: rgba(38, 43, 34, .45); display: none; align-items: center; justify-content: center; padding: 24px 12px; z-index: 30; }
.doc-modal.open { display: flex; }
.doc-modal-card { width: 720px; max-width: 100%; height: min(86vh, 900px); background: #FBFBF8; border-radius: 24px; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.doc-modal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-family: var(--font-display); font-size: 22px; }
.doc-modal-head b { font-weight: 400; }
.doc-modal iframe { flex: 1; width: 100%; border: 0; border-radius: 12px; background: #fff; }

/* пакет сессий: выделенная кнопка под карточкой услуги */
.info-pkg {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 18px 20px; border-radius: 20px;
  border: 1.5px solid var(--apricot); background: rgba(233, 185, 143, .12); color: var(--paper); cursor: pointer; text-align: left;
  font: 600 16px var(--font-ui); transition: background-color .25s;
}
.info-pkg:hover, .info-pkg[aria-pressed="true"] { background: rgba(233, 185, 143, .24); }
.info-pkg small { display: block; font-weight: 400; font-size: 13px; color: #D5D8CC; margin-top: 4px; }
.info-pkg .badge { flex: none; background: var(--apricot); color: var(--ink); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 700; }

.pkg-points { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.pkg-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.pkg-option {
  display: flex; flex-direction: column; gap: 6px; text-align: left; padding: 18px 20px; border-radius: 20px; cursor: pointer;
  background: #fff; border: 1.5px solid var(--border-input); font-family: var(--font-ui); color: var(--ink); transition: border-color .25s, background-color .25s;
}
.pkg-option:hover { border-color: var(--sage); }
.pkg-option.sel { border-color: var(--moss); background: var(--sage-soft); }
.pkg-option .t { font-weight: 700; font-size: 17px; }
.pkg-option .s { font-size: 13px; color: var(--muted); }
.pkg-option .p { font-size: 20px; font-weight: 700; margin-top: 4px; }
.pkg-option .p s { font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 6px; }
.pkg-option .off { align-self: flex-start; background: var(--apricot-soft); color: var(--apricot-ink); border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 700; }

/* расписание пакета: недели по порядку, занятые — с выбором замены */
.plan { display: flex; flex-direction: column; gap: 10px; }
.plan-row { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border-radius: 18px; background: #fff; border: 1px solid #E2E3DA; }
.plan-row.busy { border-color: var(--apricot); background: #FFFBF6; }
.plan-head { display: flex; align-items: center; gap: 12px; font-size: 15px; }
.plan-num { width: 28px; height: 28px; border-radius: 50%; background: var(--sage-soft); color: var(--moss); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex: none; }
.plan-row.busy .plan-num { background: var(--apricot-soft); color: var(--apricot-ink); }
.plan-when { font-weight: 700; }
.plan-state { margin-left: auto; font-size: 13px; color: var(--muted); text-align: right; }
.plan-row.busy .plan-state { color: var(--apricot-ink); font-weight: 600; }
.plan-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.plan-choice { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--border-input); background: #fff; font: 600 14px var(--font-ui); color: var(--ink); cursor: pointer; }
.plan-choice.sel { background: var(--moss); border-color: var(--moss); color: var(--paper-2); }
.plan-end { font-size: 14px; color: var(--ink-2); line-height: 1.6; }

/* «Вы записаны» (класс .finish — .done занят пройденным шагом) */
.finish { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 20px; padding: 32px 0; margin: auto 0; }
.done-mark { width: 104px; height: 104px; border-radius: 50%; background: var(--sage); display: flex; align-items: center; justify-content: center; animation: pop .7s var(--ease-out) both; }
.done-mark.wait { background: var(--apricot); }
@keyframes pop { 0% { transform: scale(.6); opacity: 0 } 60% { transform: scale(1.06); opacity: 1 } 100% { transform: scale(1) } }
.check { stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .6s .45s ease-out forwards; }
.done-title { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 40px; line-height: 1.1; }
.done-when { margin: 0; font-size: 18px; font-weight: 600; }
.done-text { margin: 0; max-width: 460px; font-size: 16px; line-height: 1.6; color: var(--muted); }
.done-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 8px; }

@media (max-width: 640px) {
  .bk { padding: 16px 16px 120px; }
  .bk-wrap { gap: 16px; }
  .stepper .step:not(.cur) { display: none; }
  .info { padding: 22px; border-radius: 26px; gap: 14px; }
  .info-title { font-size: 26px; }
  .info-list, .info-rule { display: none; }
  .card { padding: 22px 20px; border-radius: 26px; min-height: 0; }
  /* только прозрачность: анимация transform у родителя ломает position: fixed у кнопки внизу */
  .pane { gap: 20px; animation-name: fadeIn; }
  .pane-title { font-size: 26px; }
  .month, .legend, .month-nav { display: none; }
  .strip { display: flex; }
  .times { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .time { min-width: 0; padding: 0; border-radius: 16px; }
  .times-box { padding-top: 18px; }
  /* «Продолжить» прилипает к низу экрана */
  .actions--sticky { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: var(--paper-2); border-top: 1px solid #E2E3DA; padding: 12px 16px 20px; flex-direction: column; align-items: stretch; gap: 8px; }
  .actions--sticky .primary { width: 100%; }
  .sticky-summary { display: block; font-size: 14px; color: var(--muted); text-align: center; }
  .actions .primary, .actions .outline { flex: 1 1 auto; }
  .done-title { font-size: 32px; }
  .plan-head { flex-wrap: wrap; }
  .plan-state { margin-left: 40px; text-align: left; width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .pane, .done-mark, .draw, .check, .day, .time { animation: none !important; transition: none; stroke-dashoffset: 0; }
}
