/* register.css — Refactored and simplified styles for the registration wizard
  Scoped to the register wizard to avoid collisions and keep styles maintainable.
*/

/* rely on global variables from login.css when available */
:root {
  --register-max-width: var(--card-max-width, 420px);
  --register-control-height: var(--control-height, 48px);
  --register-radius: var(--radius, 12px);
}

/* Container / layout */
#register-wizard { display:flex; flex-direction:column; align-items:center; width:100%; }
#register-wizard .wizard-step { display:none; padding-top:6px; width:100%; max-width:var(--register-max-width); box-sizing:border-box; }
#register-wizard .wizard-step.is-active { display:flex; flex-direction:column; align-items:center }
#register-wizard .wizard-step h2 { text-align:center; color: #fff; margin-bottom:12px; font-weight:700 }

/* Choice row (step 1) */
.choice-row { display:flex; gap:10px; width:100%; box-sizing:border-box; }
.choice-row .choice-btn { flex:1; display:inline-flex; align-items:center; justify-content:center; height:var(--register-control-height); padding:0 14px; border-radius:var(--register-radius); font-size:0.95rem; font-weight:600 }

/* Inputs */
.form-control { width:100%; box-sizing:border-box; height:var(--register-control-height); padding:10px 14px; border-radius:12px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); color:#fff; font-size:1rem; outline:none; }
#register-wizard .mb-2 { width:100%; box-sizing:border-box; margin-bottom:16px; position:relative }

/* Market dropdown */
#market_results { position: absolute; left: 0; right: 0; z-index: 1200; display:none; background: #073739; color: #fff; border: 1px solid rgba(255,255,255,0.06); border-radius:12px; padding:8px; box-shadow: 0 8px 24px rgba(0,0,0,0.45); max-height:240px; overflow:auto; }
#market_results .result-item { display:block; width:100%; text-align:left; padding:12px 10px; border-radius:8px; margin:0 0 6px 0; color:#fff; font-size:1rem; line-height:1.2; font-weight:600; background:transparent; border:none; }
#market_results .result-item:hover { background: rgba(255,255,255,0.06); }

/* Buttons */
.btn { box-sizing:border-box; }
.btn-primary { width:100%; height:var(--register-control-height); padding:0 14px; display:inline-flex; align-items:center; justify-content:center; font-size:1rem; border-radius:var(--register-radius); }
.btn-outline { padding:6px 18px; border-radius:999px; border:2px solid rgba(255,255,255,.18); background:transparent; color:#fff; font-weight:700; display:inline-flex; align-items:center; justify-content:center }

/* Social buttons (match inputs dimensions) */
.social-group { width:100%; max-width:var(--register-max-width); box-sizing:border-box; display:flex; flex-direction:column; gap:10px; margin:0 auto 6px; }
.btn-social { width:100%; box-sizing:border-box; height:var(--register-control-height); padding:0; display:flex; align-items:center; justify-content:flex-start; gap:0; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.12); border-radius:var(--register-radius); overflow:hidden }
.btn-social .social-label { padding: 0 14px; flex:1; font-weight:700; font-size:0.95rem; color:#fff }
.icon-circle { display:flex; align-items:center; justify-content:center; width: calc(var(--register-control-height) - 16px); height: calc(var(--register-control-height) - 16px); margin:8px 8px; background:#fff; border-radius:50%; overflow:hidden; flex:0 0 auto; box-sizing:border-box }
.social-icon-img { width: calc((var(--register-control-height) - 16px) * 0.5); height: calc((var(--register-control-height) - 16px) * 0.5); object-fit:contain; display:block; margin:auto }

/* Actions and helpers */
.wizard-actions { gap:10px; display:flex; justify-content:center; width:100%; flex-wrap:wrap }
.register-panel-target,
#register-wizard form#email-form,
#register-wizard .social-group,
#register-wizard .wizard-actions .btn-primary {
  max-width: var(--register-max-width);
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}
#register-wizard .wizard-actions .btn-primary { width:100%; }

/* Ensure all primary panels share identical visual width */
#register-wizard .choice-row,
#register-wizard .social-group,
#register-wizard form#email-form,
#register-wizard .wizard-actions,
#register-wizard .small-actions .cta-box {
  width:100%;
  max-width:var(--register-max-width);
  margin:0 auto;
  box-sizing:border-box;
}

/* Inputs and primary buttons: force full width inside the panel */
#register-wizard form#email-form .form-control,
#register-wizard .btn-social,
#register-wizard .wizard-actions .btn-primary {
  width:100%;
  max-width:100%;
  box-sizing:border-box;
}
.wizard-back-link { background: rgba(255,255,255,0.02); color:#bfe9c8; padding:8px 12px; border-radius:10px; border:none }
.wizard-small-link { background: rgba(255,255,255,0.04); border-radius:10px; color:#bfe9c8; padding:8px 12px; display:inline-block; font-weight:700 }

/* CTA box */
.small-actions { display:flex; flex-direction:column; align-items:center; gap:8px; margin-top:24px; }
.small-actions .muted-link { text-align:center }

/* Match the login page register text size */
#register-wizard .small-actions .muted-link { font-size: 1rem; color: rgba(255,255,255,.9); font-weight:400 }
.small-actions .btn { width:170px; text-align:center }
.small-actions .cta-box { width:100%; display:flex; flex-direction:column; gap:10px; align-items:center; padding:14px 12px; border-radius:16px; background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.04); }

/* Labels */
#register-wizard .form-label { display:block; margin-bottom:12px; color:#fff }

/* small utility */
.result-item.create-new { font-weight:700 }

/* Divider — match login page appearance */
#register-wizard .divider { display:flex; align-items:center; gap:10px; margin:6px 0; padding:8px 0; width:100%; max-width:var(--register-max-width); box-sizing:border-box }
#register-wizard .divider::before, #register-wizard .divider::after { content: ""; flex:1; height:1px; background:#e8e8ec }
/* Match the login page font stack and spacing exactly */
#register-wizard .divider span {
  padding:0 10px;
  color:#9aa0a6;
  font-weight:600;
  font-size:.9rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  line-height: 1;
}

/* Password pair: small gap and merged visual appearance */
.password-pair { width:100%; box-sizing:border-box }
/* Increase selector specificity to override the generic .mb-2 margin rules */
#register-wizard .password-pair > .mb-2 { margin-bottom: 0 !important }
#register-wizard .password-pair > .mb-2 + .mb-2 { margin-top: 3px !important }
/* Force the corner radii to visually merge the two inputs */
#register-wizard input#password { border-bottom-left-radius: 0 !important; border-bottom-right-radius: 0 !important }
#register-wizard input#password2 { border-top-left-radius: 0 !important; border-top-right-radius: 0 !important }
/* Ensure the pair keeps the same height & visual as other inputs */
#register-wizard .password-pair .form-control { display:block }

/* Make the bottom gap after the confirm-password field match the standard .mb-2 spacing */
#register-wizard .password-pair > .mb-2:last-child { margin-bottom: 16px !important }

/* Match login form spacing: small top gap before inputs */
#register-wizard form#email-form { margin-top: 4px }
