/* Demo of online booking + a Telegram/MAX bot, shown to clinic owners.
   Not part of the portfolio design system: this page is a product demo, so it has its own
   calm medical palette. style.css is never loaded here. */
:root{
  --ink:#10243d; --ink-2:#44586f; --muted:#7b8a9c;
  --line:#e3e9f0; --bg:#f5f8fb; --card:#fff;
  --brand:#0a6ec4; --brand-dark:#07558f; --brand-soft:#e8f2fc;
  --ok:#128a5a; --ok-soft:#e6f5ee; --warn:#b9761b; --warn-soft:#fdf3e4;
  --r:14px; --r-sm:10px; --r-pill:999px;
  --shadow:0 1px 2px rgba(16,36,61,.06), 0 8px 24px rgba(16,36,61,.07);
}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{
  margin:0; background:var(--bg); color:var(--ink);
  font:16px/1.55 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  -webkit-font-smoothing:antialiased;
}
.wrap{max-width:1060px; margin:0 auto; padding:0 16px}
h1,h2,h3{line-height:1.2; margin:0; letter-spacing:-.015em}
h1{font-size:clamp(25px,5.4vw,40px); font-weight:800}
h2{font-size:clamp(20px,3.6vw,27px); font-weight:750}
h3{font-size:17px; font-weight:700}
p{margin:0}
a{color:var(--brand-dark)}

/* the page must say what it is, before anything else */
.ribbon{background:var(--warn-soft); border-bottom:1px solid #f0e0c4; color:#6b4a12;
  font-size:13.5px; padding:9px 0; text-align:center}
.ribbon b{font-weight:700}

header.top{padding:34px 0 10px}
.eyebrow{color:var(--brand-dark); font-weight:700; font-size:12.5px; letter-spacing:.09em;
  text-transform:uppercase; margin-bottom:10px}
header.top p.lead{color:var(--ink-2); font-size:17px; margin-top:12px; max-width:62ch}

section{padding:30px 0}
.sec-head{margin-bottom:16px}
.sec-head .n{display:inline-block; min-width:26px; height:26px; line-height:26px; text-align:center;
  background:var(--brand); color:#fff; border-radius:var(--r-pill); font-size:13px;
  font-weight:700; margin-right:9px}
.sec-head p{color:var(--ink-2); margin-top:7px; max-width:64ch; font-size:15px}

.grid{display:grid; gap:18px; grid-template-columns:1fr}
@media (min-width:900px){ .grid.two{grid-template-columns:1.05fr .95fr; align-items:start} }

.card{background:var(--card); border:1px solid var(--line); border-radius:var(--r);
  box-shadow:var(--shadow); padding:18px}
.card > h3{margin-bottom:4px}
.card .sub{color:var(--muted); font-size:13.5px; margin-bottom:14px}

/* ---- the booking widget ---- */
.steps{display:flex; gap:6px; margin-bottom:16px; flex-wrap:wrap}
.steps li{list-style:none; font-size:12px; color:var(--muted); display:flex; align-items:center; gap:6px}
.steps li .dot{width:21px; height:21px; border-radius:var(--r-pill); background:#eef2f7;
  color:var(--muted); display:grid; place-items:center; font-weight:700; font-size:11.5px}
