/* =========================================================
   FOLLO — BARCODE-FIRST REGISTRATION + ONBOARDING
   Custom /register/ page and BuddyPress registration screens.
   ========================================================= */

:root {
  --follo-register-ink: #10111a;
  --follo-register-muted: #6b7280;
  --follo-register-line: #e5e7eb;
  --follo-register-soft: #f7f8fb;
  --follo-register-blue: #2f7de8;
  --follo-register-blue-dark: #1f67c8;
  --follo-register-green: #198754;
  --follo-register-radius: 22px;
}

/* Native BuddyPress register/activation screens, when used. */
body.register #buddypress,
body.activation #buddypress,
body.buddypress.register #buddypress {
  max-width: 920px;
  margin: 42px auto;
  padding: 0;
  background: transparent;
  border: 0;
}

/* Do not let Divi's generic form rules flatten the FOLLO component. */
.follo-private-register,
.follo-registration-complete,
.follo-private-register *,
.follo-registration-complete * {
  box-sizing: border-box;
}

.follo-private-register,
.follo-registration-complete {
  width: min(100%, 760px);
  margin: 28px auto 56px;
  padding: clamp(26px, 4vw, 46px);
  background: #fff;
  border: 1px solid rgba(16, 17, 26, .08);
  border-radius: var(--follo-register-radius);
  box-shadow:
    0 28px 70px rgba(16, 24, 40, .10),
    0 3px 12px rgba(16, 24, 40, .04);
  color: var(--follo-register-ink);
  font-family: inherit;
}

.follo-register-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  margin: 0 0 18px;
  padding: 6px 11px;
  border: 1px solid #d9e8ff;
  border-radius: 999px;
  background: #f3f8ff;
  color: #245fae;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .08em;
  line-height: 1;
  text-transform: uppercase;
}

.follo-register-heading {
  margin-bottom: 28px;
}

.follo-private-register h2,
.follo-registration-complete h2,
.follo-registration-complete h3 {
  margin: 0;
  color: var(--follo-register-ink);
  font-family: inherit;
}

.follo-private-register h2,
.follo-registration-complete h2 {
  font-size: clamp(30px, 4vw, 43px);
  font-weight: 760;
  letter-spacing: -.035em;
  line-height: 1.08;
}

.follo-registration-complete h3 {
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -.015em;
}

.follo-registration-complete h3 span {
  font-size: .72em;
  font-weight: 500;
  color: var(--follo-register-muted);
}

.follo-register-lead {
  max-width: 610px;
  margin: 12px 0 0;
  color: var(--follo-register-muted);
  font-size: 16px;
  line-height: 1.65;
}

.follo-register-form {
  display: grid;
  gap: 19px;
  margin: 0;
}

.follo-register-field {
  display: block;
}

.follo-private-register label,
.follo-registration-complete label {
  display: block;
  margin: 0 0 8px;
  color: #2a2d36;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
}

.follo-register-field small {
  display: block;
  margin: 7px 2px 0;
  color: #8a909a;
  font-size: 12px;
  line-height: 1.4;
}

