/* The sign-up steps (app/views/onboarding.js), from the original's StyleSheets: BasicSignUpScreen.tsx,
   ConsentScreen.tsx, HealthProfileScreen.tsx, GoalsSetupScreen.tsx (blue theme). */

/* The screen: the original's two-stop background (backgroundGradient[0] → [3], top-left to bottom-right) */
.onb { min-height: 100vh; min-height: 100dvh; background: linear-gradient(to bottom right, var(--primary), var(--accent)); padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px)); }
.onb .ic, .onb-back svg { fill: currentColor; }
.onb-line { fill: none !important; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.onb-head { display: flex; align-items: center; justify-content: space-between; max-width: 600px; margin: 0 auto; padding: calc(20px + env(safe-area-inset-top, 0px)) 20px 20px; }
.onb-back { display: flex; width: 40px; height: 40px; flex: none; align-items: center; justify-content: center; border-radius: 20px; border: 0; padding: 0; cursor: pointer; background: rgba(255,255,255,0.1); color: var(--text); }
.onb-title { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: .5px; color: var(--text); text-align: center; outline: none; }
.onb-spacer { width: 40px; flex: none; }
.onb-content { max-width: 600px; margin: 0 auto; padding: 0 20px; }
.onb-health .onb-content { padding: 0 15px; }

/* The card: progress on top, the form below */
.onb-card { border-radius: 25px; box-shadow: 0 10px 20px rgba(0,0,0,0.2); margin: 0; }
.onb-progress { padding: 20px; border-radius: 25px 25px 0 0; background: var(--card); box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
.onb-progress-t { margin: 0 0 12px; font-size: 14px; font-weight: 600; text-align: center; color: var(--text); }
.onb-bar { height: 6px; border-radius: 3px; overflow: hidden; background: rgba(135,206,235,0.4); /* borderInput */ }
.onb-fill { display: block; height: 100%; border-radius: 3px; background: var(--brand-sub); transition: width .2s; }
.onb-form { padding: 24px; border-radius: 0 0 25px 25px; background: var(--card); box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
.onb-form-health { padding: 24px 18px; }

/* Inputs and pickers (inputWrapper) */
.onb-row { display: flex; align-items: center; width: 100%; height: 52px; margin: 0 0 16px; padding: 4px 16px; border-radius: 14px; border: 2px solid rgba(135,206,235,0.4); /* inputBorderColor */ background: var(--input-bg); box-shadow: 0 1px 2px rgba(0,0,0,0.05); color: var(--text); font: 500 16px var(--font); text-align: left; }
.onb-health .onb-row { margin-bottom: 20px; }
.onb-row:focus-within { border-color: var(--brand-sub); }
.onb-lead { display: flex; flex: none; margin-right: 12px; opacity: .8; color: var(--brand-sub); }
.onb-input { flex: 1; min-width: 0; height: 44px; background: none; border: 0; outline: none; padding: 0; color: var(--text); font: 500 16px var(--font); color-scheme: dark; }
.onb-input::placeholder, .onb-input.ph { color: var(--text-muted); }
.onb-input::-webkit-calendar-picker-indicator { opacity: .6; cursor: pointer; }
.onb-ok { display: flex; flex: none; color: var(--brand-sub); margin-left: 8px; }
.onb-ok[hidden], .onb-age[hidden] { display: none; }
.onb-age { flex: none; margin-left: 8px; font-size: 14px; font-weight: 400; color: var(--text-muted); }
.onb-picker { cursor: pointer; }
.onb-picker:focus-visible { outline: none; border-color: var(--brand-sub); }
.onb-ptext { flex: 1; min-width: 0; line-height: 44px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.onb-ptext.ph { color: var(--text-muted); }
.onb-chev { flex: none; color: var(--text-muted); }
.onb-label { margin: 0 0 8px 4px; font-size: 16px; font-weight: 600; color: var(--text); }

/* The open picker's list (dropdown) */
.onb-dd { margin: -12px 0 16px; border-radius: 14px; border: 1px solid rgba(135,206,235,0.4); /* inputBorderColor */ background: var(--input-bg); box-shadow: 0 4px 8px rgba(0,0,0,0.2); overflow: hidden; }
.onb-health .onb-dd { margin: -16px 0 20px; }
.onb-dd-item { display: flex; align-items: center; width: 100%; padding: 16px 20px; border: 0; border-bottom: 1px solid rgba(135,206,235,0.4); /* borderInput */ background: var(--input-bg); color: var(--text); font: 500 16px var(--font); text-align: left; cursor: pointer; }
.onb-dd-item:last-child { border-bottom: 0; }
.onb-dd-item[aria-pressed="true"] { background: rgba(135,206,235,0.2); /* selected */ }
.onb-dd-ic { display: flex; flex: none; margin-right: 12px; opacity: .8; color: var(--brand-sub); }
.onb-dd-t { flex: 1; }

/* Checkboxes (terms, consent): a real checkbox under the original's 24px box */
.onb-terms, .onb-consent { position: relative; display: flex; align-items: flex-start; }
.onb-consent, .onb-cb-wrap { cursor: pointer; }
.onb-cb-wrap { position: relative; display: flex; } /* the live app: only the box ticks; the words hold the two links */
.onb-terms { margin: 0 0 24px; }
.onb-cb-in { position: absolute; width: 24px; height: 24px; margin: 2px 0 0; opacity: 0; cursor: pointer; }
.onb-cb { display: flex; flex: none; width: 24px; height: 24px; margin: 2px 12px 0 0; align-items: center; justify-content: center; border-radius: 6px; border: 2px solid rgba(135,206,235,0.4); /* inputBorderColor */ background: var(--input-bg); color: var(--text); }
.onb-cb svg { visibility: hidden; }
.onb-cb-in:checked + .onb-cb { background: var(--brand-sub); border-color: var(--brand-sub); }
.onb-cb-in:checked + .onb-cb svg { visibility: visible; }
.onb-cb-in:focus-visible + .onb-cb { outline: 2px solid var(--brand-sub); outline-offset: 3px; }
.onb-terms-t { flex: 1; margin: 0; font-size: 14px; line-height: 20px; font-weight: 400; color: var(--text); }
.onb-terms-l { font-weight: 600; text-decoration: underline; color: var(--brand-sub); }

/* Error and the main button */
.onb-err { margin: 0 0 20px; padding: 16px; border-radius: 12px; border: 1px solid rgba(255,90,95,0.4); /* borderError */ background: rgba(255,90,95,0.1); /* errorBackground */ color: var(--error); font-size: 14px; font-weight: 500; line-height: 20px; text-align: center; }
.onb-btn { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 52px; padding: 14px 0; border: 0; border-radius: 16px; background: var(--brand-sub); color: var(--on-brand-sub); font: 700 18px var(--font); letter-spacing: 1px; cursor: pointer; box-shadow: 0 4px 8px rgba(0,0,0,0.3); }
.onb-btn:disabled { opacity: .5; cursor: default; }
.onb-btn-ic { margin-left: 8px; }
.onb-complete { margin-bottom: 20px; }
.onb-spin { width: 20px; height: 20px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: onb-spin .8s linear infinite; }
@keyframes onb-spin { to { transform: rotate(360deg); } }

/* Privacy & Consent: the page in its rounded box above, the agreement fixed below (as the original's WebView) */
.onb-fixed { display: flex; flex-direction: column; height: 100vh; height: 100dvh; min-height: 0; padding-bottom: 0; }
.onb-fixed .onb-head { width: 100%; }
.onb-fixed .onb-content { display: flex; flex-direction: column; flex: 1; min-height: 0; width: 100%; }
.onb-doc-wrap { flex: 1; min-height: 0; overflow-y: auto; margin: 0 0 20px; border-radius: 20px; outline: none; }
.onb-doc-wrap:focus-visible { outline: 2px solid var(--brand-sub); outline-offset: 2px; }
.onb-doc { min-height: 100%; padding: 20px; background: var(--bg-gradient); color: var(--text); line-height: 1.6; }
.onb-doc-head { text-align: center; margin-bottom: 30px; }
.onb-doc-icon { display: flex; width: 80px; height: 80px; margin: 0 auto 20px; align-items: center; justify-content: center; border-radius: 40px; background: var(--card); box-shadow: 0 4px 15px rgba(0,0,0,0.1); font-size: 40px; }
.onb-doc-title { margin: 0 0 10px; font-size: 28px; font-weight: 700; letter-spacing: .5px; color: var(--text); }
.onb-doc-sub { margin: 0 0 30px; font-size: 16px; color: var(--text-muted); }
.onb-doc-card { padding: 24px; margin-bottom: 20px; border-radius: 20px; background: var(--card); box-shadow: 0 4px 15px rgba(0,0,0,0.1); }
.onb-sec { margin-bottom: 24px; }
.onb-sec:last-child { margin-bottom: 0; }
.onb-sec-h { display: flex; align-items: center; margin-bottom: 12px; }
.onb-sec-ic { margin-right: 12px; font-size: 24px; }
.onb-sec-t { margin: 0; font-size: 18px; font-weight: 600; color: var(--text); }
.onb-sec-x { margin: 0 0 0 36px; font-size: 14px; line-height: 1.6; color: var(--text-muted); }
.onb-sec-x ul { list-style: none; margin: 0; padding: 0; }
.onb-sec-x li { position: relative; margin-bottom: 8px; padding-left: 20px; }
.onb-sec-x li::before { content: '•'; position: absolute; left: 0; font-weight: bold; color: var(--brand-sub); }
.onb-hl { font-weight: 600; background: var(--button-gradient); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.onb-note { margin: 20px 0; padding: 16px; border-left: 4px solid var(--brand-sub); border-radius: 8px; background: rgba(135,206,235,0.1); /* iconColor at 0.1 */ }
.onb-note p { margin: 0; }
.onb-note-t { margin-bottom: 8px !important; font-weight: 600; color: var(--brand-sub); }
.onb-bottom { flex: none; }
.onb-consent { margin: 0 0 20px; padding: 16px 20px; border-radius: 16px; background: rgba(255,255,255,0.1); }
.onb-consent .onb-cb-in { top: 16px; left: 20px; }
.onb-consent-t { flex: 1; font-size: 14px; line-height: 20px; font-weight: 500; color: var(--text); }
.onb-actions { padding: 0 20px calc(40px + env(safe-area-inset-bottom, 0px)); }
.onb-agree { letter-spacing: .5px; box-shadow: 0 4px 8px rgba(0,0,0,0.2); }
.onb-learn { display: block; width: 100%; text-align: center; margin: 0 0 16px; padding: 18px 0; border: 0; background: none; color: var(--brand-sub); font: 600 16px var(--font); text-decoration: underline; cursor: pointer; }
@media (max-width: 480px) { .onb-doc { padding: 15px; } .onb-doc-title { font-size: 24px; } .onb-doc-card { padding: 20px; } }

/* Goals & Preferences */
.onb-sec-title { margin: 0 0 8px; font-size: 20px; font-weight: 700; letter-spacing: -.3px; text-align: center; color: var(--text); }
.onb-sec-sub { margin: 0 0 24px; font-size: 14px; line-height: 18px; text-align: center; color: var(--text-muted); }
.onb-goals { margin-bottom: 16px; }
.onb-goal { display: flex; align-items: center; width: 100%; margin: 0 0 12px; padding: 16px; border-radius: 16px; border: 2px solid rgba(135,206,235,0.4); /* inputBorderColor */ background: var(--input-bg); box-shadow: 0 2px 4px rgba(0,0,0,0.1); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.onb-goal[aria-pressed="true"] { background: var(--accent-strong); border-color: var(--brand-sub); } /* readable: white text on the original's #87CEEB fails */
.onb-goal:disabled { cursor: default; }
.onb-goal-ic { display: flex; flex: none; margin-right: 16px; color: var(--brand-sub); }
.onb-goal[aria-pressed="true"] .onb-goal-ic, .onb-goal[aria-pressed="true"] .onb-goal-d { color: var(--text); }
.onb-goal-x { flex: 1; display: flex; flex-direction: column; }
.onb-goal-l { margin-bottom: 4px; font-size: 16px; font-weight: 600; }
.onb-goal-d { font-size: 14px; line-height: 18px; color: var(--text-muted); }
.onb-goal-ok { display: flex; flex: none; margin-left: 12px; color: var(--text); }
@media (prefers-reduced-motion: reduce) { .onb-fill { transition: none; } .onb-spin { animation-duration: 2s; } }
