/* Acorduri GDPR — „Ghid de pornire” (public/js/gdprSetupGuide.js). Direcția A: clar și aerisit, margini vizibile,
 * albastru #2563eb = acțiunea principală / selecția, verde = gata. Clasele NU conțin card / panel / section / close
 * (light-theme.css le restilizează); marginile care trebuie să se vadă au `!important`. */

.gdg-coach, .gdg-pill, .gdg-overlay {
    --gdg-line: #d3dbe5; --gdg-sep: #e3e8ef; --gdg-blue: #2563eb; --gdg-blue-d: #1d4ed8; --gdg-blue-s: #eff4ff;
    --gdg-green: #16a34a; --gdg-green-s: #ecfdf3; --gdg-amber: #b45309; --gdg-amber-s: #fffbeb;
    --gdg-t1: #0f172a; --gdg-t2: #334155; --gdg-t3: #64748b;
    --gdg-shadow: 0 1px 2px rgba(15,23,42,.06), 0 12px 32px -8px rgba(15,23,42,.22);
    font-family: Inter, system-ui, -apple-system, 'Segoe UI', sans-serif; color: var(--gdg-t1); line-height: 1.45;
    box-sizing: border-box;
}
.gdg-coach *, .gdg-pill *, .gdg-overlay * { box-sizing: border-box; }
.gdg-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- butoane (scara --ml-btn-*: 36 / 32 px, ≥ 44 px pe telefon) ---------- */
.gdg-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 0 14px;
    border-radius: 9px; border: 1px solid var(--gdg-line) !important; background: #fff; color: var(--gdg-t1) !important;
    font: 600 13.5px/1.2 Inter, system-ui, sans-serif; cursor: pointer; text-decoration: none; white-space: nowrap;
    transition: background .15s, border-color .15s, box-shadow .15s, transform .1s;
}
.gdg-btn:hover { background: #f8fafc; border-color: #c3cdd9 !important; }
.gdg-btn:active { transform: translateY(1px); }
.gdg-btn:focus-visible, .gdg-dot:focus-visible, .gdg-icbtn:focus-visible, .gdg-pill-main:focus-visible, .gdg-pill-x:focus-visible {
    outline: 3px solid rgba(37,99,235,.45); outline-offset: 2px;
}
.gdg-btn[disabled] { opacity: .5; cursor: default; }
.gdg-btn--primary { background: var(--gdg-blue) !important; border-color: var(--gdg-blue) !important; color: #fff !important; box-shadow: 0 1px 2px rgba(37,99,235,.3); }
.gdg-btn--primary:hover { background: var(--gdg-blue-d) !important; border-color: var(--gdg-blue-d) !important; }
.gdg-btn--soft { background: var(--gdg-green-s); border-color: #bbe5c8 !important; color: #166534 !important; }
.gdg-btn--soft:hover { background: #dcfce7; }
.gdg-btn--ghost { background: transparent; border-color: transparent !important; color: var(--gdg-t2) !important; }
.gdg-btn--ghost:hover { background: #f1f5f9; border-color: transparent !important; }
.gdg-btn--sm { min-height: 32px; padding: 0 10px; font-size: 13px; }
.gdg-btn--lg { min-height: 44px; padding: 0 20px; font-size: 15px; }
.gdg-btn--wide { width: 100%; min-height: 42px; margin-top: 12px; font-size: 14px; }
.gdg-icbtn {
    width: 32px; height: 32px; border-radius: 8px; border: 1px solid transparent !important; background: transparent;
    color: var(--gdg-t3) !important; font-size: 20px; line-height: 1; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
}
.gdg-icbtn:hover { background: #f1f5f9; color: var(--gdg-t1) !important; }

/* ---------- antrenorul (panoul plutitor de jos-dreapta) ---------- */
.gdg-coach {
    position: fixed; right: 20px; bottom: 20px; z-index: 9500; width: 376px; max-width: calc(100vw - 24px);
    max-height: calc(100vh - 40px); overflow: auto; background: #fff; border: 1px solid var(--gdg-line) !important;
    border-radius: 16px; box-shadow: var(--gdg-shadow); padding: 14px 16px 14px;
    animation: gdg-rise .28s cubic-bezier(.2,.8,.2,1);
}
.gdg-coach[hidden], .gdg-pill[hidden] { display: none !important; }
.gdg-head { display: flex; align-items: center; gap: 10px; }
.gdg-head-ic { width: 34px; height: 34px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; font-size: 18px;
    background: linear-gradient(135deg, #e8efff, #f1ebff); flex: 0 0 auto; }
.gdg-head-t { flex: 1 1 auto; min-width: 0; }
.gdg-head-t h2 { margin: 0 !important; font-size: 15px !important; font-weight: 700 !important; color: var(--gdg-t1) !important; line-height: 1.25 !important; }
.gdg-head-t span { display: block; font-size: 12px; color: var(--gdg-t3) !important; }
.gdg-prog { height: 6px; border-radius: 99px; background: #eef2f7; margin: 12px 0 10px; overflow: hidden; }
.gdg-prog i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #2563eb, #7c3aed); transition: width .5s cubic-bezier(.2,.8,.2,1); }

.gdg-steps { list-style: none; margin: 0 0 12px; padding: 0; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.gdg-steps li { position: relative; display: flex; align-items: center; }
.gdg-steps li + li::before { content: ''; width: 10px; height: 2px; background: var(--gdg-sep); margin-right: 6px; border-radius: 2px; }
.gdg-dot {
    width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--gdg-line) !important; background: #fff; color: var(--gdg-t3) !important;
    font: 700 12.5px/1 Inter, system-ui, sans-serif; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0;
    transition: transform .15s, background .15s;
}
.gdg-dot:hover { transform: scale(1.06); }
.gdg-dot.is-done { background: var(--gdg-green) !important; border-color: var(--gdg-green) !important; color: #fff !important; }
.gdg-dot.is-skip { background: #f1f5f9 !important; border-color: #cbd5e1 !important; border-style: dashed !important; color: var(--gdg-t3) !important; }
.gdg-dot.is-cur { border-color: var(--gdg-blue) !important; color: var(--gdg-blue) !important; box-shadow: 0 0 0 4px rgba(37,99,235,.14); }
.gdg-dot.is-cur.is-done { color: #fff !important; }

.gdg-step { border: 1px solid var(--gdg-line) !important; border-radius: 12px; padding: 14px; background: linear-gradient(180deg, #fbfcff, #fff); animation: gdg-fade .25s ease; }
.gdg-step-k { font-size: 11.5px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--gdg-blue) !important; margin-bottom: 4px; }
.gdg-step h3 { margin: 0 0 6px !important; font-size: 16px !important; font-weight: 700 !important; color: var(--gdg-t1) !important; line-height: 1.3 !important; }
.gdg-why { margin: 0 0 8px; font-size: 13.5px; color: var(--gdg-t2) !important; }
.gdg-note { margin: 6px 0 0; font-size: 13px; color: var(--gdg-t2) !important; }
.gdg-note b { color: var(--gdg-t1) !important; }
.gdg-facts { display: grid; gap: 6px; margin: 8px 0 0; padding: 10px 12px; background: #f8fafc; border: 1px solid var(--gdg-sep) !important; border-radius: 10px; }
.gdg-facts div { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.gdg-facts span { font-size: 11.5px; color: var(--gdg-t3) !important; }
.gdg-facts b { font-size: 13px; color: var(--gdg-t1) !important; font-weight: 600; }
.gdg-url { font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; font-weight: 500 !important; word-break: break-all; font-size: 12.5px !important; }
.gdg-pillnote { margin: 8px 0 0; padding: 8px 10px; border-radius: 9px; font-size: 12.5px; background: #f8fafc; border: 1px solid var(--gdg-sep) !important; color: var(--gdg-t2) !important; }
.gdg-pillnote.gdg-ok { background: var(--gdg-green-s); border-color: #bbe5c8 !important; color: #166534 !important; }
.gdg-pillnote.gdg-info { background: var(--gdg-blue-s); border-color: #c7d7fe !important; color: #1e3a8a !important; }
.gdg-pillnote.gdg-warn { background: var(--gdg-amber-s); border-color: #fde68a !important; color: #92400e !important; }
.gdg-sec { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.gdg-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--gdg-sep); }
.gdg-flash { display: flex; align-items: center; gap: 10px; padding: 18px 14px; border-radius: 12px; background: var(--gdg-green-s); border: 1px solid #bbe5c8 !important;
    color: #166534 !important; font-weight: 600; font-size: 14px; animation: gdg-fade .2s ease; }
.gdg-flash span { width: 30px; height: 30px; border-radius: 50%; background: var(--gdg-green); color: #fff !important; display: inline-flex; align-items: center; justify-content: center;
    font-size: 16px; animation: gdg-pop .35s cubic-bezier(.2,1.6,.4,1); flex: 0 0 auto; }

/* ---------- pastila „Ghid de pornire · 3/7” ---------- */
.gdg-pill { position: fixed; right: 96px; bottom: 20px; /* lângă butonul plutitor al asistentului, nu peste el */ z-index: 9500; display: inline-flex; align-items: center; gap: 2px;
    background: #fff; border: 1px solid var(--gdg-line) !important; border-radius: 999px; box-shadow: var(--gdg-shadow); padding: 4px; animation: gdg-rise .25s ease; }
.gdg-pill-main { display: inline-flex; align-items: center; gap: 10px; border: 0 !important; background: transparent; cursor: pointer; padding: 2px 10px 2px 2px; border-radius: 999px; color: var(--gdg-t1) !important; }
.gdg-pill-main:hover { background: #f8fafc; }
.gdg-ring { --p: 0; width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    background: conic-gradient(#2563eb calc(var(--p) * 1%), #e5eaf2 0); flex: 0 0 auto; }
.gdg-ring span { width: 28px; height: 28px; border-radius: 50%; background: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; }
.gdg-pill-t { display: flex; flex-direction: column; text-align: left; line-height: 1.2; }
.gdg-pill-t b { font-size: 13px; color: var(--gdg-t1) !important; }
.gdg-pill-t span { font-size: 12px; color: var(--gdg-blue) !important; font-weight: 600; }
.gdg-pill-x { width: 28px; height: 28px; border-radius: 50%; border: 0 !important; background: transparent; color: var(--gdg-t3) !important; cursor: pointer; font-size: 17px; line-height: 1; }
.gdg-pill-x:hover { background: #f1f5f9; color: var(--gdg-t1) !important; }

/* ---------- ținta evidențiată ---------- */
.gdg-spot { outline: 3px solid #2563eb !important; outline-offset: 4px; border-radius: 10px; animation: gdg-pulse 1.6s ease-out 3; scroll-margin: 90px; position: relative; z-index: 1; }

/* ---------- ferestrele: bun venit / final / adresă ---------- */
.gdg-overlay { position: fixed; inset: 0; z-index: 10050; background: rgba(15,23,42,.42); display: flex; align-items: center; justify-content: center; padding: 16px; animation: gdg-fade .2s ease; }
.gdg-dlg { position: relative; width: 100%; max-width: 560px; max-height: calc(100vh - 32px); overflow: auto; background: #fff; border: 1px solid var(--gdg-line) !important;
    border-radius: 18px; box-shadow: 0 24px 60px -12px rgba(15,23,42,.35); padding: 22px 26px 22px; text-align: center; animation: gdg-rise .3s cubic-bezier(.2,.8,.2,1); }
.gdg-dlg--final { max-width: 680px; }
.gdg-dlg--sm { max-width: 440px; text-align: left; }
.gdg-dlg--welcome { background: radial-gradient(120% 70% at 50% 0%, #eef3fd 0%, #f6f1fd 38%, #fff 70%); }
.gdg-wl-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 28px; }
.gdg-h-sm { margin: 0 !important; font-size: 17px !important; font-weight: 700 !important; color: var(--gdg-t1) !important; }
.gdg-wl-emoji { font-size: 46px; line-height: 1; margin: 2px 0 8px; animation: gdg-pop .5s cubic-bezier(.2,1.6,.4,1); }
.gdg-dlg h2#gdgWelcomeT, .gdg-dlg h2#gdgFinalT { margin: 0 0 6px !important; font-size: 23px !important; font-weight: 800 !important; letter-spacing: -.02em; color: var(--gdg-t1) !important; line-height: 1.2 !important; }
.gdg-wl-sub { margin: 0 auto 16px; max-width: 460px; font-size: 14.5px; color: var(--gdg-t2) !important; }
.gdg-wl-list { list-style: none; margin: 0 auto 18px; padding: 0; max-width: 430px; text-align: left; display: grid; gap: 6px; }
.gdg-wl-list li { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--gdg-line) !important; border-radius: 10px; background: #fff; font-size: 14px; color: var(--gdg-t1) !important; }
.gdg-wl-list li em { font-style: normal; color: var(--gdg-t3) !important; font-size: 12.5px; }
.gdg-wl-list li.is-done { background: var(--gdg-green-s); border-color: #bbe5c8 !important; }
.gdg-wl-n { width: 24px; height: 24px; border-radius: 50%; background: var(--gdg-blue-s); color: var(--gdg-blue) !important; font-weight: 700; font-size: 12.5px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.gdg-wl-list li.is-done .gdg-wl-n { background: var(--gdg-green); color: #fff !important; }
.gdg-wl-act { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.gdg-wl-act--row { flex-direction: row; justify-content: flex-end; margin-top: 14px; }
.gdg-field { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--gdg-t2); margin-top: 6px; }
.gdg-field input { min-height: 40px; padding: 0 12px; border: 1px solid var(--gdg-line) !important; border-radius: 9px; font: 500 14px ui-monospace, Menlo, Consolas, monospace; color: var(--gdg-t1); }
.gdg-field input:focus { outline: 3px solid rgba(37,99,235,.25); border-color: var(--gdg-blue) !important; }

.gdg-final-grid { display: grid; grid-template-columns: 1fr auto; gap: 18px; text-align: left; margin: 4px 0 18px; align-items: start; }
.gdg-sum { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.gdg-sum li { display: flex; align-items: center; gap: 10px; padding: 6px 4px; border-bottom: 1px solid var(--gdg-sep); font-size: 13.5px; color: var(--gdg-t1) !important; }
.gdg-sum li > span:first-child { width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex: 0 0 auto; }
.gdg-sum li > span:nth-child(2) { flex: 1 1 auto; min-width: 0; }
.gdg-sum li.is-done > span:first-child { background: var(--gdg-green); color: #fff !important; }
.gdg-sum li.is-skipped > span:first-child, .gdg-sum li.is-todo > span:first-child { background: #f1f5f9; color: var(--gdg-t3) !important; }
.gdg-sum li em { font-style: normal; font-size: 12px; color: var(--gdg-green) !important; font-weight: 600; }
.gdg-linkbox { margin-top: 12px; padding: 12px; border: 1px solid var(--gdg-line) !important; border-radius: 12px; background: #f8fafc; }
.gdg-linkbox > span { display: block; font-size: 11.5px; color: var(--gdg-t3) !important; margin-bottom: 2px; }
.gdg-qrbox { width: 168px; padding: 10px; border: 1px solid var(--gdg-line) !important; border-radius: 14px; background: #fff; text-align: center; }
.gdg-qrbox img { width: 146px; height: 146px; display: block; margin: 0 auto 4px; image-rendering: pixelated; }
.gdg-qrbox span { font-size: 12px; color: var(--gdg-t3) !important; }

.gdg-confetti { position: absolute; inset: 0 0 auto 0; height: 0; pointer-events: none; }
.gdg-confetti i { position: absolute; top: -10px; width: 8px; height: 14px; border-radius: 2px; opacity: 0; animation: gdg-fall 1.4s ease-in .15s forwards; }
.gdg-confetti i:nth-child(1) { left: 12%; background: #2563eb; animation-delay: .1s; }
.gdg-confetti i:nth-child(2) { left: 24%; background: #7c3aed; animation-delay: .25s; }
.gdg-confetti i:nth-child(3) { left: 36%; background: #16a34a; animation-delay: .05s; }
.gdg-confetti i:nth-child(4) { left: 50%; background: #f59e0b; animation-delay: .3s; }
.gdg-confetti i:nth-child(5) { left: 62%; background: #2563eb; animation-delay: .18s; }
.gdg-confetti i:nth-child(6) { left: 74%; background: #ec4899; animation-delay: .02s; }
.gdg-confetti i:nth-child(7) { left: 86%; background: #7c3aed; animation-delay: .22s; }
.gdg-confetti i:nth-child(8) { left: 94%; background: #16a34a; animation-delay: .12s; }

@keyframes gdg-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes gdg-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes gdg-pop { 0% { transform: scale(.4); } 100% { transform: scale(1); } }
@keyframes gdg-pulse { 0% { box-shadow: 0 0 0 0 rgba(37,99,235,.45); } 100% { box-shadow: 0 0 0 14px rgba(37,99,235,0); } }
@keyframes gdg-fall { 0% { opacity: 1; transform: translateY(0) rotate(0); } 100% { opacity: 0; transform: translateY(150px) rotate(220deg); } }

@media (prefers-reduced-motion: reduce) {
    .gdg-coach, .gdg-pill, .gdg-overlay, .gdg-dlg, .gdg-step, .gdg-flash, .gdg-flash span, .gdg-wl-emoji { animation: none !important; }
    .gdg-spot { animation: none !important; }
    .gdg-confetti { display: none; }
    .gdg-prog i { transition: none; }
}

/* ---------- telefon: foaie de jos, deasupra barei de navigare ---------- */
@media (max-width: 768px) {
    .gdg-coach { left: 8px; right: 8px; width: auto; max-width: none; bottom: calc(68px + env(safe-area-inset-bottom)); max-height: 72vh; border-radius: 16px; z-index: 9998; padding: 12px 14px; }
    .gdg-pill { right: 72px; bottom: calc(72px + env(safe-area-inset-bottom)); z-index: 9998; }
    .gdg-btn { min-height: 44px; }
    .gdg-btn--sm { min-height: 40px; }
    .gdg-dot { width: 34px; height: 34px; }
    .gdg-steps li + li::before { width: 6px; margin-right: 4px; }
    .gdg-overlay { align-items: flex-end; padding: 0; }
    .gdg-dlg { max-width: none; border-radius: 18px 18px 0 0; max-height: 92vh; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); }
    .gdg-dlg h2#gdgWelcomeT, .gdg-dlg h2#gdgFinalT { font-size: 20px !important; }
    .gdg-wl-act .gdg-btn--lg { width: 100%; }
    .gdg-final-grid { grid-template-columns: 1fr; }
    .gdg-qrbox { justify-self: center; }
}

/* Mai multe clinici: lista cu starea fiecăreia (setările sunt per clinică) */
.gdg-clinics{list-style:none;margin:6px 0 8px;padding:0;display:grid;gap:4px;font-size:13px}
.gdg-clinics li{padding:6px 10px;border:1px solid #e2e8f0 !important;border-radius:8px;background:#fff;color:#1e293b}
.gdg-clinics li.is-sel{border-color:#93c5fd !important;background:#eff6ff}
.gdg-clinics li em{font-style:normal;color:#2563eb;font-weight:600}
.gdg-clinics li small{float:right;color:#64748b}

/* light-theme.css pune `button{border-radius:8px !important}` — butoanele rotunde ale ghidului își păstrează forma */
button.gdg-dot, button.gdg-pill-x { border-radius: 50% !important; }
button.gdg-pill-main { border-radius: 999px !important; }

/* telefon îngust (375 px): cei 7 pași încap pe un rând */
@media (max-width: 400px) {
    .gdg-steps li + li::before { width: 5px; margin-right: 3px; }
    button.gdg-dot { width: 30px; height: 30px; font-size: 12px; }
}
