/* Sign-up (two steps) and the invisible-captcha note. Loaded after portal_redesign.css. */

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* The checklist says the same as the hint, so once the script has filled the
   list the hint is kept for screen readers only. */
#reg-step-1 .form-group:has(.pw-rules:not(:empty)) .field-hint {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0);
}

#reg-step-1 .pw-rules {
  display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; padding: 0; list-style: none;
}
#reg-step-1 .pw-rule {
  display: inline-flex; align-items: center; gap: 5px; margin: 0;
  padding: 4px 10px; border-radius: 999px; font-size: 12px; line-height: 1.3;
  color: var(--pr-text-3, #6b7280);
  background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.08);
  transition: color .15s, background-color .15s, border-color .15s;
}
#reg-step-1 .pw-rule.met {
  color: var(--pr-ok, #4ade80);
  background: rgba(74, 222, 128, 0.08); border-color: rgba(74, 222, 128, 0.3);
}
#reg-step-1 .pw-rule-mark { font-size: 11px; }

.reg-code { margin: 4px 0 14px; }
.reg-code > summary {
  cursor: pointer; width: fit-content; list-style: none;
  font-size: 13px; color: var(--pr-accent, #22d3ee);
}
.reg-code > summary::-webkit-details-marker { display: none; }
.reg-code > summary:hover { text-decoration: underline; }
.reg-code[open] > summary { margin-bottom: 10px; }
.reg-code .form-group { margin-bottom: 0; }

.reg-optin {
  display: flex; gap: 10px; align-items: flex-start; margin: 0 0 18px; cursor: pointer;
  font-size: 13px; line-height: 1.5; font-weight: 400; text-transform: none; letter-spacing: normal;
  color: var(--pr-text-2, #9ca3af);
}
.reg-optin input { width: 16px; height: 16px; margin: 2px 0 0; flex-shrink: 0; cursor: pointer; }

/* Errors read as a message box above the buttons, not a thin red line below them. */
#reg-code-status.error, #reg-code-status.success {
  margin: 0 0 12px; padding: 10px 12px; border-radius: 10px; font-size: 13px; text-align: left;
}
#reg-code-status.error {
  background: rgba(239, 68, 68, 0.1); border: 1px solid rgba(239, 68, 68, 0.35);
}
#reg-code-status.success {
  background: rgba(74, 222, 128, 0.08); border: 1px solid rgba(74, 222, 128, 0.3);
}

.reg-actions > .btn-outline { flex: 0 0 auto; padding-left: 22px; padding-right: 22px; }
.reg-actions > .btn-primary { flex: 1 1 auto; }

@media (prefers-reduced-motion: reduce) {
  #reg-step-1 .pw-rule { transition: none; }
}

.page-login .auth-title { margin-bottom: 18px; }
#register-form { margin-top: 4px; }

/* First and last name share a row; they stack on a phone. */
.reg-name-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 420px) { .reg-name-row { grid-template-columns: 1fr; gap: 0; } }

#btn-send-code { width: 100%; }

.reg-code-sent {
  margin: 0 0 18px; text-align: center; font-size: 14px; line-height: 1.5;
  color: var(--pr-text-2, #9ca3af);
}
.reg-code-sent strong { color: var(--pr-text, #e5e7eb); font-weight: 600; }

/* The invisible captcha has no box, so hCaptcha's terms are named here. */
.captcha-note {
  margin: 12px 0 0; text-align: center; font-size: 11px; line-height: 1.5;
  color: var(--pr-text-3, #6b7280);
}
.captcha-note a { color: inherit; text-decoration: underline; }
.captcha-group { margin: 0; }

/* Choice step: Google or e-mail, then the e-mail form on its own. */
.auth-choice { display: flex; flex-direction: column; gap: 10px; margin: 8px 0 20px; }
.auth-choice .btn-email svg { color: var(--pr-text-2, #9aa3b2); }
.auth-back { display: inline-block; font-size: 12.5px; color: var(--pr-text-3, #7c8596); text-decoration: none; margin-bottom: 16px; }
.auth-back:hover { color: var(--pr-text, #e8eaf0); }
.reg-optin a { color: var(--pr-accent, #00d4ff); }
