/*
 * Samaa Dev — booking popup (diagnostic wizard).
 * Shared by index.html and landing.html. Uses the page's design tokens (--brand, --ink, …).
 */
html.bm-lock,html.bm-lock body{overflow:hidden}

.bm{position:fixed;inset:0;z-index:300;display:grid;place-items:center;padding:24px;visibility:hidden;opacity:0;transition:opacity .3s,visibility 0s .3s}
.bm.open{visibility:visible;opacity:1;transition:opacity .3s}
.bm-backdrop{position:absolute;inset:0;background:rgba(14,16,26,.55);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px)}

.bm-dialog{position:relative;width:min(1000px,100%);height:min(660px,calc(100dvh - 48px));display:grid;grid-template-columns:340px minmax(0,1fr);background:#fff;border-radius:28px;overflow:hidden;
  box-shadow:0 50px 120px -30px rgba(30,10,90,.55),0 0 0 1px rgba(255,255,255,.08);transform:translateY(26px) scale(.98);transition:transform .45s cubic-bezier(.2,.8,.2,1)}
.bm.open .bm-dialog{transform:none}

/* ---------- brand side ---------- */
.bm-side{position:relative;overflow:hidden;isolation:isolate;color:#fff;padding:34px 30px;display:flex;flex-direction:column;gap:18px;
  background:radial-gradient(420px 300px at 100% 0%,rgba(255,255,255,.18),transparent 60%),linear-gradient(165deg,#7630F2 0%,#5A1FD9 45%,#2C1A6B 100%)}
.bm-side::before,.bm-side::after{content:"";position:absolute;border-radius:50%;background:#fff;filter:blur(50px);opacity:.14;z-index:-1}
.bm-side::before{width:260px;height:120px;top:42%;right:-80px}
.bm-side::after{width:220px;height:100px;bottom:-30px;left:-60px}
.bm-brand{display:flex;align-items:center;gap:9px;font-family:var(--latin);font-weight:800;font-size:19px;direction:ltr;justify-content:flex-end}
.bm-brand img{width:30px;height:28px;object-fit:contain}
.bm-brand small{font-weight:600;color:#D9C8FD}
.bm-side h2{font-size:30px;line-height:1.2;font-weight:600;margin-top:6px}
.bm-side > p{font-size:14.5px;line-height:1.75;color:rgba(255,255,255,.82)}
.bm-rail{list-style:none;display:grid;gap:2px;margin:4px 0 0;padding:0;counter-reset:rail}
.bm-rail li{position:relative;display:flex;align-items:center;gap:12px;font-size:13.5px;color:rgba(255,255,255,.55);padding:5px 0;transition:color .3s}
.bm-rail li::before{counter-increment:rail;content:counter(rail);flex:none;width:24px;height:24px;border-radius:50%;display:grid;place-items:center;font-family:var(--latin);font-size:11.5px;font-weight:700;
  border:1.5px solid rgba(255,255,255,.3);transition:all .3s}
.bm-rail li.done{color:rgba(255,255,255,.8)}
.bm-rail li.done::before{content:"✓";background:rgba(255,255,255,.2);border-color:transparent}
.bm-rail li.now{color:#fff;font-weight:600}
.bm-rail li.now::before{background:#fff;color:#5A1FD9;border-color:#fff;box-shadow:0 0 0 5px rgba(255,255,255,.18)}
/* ---------- main ---------- */
.bm-main{position:relative;display:flex;flex-direction:column;min-width:0;min-height:0}
.bm-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:22px 30px 14px}
.bm-mini{display:none;align-items:center;gap:8px;font-size:14px}
.bm-mini img{width:26px;height:24px;object-fit:contain}
.bm-mini b{font-weight:600}
.bm-step{font-size:13px;font-weight:600;color:var(--brand);background:var(--brand-50);border-radius:999px;padding:5px 12px;white-space:nowrap}
.bm-x{width:40px;height:40px;border-radius:50%;display:grid;place-items:center;background:var(--bg-soft);color:var(--ink);border:0;cursor:pointer;transition:background .2s,transform .2s;flex:none}
.bm-x:hover{background:#E9EBF1;transform:rotate(90deg)}
.bm-x svg{width:18px;height:18px}
.bm-bar{height:6px;margin:0 30px;background:var(--bg-soft);border-radius:999px;overflow:hidden}
.bm-bar > i{display:block;height:100%;width:0;background:var(--brand-grad);border-radius:inherit;transition:width .45s cubic-bezier(.2,.8,.2,1)}

.bm-body{flex:1;min-height:0;overflow-y:auto;padding:30px 30px 10px;overscroll-behavior:contain}
.bm-stage.in{animation:bmStep .42s cubic-bezier(.2,.8,.2,1)}
@keyframes bmStep{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}
.bm-q{font-size:clamp(22px,2.4vw,28px);line-height:1.4;font-weight:600;color:var(--ink);margin:0}
.bm-hint{font-size:14px;color:var(--muted);margin:8px 0 22px}

/* answer cards */
.bm .wiz-chips{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:0;padding:0;counter-reset:opt}
.bm .wiz-chip{position:relative;display:flex;align-items:center;gap:14px;min-height:64px;padding:14px 16px;border-radius:16px;border:1.5px solid var(--line);background:#fff;
  color:var(--ink);font:inherit;font-size:16px;font-weight:500;line-height:1.45;text-align:start;cursor:pointer;transition:border-color .2s,background .2s,transform .2s,box-shadow .2s}
.bm .wiz-chip::before{counter-increment:opt;content:counter(opt);flex:none;width:30px;height:30px;border-radius:10px;display:grid;place-items:center;background:var(--bg-soft);color:var(--muted);
  font-family:var(--latin);font-size:13px;font-weight:700;transition:all .2s}
.bm .wiz-chip:hover{border-color:var(--brand-300);transform:translateY(-2px);box-shadow:0 14px 30px -20px rgba(60,25,140,.55)}
.bm .wiz-chip:focus-visible{outline:3px solid var(--brand-300);outline-offset:2px}
.bm .wiz-chip.on{border-color:var(--brand);background:var(--brand-50);color:var(--brand)}
.bm .wiz-chip.on::before{content:"✓";background:var(--brand-grad);color:#fff}
.bm .wiz-chip:disabled{opacity:.55;cursor:wait}

/* inputs */
.bm label,.bm .lbl{display:grid;gap:8px;font-size:13.5px;font-weight:500;color:var(--ink-2,#3B4250);margin-bottom:14px}
.bm input,.bm textarea{font:inherit;font-size:16px;color:var(--ink);background:var(--bg-soft);border:1.5px solid transparent;border-radius:14px;padding:14px 16px;outline:none;width:100%;
  transition:border-color .2s,background .2s,box-shadow .2s}
.bm textarea{min-height:130px;resize:vertical;line-height:1.7}
.bm input:focus,.bm textarea:focus{border-color:var(--brand);background:#fff;box-shadow:0 0 0 4px rgba(107,45,232,.1)}
.bm .row2{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.bm .row2 label{margin-bottom:14px}

.bm-err{margin:6px 0 0;font-size:13.5px;color:#E5484D;background:#FFF0F0;border-radius:12px;padding:10px 14px;text-align:center}

.bm-foot{padding:14px 30px 22px;border-top:1px solid var(--line);background:#fff}
.bm-actions{display:flex;gap:10px}
.bm-actions[hidden]{display:none!important}
.bm-actions .btn{flex:1;height:54px}
.bm-actions #wizBack{flex:0 0 auto;padding:0 22px;background:var(--bg-soft)}
.bm-actions .btn[hidden]{display:none}
.bm-actions .btn:disabled{opacity:.6;cursor:wait;transform:none}
.bm-secure{display:flex;align-items:center;justify-content:center;gap:6px;font-size:12.5px;color:var(--muted);margin-top:10px}
.bm-secure svg{width:14px;height:14px}
.bm-actions:not([hidden]) + .bm-secure{margin-top:12px}

/* success */
.bm-ok{position:absolute;inset:0;z-index:3;background:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:14px;padding:36px;
  opacity:0;visibility:hidden;transition:opacity .35s,visibility 0s .35s}
.sent .bm-ok{opacity:1;visibility:visible;transition:opacity .35s}
.bm-ok .ok-ring{position:relative;width:96px;height:96px;border-radius:50%;background:#E5F7EC;color:#119C4B;display:grid;place-items:center;margin-bottom:6px}
.bm-ok .ok-ring::before,.bm-ok .ok-ring::after{content:"";position:absolute;inset:0;border-radius:50%;border:2px solid #34D399;opacity:0}
.sent .bm-ok .ok-ring::before{animation:okPulse 1.6s .3s ease-out infinite}
.sent .bm-ok .ok-ring::after{animation:okPulse 1.6s 1.1s ease-out infinite}
@keyframes okPulse{from{transform:scale(1);opacity:.8}to{transform:scale(1.7);opacity:0}}
.bm-ok .ok-ring svg{width:46px;height:46px;stroke-dasharray:30;stroke-dashoffset:30}
.sent .bm-ok .ok-ring svg{animation:okDraw .5s .25s ease forwards}
@keyframes okDraw{to{stroke-dashoffset:0}}
.bm-ok h3{font-size:26px;font-weight:600;color:var(--ink)}
.bm-ok p{color:var(--muted);max-width:380px;line-height:1.8}
.bm-ok .ok-actions{display:flex;flex-wrap:wrap;gap:10px;justify-content:center;margin-top:8px}
.bm-ok .btn-wa{background:#25D366;color:#fff;box-shadow:0 12px 26px -12px rgba(37,211,102,.8)}
.bm-ok .btn-wa:hover{background:#1FBF5B}
.bm-ok .btn-wa svg{width:20px;height:20px}
.bm-ok .btn-wa[hidden]{display:none}
.bm-ok .ok-close{background:var(--bg-soft);color:var(--ink)}
.bm-ok .ok-steps{display:flex;gap:18px;flex-wrap:wrap;justify-content:center;font-size:13px;color:var(--muted);margin-top:6px}
.bm-ok .ok-steps span{display:flex;align-items:center;gap:6px}
.bm-ok .ok-steps b{width:22px;height:22px;border-radius:50%;background:var(--brand-50);color:var(--brand);display:grid;place-items:center;font-family:var(--latin);font-size:11px}

/* ---------- responsive ---------- */
@media (max-width:960px){
  .bm-dialog{grid-template-columns:270px minmax(0,1fr)}
  .bm-side{padding:28px 22px}
  .bm-side h2{font-size:25px}
}
@media (max-width:760px){
  .bm{padding:0;place-items:end stretch}
  .bm-dialog{width:100%;height:100dvh;border-radius:0;grid-template-columns:1fr;transform:translateY(100%)}
  .bm-side{display:none}
  .bm-head{padding:calc(14px + env(safe-area-inset-top)) 16px 12px}
  .bm-mini{display:flex}
  .bm-step{order:2;margin-inline-start:auto}
  .bm-x{order:3;width:38px;height:38px}
  .bm-bar{margin:0 16px}
  .bm-body{padding:24px 16px 8px}
  .bm-q{font-size:22px}
  .bm-hint{margin-bottom:18px}
  .bm .wiz-chips{grid-template-columns:1fr;gap:10px}
  .bm .wiz-chip{min-height:58px;font-size:15.5px}
  .bm .wiz-chip:hover{transform:none}
  .bm .row2{grid-template-columns:1fr;gap:0}
  .bm-foot{padding:12px 16px calc(14px + env(safe-area-inset-bottom))}
  .bm-actions .btn{height:52px}
  .bm-ok{padding:28px 20px}
  .bm-ok h3{font-size:23px}
  .bm-ok .ok-actions{flex-direction:column;width:100%}
  .bm-ok .ok-actions .btn{width:100%}
}
@media (max-height:620px) and (min-width:761px){
  .bm-side > p{display:none}
}
@media (prefers-reduced-motion:reduce){
  .bm,.bm-dialog,.bm-stage.in{transition:none!important;animation:none!important}
}
