/* XD layout: onboarding pages. Shared by every app; colors only through var(--theme-*, <current default>) so apps without the theme keys keep their look. */
/* XD batch 4 (screens 02-09): log in / sign up / phone verify, forgot password, terms dialog, create profile (Who Are You),
   choose interests, the order pipeline welcome intro, and the logged-out top bar + footer. Layout from the XD specs
   (j24, j40, j57, j74, j23); colors from onboardingSettings (inline, unchanged) or the theme vars with today's defaults. */

/* ---- Page shell: top bar, background stage, footer ---- */
.c-login.xo-auth{width:100%!important;min-height:100vh}
.c-login.xo-auth .login{height:auto;min-height:100vh;display:flex;flex-direction:column}
.xo-stage{flex:1 0 auto;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;padding:80px 16px 64px;
  background-size:cover;background-position:center;background-repeat:no-repeat}
.c-login.xo-auth .login .login-form.xo-stage{height:auto!important;min-height:0;margin:0!important}
.xo-onb{width:100%}
.xo-stage-in{min-height:calc(100vh - 140px)}  /* signed-in onboarding pages: under the site header */
.xo-stage[style*="url('')"]{background-image:none!important}

.xo-topbar{flex:none;display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:56px;padding:8px max(24px,calc((100% - 1240px) / 2));
  background:var(--nav-bg,var(--theme-top-bar,#fff));color:var(--nav-fg,var(--theme-top-bar-content,#000))}
.xo-topbar-logo{display:flex;align-items:center;min-width:0;color:inherit;text-decoration:none;font-weight:700}
.xo-topbar-logo img{height:28px;width:auto;max-width:min(240px,45vw);object-fit:contain}
.xo-topbar-actions{display:flex;align-items:center;gap:12px;flex:none}
.xo-topbar-actions a{display:inline-flex;align-items:center;justify-content:center;min-width:84px;min-height:28px;padding:4px 14px;border-radius:4px;
  font-size:11px;font-weight:700;line-height:1.2;text-decoration:none;white-space:nowrap}
.xo-topbar-login{background:var(--nav-fg,var(--theme-top-bar-content,#000));color:#fff!important}
.xo-fg-light .xo-topbar-login{color:#000!important}  /* light topBarContent pill: dark label (web.py nav_icon_light) */
.xo-topbar-signup{background:var(--theme-primary-button,#386efd);color:var(--theme-inverse-text,#fff)!important;box-shadow:inset 0 0 0 1px rgba(255,255,255,.45)}
.xo-topbar-actions a:hover,.xo-topbar-actions a:focus-visible{filter:brightness(1.1);outline-offset:2px}

.xo-footer{flex:none;background:var(--theme-banner,var(--theme-default-background,#f8f9fa));color:var(--theme-text,#212529)}
.xo-footer-content{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 24px;min-height:74px;padding:16px max(24px,calc((100% - 1130px) / 2));font-size:14px}
.xo-footer a{color:inherit;text-decoration:none}
.xo-footer-links a{display:inline-block;padding:6px 4px}

/* ---- The card ---- */
.xo-card{width:100%;max-width:482px;margin:0 auto;border-radius:8px;padding:32px 24px 28px;box-sizing:border-box}
.xo-card-wide{max-width:634px}
.c-login .login .login-form .login-view.xo-card{margin:0 auto;max-height:none;max-width:482px;padding:32px 24px 28px}
.c-login .login .login-form .login-view.xo-card.xo-card-wide{max-width:634px}
.xo-panel{background:var(--xo-card,var(--theme-more-card,var(--theme-default-background,#fff)));color:var(--xo-ink,var(--theme-text,#212529));
  box-shadow:0 1px 3px rgba(0,0,0,.12)}
.xo-panel label,.xo-panel h1,.xo-panel h4,.xo-panel legend,.xo-panel .xo-sub,.xo-panel .xo-skip a{color:var(--xo-ink,var(--theme-text,inherit))!important}
.xo-logo{padding:0 0 18px!important}
.xo-logo img{max-height:32px;max-width:100%;width:auto;object-fit:contain}
.xo-title{font-size:22px;font-weight:600;line-height:1.3;text-align:center;margin:0 0 6px!important}
.xo-sub{font-size:16px;text-align:center;margin:0 0 20px}
.xo-form{margin:0}
.xo-field,.xo-label{display:block;width:100%;max-width:312px;margin:0 auto 10px!important}
.xo-field-wide{max-width:556px}
.xo-sms .xo-field{margin-bottom:4px!important}
.xo-note{text-align:right;min-height:0}
.xo-note:empty,.xo-note:has(> span:empty),.xo-note span:empty{display:none}
.xo-or{text-align:center;font-size:12px;font-weight:700;margin:14px 0!important;padding:0!important}
.xo-actions{display:flex;justify-content:center;margin:20px 0 0}
.xo-switch{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:4px 8px;margin:20px 0 0;font-size:14px;font-weight:700}
.xo-switch .signup-btn{margin:0!important;text-decoration:underline;font-weight:700}
.xo-switch a{display:inline-flex;align-items:center;min-height:32px}
.xo-agree{text-align:center;font-size:10px;margin:14px 0 0}

/* Inputs: 312 x 32, radius 6 (XD Component 721). Colors stay with onboardingSettings / the existing look; with the
   inputField theme item they take it, and the theme text. */
.xo-card .input-white{width:100%;height:auto;min-height:34px;border-radius:6px;margin:0!important;display:flex;align-items:center}
.xo-card .input-white .md-input{height:34px;line-height:1.2;padding:6px 16px 6px 40px!important;font-size:12px;font-weight:500}
.xo-card .sms-phone .md-input{padding-left:8px!important;padding-right:96px!important}
.xo-card .sms-phone select{width:64px;height:34px;margin-left:4px;font-size:12px}
.c-login .login .login-form .login-view.xo-card .verify-btn{top:50%;transform:translateY(-50%);right:4px;height:22px;min-width:76px;font-size:10px!important;font-weight:700!important}
.xo-themed-input .input-white,.xo-themed-input .input-white .md-input,.xo-themed-input .input-white select{background-color:var(--theme-input-field,#fff)!important;color:var(--theme-text,#333)!important}
.xo-themed-input .input-white .md-input::placeholder{color:var(--theme-text,#333);opacity:.85}
.xo-card .terms-line{font-size:12px;text-align:left}
.xo-panel .form-control{height:34px;border-radius:6px;font-size:12px;font-weight:500;padding:6px 16px;border:0;
  background-color:#f1f1f1!important;color:#212529!important}
.xo-panel.xo-themed-input .form-control{background-color:var(--theme-input-field,#f1f1f1)!important;color:var(--theme-text,#212529)!important}
.xo-panel .form-control::placeholder{color:#6c757d;opacity:1}
.xo-panel.xo-themed-input .form-control::placeholder{color:var(--theme-text,#6c757d);opacity:.85}
.xo-help{display:block;max-width:312px;margin:-4px auto 12px!important;padding-left:20px;font-size:10px;opacity:.9;color:inherit!important}

/* Primary button: 178 x 36, radius 8, bold 16 (XD Component 722). Fill: onboardingButtonColors (inline) else primaryButton. */
.c-login .login .login-form .login-view.xo-card .login-btn,.xo-primary{min-width:178px;min-height:36px;padding:6px 24px;border-radius:8px;font-size:16px;font-weight:700;line-height:1.2;text-transform:none}

.xo-panel .xo-primary{background:var(--theme-primary-button,#386efd);border:1px solid var(--theme-primary-button,#386efd);color:var(--theme-inverse-text,#fff)!important}
.c-login .login .login-form .login-view.xo-card .guest-btn{min-height:36px}

/* ---- Terms dialog (XD j40: 634 card, 556 x 453 white box, Cancel / Accept 178 x 36 side by side) ---- */
.xo-terms .xo-title{font-size:22px;font-weight:500;margin-bottom:20px!important}
.xo-terms-box{max-width:556px;margin:0 auto;border:1px solid #c9c9c9;border-radius:6px;background:#fff;overflow:hidden}
.xo-terms-box .terms-frame{display:block;width:100%;height:min(453px,55vh);border:0;background:#fff}
.xo-terms .xo-agree{margin:8px 0 14px}
.xo-dialog-actions{display:flex;justify-content:space-between;align-items:center;gap:16px;max-width:556px;margin:16px auto 0}
.xo-dialog-actions form{margin:0}
.xo-cancel{display:inline-flex;align-items:center;justify-content:center;min-width:178px;min-height:36px;border:0!important;background:none!important;
  font-size:16px;font-weight:700;text-decoration:none;color:var(--xo-ink,#fff)!important}

/* ---- Create profile ---- */
.xo-avatar{margin:6px 0 18px!important;gap:4px!important}
.xo-avatar img{width:64px!important;height:64px!important}
.xo-avatar .wa-avatar-actions{gap:2px 12px}
.xo-avatar .wa-avatar-actions{align-items:center}
.xo-panel .xo-avatar .wa-avatar-actions label.btn,.xo-avatar .wa-avatar-actions .btn,.xo-avatar .wa-avatar-actions .capture-btn{display:inline-flex;align-items:center;margin:0;background:none!important;border:0!important;padding:8px 4px;min-height:32px;
  font-size:12px;font-weight:700;color:var(--theme-underscore,var(--theme-primary-button,#0d6efd))!important;box-shadow:none}

/* ---- Choose interests (XD j57: 150 x 40 chips, radius 6, 3 columns; selected = primary) ---- */
.xo-skip{position:absolute;top:24px;right:24px;margin:0!important}
.xo-skip a{display:inline-flex;align-items:center;min-height:40px;padding:0 8px;font-size:16px;font-weight:500;text-decoration:none}
.xo-interests.xo-card{position:relative;padding-top:40px}
.xo-interests .xo-title{padding:0 64px}
.xo-scroll{max-height:min(360px,52vh);overflow-y:auto;padding:0 18px 4px 32px;margin:0 -8px 0 0;scrollbar-color:var(--xo-ink,#fff) transparent}
.xo-interests .interest-tab{margin:0 0 16px;border:0;padding:0}
.xo-interests legend,.xo-interests .interest-tab h4{float:none;width:100%;text-align:center;font-size:16px;font-weight:700;margin:12px 0 14px}
.xo-interests .interest-tab h4{font-size:14px;font-weight:600;opacity:.9}
.xo-interests .interest-chips{display:grid;grid-template-columns:repeat(var(--interest-cols,3),minmax(0,1fr));gap:24px 32px;margin-bottom:24px}
.xo-interests .interest-chip{display:flex;align-items:center;gap:8px;min-height:40px;margin:0;padding:6px 12px;border-radius:6px;border:1px solid var(--xo-tag-bg,var(--xo-ink,var(--theme-text,#ccc)));
  background:var(--xo-tag-bg,var(--theme-tinted-more-card,transparent));color:var(--xo-tag-text,var(--xo-ink,var(--theme-text,inherit)))!important;font-size:12px;font-weight:600;cursor:pointer}
.xo-interests .interest-chip span{flex:1;text-align:center;overflow-wrap:anywhere}
.xo-interests .interest-chip input{flex:none;width:16px;height:16px;margin:0;accent-color:var(--xo-tag-sel,var(--theme-primary-button,#386efd))}
.xo-interests .interest-chip:has(input:checked){background:var(--xo-tag-sel,var(--theme-primary-button,#386efd));border-color:var(--xo-tag-sel,var(--theme-primary-button,#386efd));
  color:var(--xo-tag-sel-text,var(--theme-inverse-text,#fff))!important}
.xo-interests .interest-chip:has(input:focus-visible){outline:2px solid currentColor;outline-offset:2px}
.profile-interests.xo-interests .interest-chips{gap:12px}

/* ---- Order pipeline welcome intro (XD j74: 397 card, radius 16, gray stroke; 24 bold headline; 275 x 49 CTA) ---- */
.xo-intro{max-width:397px;margin:40px auto;padding:20px 18px 34px;border:1px solid var(--theme-secondary-text,rgba(127,127,127,.55));border-radius:16px;text-align:center;
  background:var(--theme-more-card,transparent);color:var(--theme-text,inherit)}
.xo-intro-hero{display:block;width:100%;aspect-ratio:361/203;object-fit:cover;border-radius:6px;margin:0 0 24px}
.xo-intro-title{font-size:24px;font-weight:700;line-height:1.2;margin:0 0 8px}
.xo-intro-body{font-size:16px;line-height:1.4;margin:0 0 24px}
.op .xo-intro-steps-title{font-size:18px;font-weight:700;margin:0 0 6px}
.xo-intro-steps{list-style-position:inside;padding:0;margin:0 0 24px;font-size:16px;font-weight:600;line-height:1.7}
.op .xo-intro-cta{min-width:min(275px,100%);min-height:49px;border-radius:8px;font-size:16px;font-weight:700}

/* ---- Phones ---- */
@media (max-width:575px){
  .xo-stage{padding:24px 12px 40px}
  .xo-card,.c-login .login .login-form .login-view.xo-card{padding:24px 16px 22px}
  .xo-topbar{padding:8px 12px}
  .xo-topbar-logo img{height:24px}
  .xo-topbar-actions{gap:8px}
  .xo-topbar-actions a{min-width:72px;min-height:40px;padding:4px 10px}
  .xo-card .input-white,.xo-card .input-white .md-input,.xo-card .sms-phone select,.xo-panel .form-control{min-height:44px;height:44px;font-size:16px}
  .xo-card .input-white .md-input{padding-left:16px!important}
  .xo-card .sms-phone .md-input{padding-left:4px!important}
  .c-login .login .login-form .login-view.xo-card .verify-btn{height:36px}
  .c-login .login .login-form .login-view.xo-card .login-btn,.xo-primary,.xo-cancel{min-height:44px}
  .xo-dialog-actions{flex-direction:column-reverse;align-items:stretch}
  .xo-dialog-actions > *,.xo-dialog-actions .xo-cancel,.xo-dialog-actions .login-btn{width:100%}
  .xo-terms-box .terms-frame{height:50vh}
  .xo-footer-content{justify-content:center;text-align:center;font-size:12px;min-height:60px}
  .xo-interests .xo-title{padding:0 56px}
  .xo-skip{top:16px;right:12px}
  .xo-scroll{max-height:none;overflow:visible;padding:0;margin:0}
  .xo-interests .interest-chips{grid-template-columns:repeat(min(var(--interest-cols,2),2),minmax(0,1fr));gap:10px}
  .xo-intro{margin:16px auto}
}
.c-login .login .login-form .login-view.xo-card .xo-note:has(> span:empty){display:none}
.c-login .login .login-form .login-view.xo-card .xo-note{padding-top:2px}
.xo-interests .interest-chip{box-shadow:0 0 0 1px rgba(127,127,127,.35)}