.follo-private-register input[type="password"],
.follo-private-register input[type="email"],
.follo-registration-complete input[type="text"] {
  display: block;
  width: 100% !important;
  height: 54px !important;
  margin: 0 !important;
  padding: 0 16px !important;
  border: 1px solid #d9dde5 !important;
  border-radius: 12px !important;
  outline: 0;
  background: #fff !important;
  box-shadow: 0 1px 2px rgba(16,24,40,.02) inset !important;
  color: var(--follo-register-ink) !important;
  font: inherit !important;
  font-size: 16px !important;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.follo-private-register input::placeholder,
.follo-registration-complete input::placeholder {
  color: #a2a8b2;
  opacity: 1;
}

.follo-private-register input[type="password"]:hover,
.follo-private-register input[type="email"]:hover,
.follo-registration-complete input[type="text"]:hover {
  border-color: #bfc6d1 !important;
}

.follo-private-register input[type="password"]:focus,
.follo-private-register input[type="email"]:focus,
.follo-registration-complete input[type="text"]:focus {
  border-color: var(--follo-register-blue) !important;
  background: #fff !important;
  box-shadow: 0 0 0 4px rgba(47,125,232,.12) !important;
}

.follo-private-register button,
.follo-registration-complete button {
  min-height: 52px;
  padding: 0 18px;
  border: 0 !important;
  border-radius: 12px !important;
  background: var(--follo-register-blue) !important;
  box-shadow: 0 8px 20px rgba(47,125,232,.20);
  color: #fff !important;
  font: inherit !important;
  font-size: 15px !important;
  font-weight: 750 !important;
  line-height: 1 !important;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}

.follo-private-register button:hover,
.follo-registration-complete button:hover {
  background: var(--follo-register-blue-dark) !important;
  box-shadow: 0 11px 25px rgba(47,125,232,.24);
  transform: translateY(-1px);
}

.follo-private-register button:focus-visible,
.follo-registration-complete button:focus-visible {
  outline: 3px solid rgba(47,125,232,.25);
  outline-offset: 3px;
}

/* -------- Recovery email + 18+ confirmation -------- */
.follo-age-confirm {
  display: grid !important;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  margin: 0 !important;
  padding: 15px 16px;
  border: 1px solid #dfe5ee;
  border-radius: 14px;
  background: #fbfcfe;
  cursor: pointer;
}

.follo-age-confirm input[type="checkbox"] {
  width: 19px !important;
  height: 19px !important;
  margin: 2px 0 0 !important;
  accent-color: var(--follo-register-blue);
  cursor: pointer;
}

.follo-age-confirm span {
  display: block;
}

.follo-age-confirm strong {
  display: block;
  margin: 0 0 3px;
  color: #252933;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.35;
}

.follo-age-confirm small {
  display: block;
  margin: 0;
  color: #7a828e;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
}

.follo-age-confirm:focus-within {
  border-color: var(--follo-register-blue);
  box-shadow: 0 0 0 4px rgba(47,125,232,.10);
}


.follo-register-submit {
  display: flex !important;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 3px;
}

.follo-button-arrow {
  display: inline-block;
  font-size: 21px;
  font-weight: 400;
  line-height: 1;
  transition: transform .15s ease;
}

.follo-register-submit:hover .follo-button-arrow {
  transform: translateX(3px);
}

.follo-register-privacy {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 24px 0 0;
  padding: 15px 16px;
  border: 1px solid #e7e9ee;
  border-radius: 14px;
  background: var(--follo-register-soft);
  color: #5f6671;
  font-size: 13px;
  line-height: 1.55;
}

.follo-register-privacy strong {
  display: block;
  margin-bottom: 1px;
  color: #30343b;
  font-size: 13px;
}

.follo-register-privacy span:not(.follo-privacy-mark) {
  display: block;
}

.follo-privacy-mark {
  display: inline-flex !important;
  flex: 0 0 25px;
  width: 25px;
  height: 25px;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
  border-radius: 50%;
  background: #e7f6ee;
  color: var(--follo-register-green);
  font-size: 13px;
  font-weight: 800;
}

.follo-register-login-link {
  margin: 22px 0 0;
  color: var(--follo-register-muted);
  font-size: 14px;
  text-align: center;
}

.follo-register-login-link a {
  color: var(--follo-register-blue);
  font-weight: 700;
  text-decoration: none;
}

.follo-register-login-link a:hover {
  text-decoration: underline;
}

.follo-register-error,
.follo-register-success {
  margin: 0 0 22px;
  padding: 13px 15px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
}

.follo-register-error {
  border: 1px solid #f2cccc;
  background: #fff5f5;
  color: #9b2c2c;
}

.follo-register-success {
  border: 1px solid #cdebd9;
  background: #f1fbf5;
  color: #17683b;
}


/* -------- Guided registration explanation -------- */
.follo-register-guide {
  display: grid;
  gap: 12px;
  margin: 20px 0 26px;
  padding: 18px;
  border: 1px solid #e5eaf2;
  border-radius: 16px;
  background: #fbfcfe;
}

.follo-guide-step {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.follo-guide-number {
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #edf5ff;
  color: #245fae;
  font-size: 13px;
  font-weight: 800;
}

.follo-guide-step strong {
  display: block;
  margin: 1px 0 2px;
  color: #252933;
  font-size: 14px;
}

.follo-guide-step span:not(.follo-guide-number) {
  display: block;
  color: var(--follo-register-muted);
  font-size: 13px;
  line-height: 1.55;
}

.follo-onboarding-step-label {
  display: inline-flex;
  margin: 0 0 10px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #f3f8ff;
  color: #245fae;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.follo-handle-choice-note {
  margin-top: 8px;
  padding: 11px 13px;
  border-left: 3px solid #d7e8ff;
  background: #f8fbff;
  color: #5f6671;
  font-size: 13px;
}

/* -------- Account-created / onboarding panel -------- */
.follo-registration-complete {
  text-align: left;
}

.follo-registration-complete > p:first-of-type {
  color: var(--follo-register-muted);
}

.follo-id-value {
  display: inline-block;
  margin: 19px 0 7px;
  padding: 9px 14px;
  border: 1px solid #dfe7f3;
  border-radius: 12px;
  background: #f6f9fd;
  color: #182b49;
  font-size: clamp(30px, 6vw, 48px);
  font-weight: 800;
  letter-spacing: .075em;
  line-height: 1.1;
  word-break: break-word;
}

.follo-created-barcode {
  width: 100%;
  margin: 24px 0 18px;
  padding: 18px;
  overflow-x: auto;
  border: 1px solid var(--follo-register-line);
  border-radius: 14px;
  background: #fff;
  text-align: center;
}

.follo-created-barcode svg,
.follo-created-barcode img {
  max-width: 100%;
  height: auto;
}

.follo-created-qr {
  display: block;
  width: 220px;
  max-width: 100%;
  height: auto;
  margin: 18px auto 8px;
  padding: 10px;
  border: 1px solid var(--follo-register-line);
  border-radius: 14px;
  background: #fff;
}

.follo-registration-complete hr {
  margin: 32px 0;
  border: 0;
  border-top: 1px solid var(--follo-register-line);
}

.follo-member-url-note,
.follo-registration-complete p {
  line-height: 1.6;
}

.follo-handle-input {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.follo-handle-input > span {
  color: #474c55;
  font-size: 19px;
  font-weight: 800;
}

.follo-handle-input input[type="text"] {
  flex: 1 1 auto;
}

.follo-handle-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.follo-handle-actions button {
  min-width: 145px;
}

.follo-secondary-button {
  border: 1px solid #daddE5 !important;
  background: #fff !important;
  box-shadow: none !important;
  color: #30343b !important;
}

.follo-secondary-button:hover {
  background: #f6f7f9 !important;
  color: #20232a !important;
}

.follo-member-url-note {
  margin-top: 20px;
  color: var(--follo-register-muted);
  font-size: 13px;
}

.follo-member-url-note code {
  display: block;
  margin-top: 7px;
  padding: 10px 12px;
  border: 1px solid var(--follo-register-line);
  border-radius: 10px;
  background: #f7f8fa;
  color: #30343b;
  white-space: normal;
  word-break: break-all;
}

@media (max-width: 768px) {
  .follo-private-register,
  .follo-registration-complete {
    width: 100%;
    margin: 18px auto 36px;
    padding: 24px 20px;
    border-radius: 18px;
  }

  .follo-private-register h2,
  .follo-registration-complete h2 {
    font-size: 31px;
  }

  .follo-register-lead {
    font-size: 15px;
  }

  .follo-handle-input {
    align-items: stretch;
  }

  .follo-handle-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .follo-handle-actions button {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .follo-private-register,
  .follo-registration-complete {
    padding: 22px 16px;
  }

  .follo-register-badge {
    margin-bottom: 15px;
  }

  .follo-id-value {
    width: 100%;
    font-size: 29px;
    text-align: center;
  }
}

/* =========================================================
   REGISTER PAGE CONTENT RAILS
   Keep the page heading and registration content on the same
   responsive 90% / 1080px Divi-style content rails.
   ========================================================= */
body.follo-register-page #main-content .et_pb_row {
  width: 90% !important;
  max-width: 1080px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* The shortcode card remains intentionally narrower and centered
   inside the page rails for comfortable form reading. */
body.follo-register-page #main-content .follo-private-register,
body.follo-register-page #main-content .follo-registration-complete {
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 767px) {
  body.follo-register-page #main-content .et_pb_row {
    width: calc(100% - 32px) !important;
  }
}

/* =========================================================
   REGISTRATION PAGE RAILS — V2
   Match the visual rails requested in review screenshots.
   Desktop: ~40px gutter, up to 1180px content width.
   Registration card: visibly wider, up to 990px.
   ========================================================= */
@media (min-width: 981px) {
  body.follo-register-page #main-content .et_pb_row {
    width: calc(100% - 80px) !important;
    max-width: 1180px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  body.follo-register-page #main-content .follo-private-register,
  body.follo-register-page #main-content .follo-registration-complete {
    width: min(100%, 990px) !important;
    max-width: 990px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

@media (max-width: 980px) {
  body.follo-register-page #main-content .et_pb_row {
    width: calc(100% - 32px) !important;
    max-width: none !important;
  }

  body.follo-register-page #main-content .follo-private-register,
  body.follo-register-page #main-content .follo-registration-complete {
    width: 100% !important;
    max-width: none !important;
  }
}

/* =========================================================
   REGISTRATION TITLE ALIGNMENT — V3
   Align the Divi page heading ("Sign up to follo") with the
   left edge of the 990px registration card on desktop.
   The registration card itself is unchanged.
   ========================================================= */
@media (min-width: 981px) {
  body.follo-register-page #main-content .entry-title,
  body.follo-register-page #main-content > .container > h1,
  body.follo-register-page #main-content .et_pb_section:first-child > .et_pb_row:first-child {
    width: min(calc(100% - 80px), 990px) !important;
    max-width: 990px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

/* =========================================================
   Account-created ID, copy control and local barcode styling
   ========================================================= */
.follo-id-label {
  margin-top: 22px;
  color: #4b5563;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.follo-id-copy-row {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.follo-id-copy-row .follo-id-value {
  display: flex;
  align-items: center;
  margin: 0;
}

.follo-copy-id-button {
  min-height: 64px !important;
  padding-left: 22px !important;
  padding-right: 22px !important;
  white-space: nowrap;
}

.follo-copy-id-button.is-copied {
  background: var(--follo-register-green) !important;
  box-shadow: 0 8px 20px rgba(25,135,84,.20) !important;
}

.follo-copy-status {
  min-height: 20px;
  margin-top: 6px;
  color: var(--follo-register-green);
  font-size: 13px;
  font-weight: 650;
}

.follo-save-id-notice {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 12px 0 24px;
  padding: 14px 16px;
  border: 1px solid #f0dfb4;
  border-radius: 13px;
  background: #fffaf0;
  color: #66562f;
  font-size: 13px;
  line-height: 1.55;
}

.follo-save-id-notice strong {
  color: #493c20;
  font-size: 14px;
}

.follo-created-code-block {
  margin: 24px 0 18px;
  padding: 20px;
  border: 1px solid var(--follo-register-line);
  border-radius: 16px;
  background: #fff;
  text-align: center;
}

.follo-created-code-label {
  margin-bottom: 14px;
  color: #4b5563;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.follo-created-code-block .follo-created-barcode {
  display: flex;
  justify-content: center;
  width: 100%;
  margin: 0;
  padding: 10px 0;
  overflow-x: auto;
  border: 0;
  border-radius: 0;
}

/* The barcode generator returns spans, not an SVG/image. Keep these
   definitions local to registration so the code renders even when the
   profile/member-card stylesheet is not loaded on /register/. */
.follo-created-barcode .follo-barcode-lines {
  display: inline-flex !important;
  align-items: stretch;
  flex: 0 0 auto;
  height: 82px;
  min-width: max-content;
  overflow: hidden;
  background: #fff;
  line-height: 0;
}

.follo-created-barcode .follo-barcode-black,
.follo-created-barcode .follo-barcode-space {
  display: block !important;
  flex: 0 0 auto !important;
  height: 82px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}

.follo-created-barcode .follo-barcode-black {
  background: #000 !important;
}

.follo-created-barcode .follo-barcode-space {
  background: #fff !important;
}

.follo-created-code-number {
  margin-top: 7px;
  color: #4b5563;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  letter-spacing: .14em;
}

@media (max-width: 620px) {
  .follo-id-copy-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .follo-id-copy-row .follo-id-value {
    justify-content: center;
    width: 100%;
    text-align: center;
  }

  .follo-copy-id-button {
    width: 100%;
    min-height: 50px !important;
  }
}

/* -------- Required policy acceptance -------- */
.follo-policy-confirm {
  display: grid !important;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  margin: 0 !important;
  padding: 15px 16px;
  border: 1px solid #dfe5ee;
  border-radius: 14px;
  background: #fbfcfe;
  cursor: pointer;
}

.follo-policy-confirm input[type="checkbox"] {
  width: 19px !important;
  height: 19px !important;
  margin: 2px 0 0 !important;
  accent-color: var(--follo-register-blue);
  cursor: pointer;
}

.follo-policy-confirm span { display:block; }

.follo-policy-confirm strong {
  display:block;
  margin:0 0 3px;
  color:#252933;
  font-size:14px;
  font-weight:750;
  line-height:1.4;
}

.follo-policy-confirm small {
  display:block;
  margin:0;
  color:#7a828e;
  font-size:12px;
  font-weight:500;
  line-height:1.45;
}

.follo-policy-confirm a {
  color:var(--follo-register-blue);
  font-weight:800;
  text-decoration:underline;
  text-underline-offset:2px;
}

.follo-policy-confirm:focus-within {
  border-color:var(--follo-register-blue);
  box-shadow:0 0 0 4px rgba(47,125,232,.10);
}