.steps li[data-on] {color:var(--ink)}
.steps li[data-on] .dot{background:var(--brand); color:#fff}
.steps li[data-done] .dot{background:var(--ok); color:#fff}

fieldset{border:0; padding:0; margin:0 0 4px}
legend{font-weight:700; font-size:14.5px; padding:0; margin-bottom:9px}
.opts{display:flex; flex-wrap:wrap; gap:8px}
.opt{appearance:none; -webkit-appearance:none; background:#fff; border:1.5px solid var(--line);
  color:var(--ink); border-radius:var(--r-pill); padding:11px 15px; font:inherit; font-size:14.5px;
  cursor:pointer; min-height:44px; transition:border-color .25s ease, background-color .25s ease}
.opt:hover{border-color:#c3d4e6}
.opt[aria-pressed="true"]{background:var(--brand); border-color:var(--brand); color:#fff; font-weight:600}
.opt .meta{display:block; font-size:12px; opacity:.72; font-weight:400}
.opt:disabled{opacity:.42; cursor:not-allowed; text-decoration:line-through}
.opt:focus-visible{outline:3px solid #9ec8ee; outline-offset:2px}

fieldset.gap{margin-top:16px}
.hint{color:var(--muted); font-size:14px; margin:2px 0}
.under-phone{color:var(--muted); font-size:13px; text-align:center; margin-top:12px}
.slots{display:grid; grid-template-columns:repeat(auto-fill,minmax(84px,1fr)); gap:8px}
.slots .opt{padding:11px 6px; text-align:center; justify-content:center}

.summary{margin-top:16px; border-top:1px dashed var(--line); padding-top:14px;
  display:flex; flex-wrap:wrap; gap:8px 18px; font-size:14px; color:var(--ink-2)}
.summary b{color:var(--ink)}

.go{margin-top:16px; width:100%; min-height:50px; border:0; border-radius:var(--r-pill);
  background:var(--brand); color:#fff; font:inherit; font-weight:700; font-size:16px;
  cursor:pointer; transition:background-color .25s ease}
.go:hover:not(:disabled){background:var(--brand-dark)}
.go:disabled{background:#c6d3e0; cursor:not-allowed}

.done{display:none; text-align:center; padding:8px 4px 2px}
.done.on{display:block}
.done .tick{width:52px; height:52px; margin:0 auto 12px; border-radius:var(--r-pill);
  background:var(--ok-soft); color:var(--ok); display:grid; place-items:center; font-size:27px}
.done h3{margin-bottom:6px}
.done p{color:var(--ink-2); font-size:14.5px}
.done .note{margin-top:12px; background:var(--warn-soft); color:#6b4a12; border-radius:var(--r-sm);
  padding:10px 12px; font-size:13.5px}
.again{margin-top:14px; background:none; border:1.5px solid var(--line); border-radius:var(--r-pill);
  padding:10px 16px; font:inherit; font-size:14px; cursor:pointer; min-height:44px; color:var(--ink-2)}

/* ---- phone with the bot ----
   A real-looking device, not a plain rounded box: bezel, side buttons, dynamic island and a status
   bar. The same frame (templates/mockups/iphone.svg) goes into the printed pitches, so the page a
   clinic opens and the picture in its PDF read as one product. */
.phone{position:relative; background:#14181d; border-radius:46px; padding:11px; max-width:336px;
  margin:0 auto; box-shadow:0 1px 2px rgba(16,36,61,.1), 0 18px 40px rgba(16,36,61,.22);}
.phone::before, .phone::after{content:""; position:absolute; left:-3px; width:3px;
  background:#2b3138; border-radius:2px 0 0 2px}
.phone::before{top:112px; height:34px}
.phone::after{top:160px; height:58px}
.phone .side{position:absolute; right:-3px; top:140px; width:3px; height:86px;
  background:#2b3138; border-radius:0 2px 2px 0}
.phone .screen{position:relative; background:#e9eef3; border-radius:36px; overflow:hidden}
.phone .status{display:flex; align-items:center; justify-content:space-between;
  background:#0a6ec4; color:#fff; padding:9px 22px 2px; font-size:12.5px; font-weight:700}
.phone .status .island{position:absolute; left:50%; top:7px; transform:translateX(-50%);
  width:84px; height:23px; background:#14181d; border-radius:999px}
.phone .status .right{display:flex; gap:6px; align-items:center}
.phone .status .sig{display:flex; gap:3px; align-items:flex-end}
.phone .status .sig i{display:block; width:3px; background:currentColor; border-radius:1px}
.phone .status .sig i:nth-child(1){height:4px} .phone .status .sig i:nth-child(2){height:6px}
.phone .status .sig i:nth-child(3){height:8px} .phone .status .sig i:nth-child(4){height:10px}
.phone .status .bat{width:22px; height:11px; border:1.4px solid currentColor; border-radius:3px;
  position:relative}
.phone .status .bat::after{content:""; position:absolute; inset:1.6px; background:currentColor; border-radius:1px}
.phone .bar{background:#0a6ec4; color:#fff; padding:6px 14px 11px}
.phone .bar b{display:block; font-size:14.5px}
.phone .bar span{font-size:11.5px; opacity:.85}
.chat{padding:12px; display:flex; flex-direction:column; gap:9px; min-height:330px}
.msg{max-width:84%; padding:9px 12px; border-radius:14px; font-size:13.5px; line-height:1.45;
  background:#fff; border-bottom-left-radius:4px; box-shadow:0 1px 1px rgba(16,36,61,.08)}
.msg.me{align-self:flex-end; background:#d6ebfb; border-bottom-left-radius:14px; border-bottom-right-radius:4px}
.msg .t{display:block; font-size:10.5px; color:var(--muted); margin-top:4px}
.msg .btn-row{display:flex; gap:6px; margin-top:8px; flex-wrap:wrap}
.msg .btn-row span{background:#eef4fa; color:var(--brand-dark); border-radius:var(--r-pill);
  padding:5px 10px; font-size:12px; font-weight:600}
.chat .tag{align-self:center; background:#dbe3ec; color:#5c6b7d; font-size:11px;
  padding:3px 10px; border-radius:var(--r-pill)}
.phone .foot{text-align:center; color:#8fa3b8; font-size:11px; padding:7px 7px 11px}

/* ---- admin card ---- */
.admin .row{display:flex; justify-content:space-between; gap:12px; padding:10px 0;
  border-bottom:1px solid var(--line); font-size:14px}
.admin .row:last-of-type{border-bottom:0}
.admin .row span{color:var(--muted)}
.admin .actions{display:flex; gap:8px; margin-top:12px; flex-wrap:wrap}
.admin .actions button{border-radius:var(--r-pill); border:1.5px solid var(--line); background:#fff;
  padding:10px 15px; font:inherit; font-size:14px; cursor:pointer; min-height:44px}
.admin .actions button.main{background:var(--ok); border-color:var(--ok); color:#fff; font-weight:600}
.admin .state{margin-top:12px; font-size:13.5px; color:var(--ok); font-weight:600; display:none}
.admin .state.on{display:block}

/* ---- list of what step 1 includes ---- */
.ticks{display:grid; gap:9px; margin:0; padding:0; list-style:none}
.ticks li{display:flex; gap:10px; font-size:14.5px; color:var(--ink-2)}
.ticks li::before{content:"✓"; color:var(--ok); font-weight:700; flex:none}

footer{border-top:1px solid var(--line); margin-top:26px; padding:24px 0 40px; background:#fff}
footer p{color:var(--ink-2); font-size:14px; max-width:68ch}
footer .cta{display:inline-flex; align-items:center; min-height:48px; margin-top:14px;
  background:var(--brand); color:#fff; text-decoration:none; font-weight:650;
  padding:0 20px; border-radius:var(--r-pill); transition:background-color .25s ease}
footer .cta:hover{background:var(--brand-dark)}
footer .small{color:var(--muted); font-size:12.5px; margin-top:16px}

/* Once the demo is booked the left card collapses to a short confirmation while the phone beside
   it stays tall, which left a big hole on a laptop. Hold the height so the page does not jump. */
@media (min-width:900px){ #booking-card{min-height:700px} }

@media (prefers-reduced-motion: reduce){ *{transition:none !important; animation:none !important} }

/* ---- real phone frame (Moustafa, 2026-11-13) ----
   The bot thread sits inside Moustafa's own device frame, templates/mockups/iphone.svg, the same
   one the PDFs use (tools/phone_shot.py). phone-back.svg is the whole frame; the live chat is placed
   over its screen (x 15, y 12, 385 x 819 of 415 x 843, radius 50 — the centred screen mockup.py uses);
   phone-front.svg is only the dynamic island and the status-bar icons, laid on top. Regenerate both
   from the template if it changes. Keep this block last so it overrides the drawn CSS phone above. */
.phone{background:url(phone-back.svg) center/100% 100% no-repeat; aspect-ratio:415/843; width:100%;
  max-width:336px; padding:0; border-radius:0; box-shadow:none;
  filter:drop-shadow(0 18px 28px rgba(16,36,61,.22))}
.phone::before{content:none}
.phone .side{display:none}
.phone::after{content:""; position:absolute; inset:0; width:auto; height:auto; border-radius:0;
  background:url(phone-front.svg) center/100% 100% no-repeat; pointer-events:none; z-index:2}
.phone .screen{position:absolute; left:3.6145%; top:1.4235%; width:92.771%; height:97.153%;
  border-radius:12.99% / 6.105%; display:flex; flex-direction:column}
.phone .status{flex:none; height:5.62%; padding:0}
.phone .status > *{visibility:hidden}
.phone .chat{flex:1; min-height:0; overflow-y:auto; scrollbar-width:none}
.phone .chat::-webkit-scrollbar{display:none}
.phone .foot{flex:none}

/* ---- booking card, the pattern Moustafa approved on 2026-11-16 (vitazub's «Свободное время») ----
   Compact rows instead of a form: doctor with an initials avatar, day as weekday-over-date,
   the taken hours struck through so the grid reads as a real schedule, and one wide button that
   names the whole slot. */
.opt.doc { align-items: center; gap: 9px; padding-left: 9px; }
.opt.doc .av { width: 28px; height: 28px; border-radius: 50%; background: #e8f2fc;
  color: var(--brand-dark); font-style: normal; font-size: 11.5px; font-weight: 800;
  display: inline-grid; place-items: center; flex: none; }
.opt.doc[aria-pressed="true"] .av { background: rgba(255,255,255,.22); color: #fff; }
.opt.day { flex-direction: column; gap: 1px; padding: 7px 10px; min-width: 60px; align-items: center; }
.opt.day .wd { font-size: 11px; color: var(--muted); font-weight: 600; }
.opt.day b { font-size: 18px; font-weight: 700; line-height: 1.15; }
.opt.day[aria-pressed="true"] .wd { color: rgba(255,255,255,.85); }
.slots .opt.taken { color: #b6c1cc; border-color: #edf1f5; text-decoration: line-through; background: #fafbfc; }
.slots .opt.taken:hover { border-color: #edf1f5; }
