/* enix-register.css - owned by the register page redesign (clientregister.tpl).
   Split layout: left brand panel (headline, benefits, step list, login link) + right column of section cards.
   Colours: tokens from enix-tokens.css only. */

/* ---------- page frame: drop the WHMCS sidebar, the brand panel replaces it ---------- */
.enix-page-clientregister #main-body > .container > .row > .col-lg-4.col-xl-3 { display: none; }
.enix-page-clientregister #main-body > .container > .row > .primary-content { flex: 0 0 100%; max-width: 100%; }

.rg-shell {
  display: grid;
  grid-template-columns: minmax(0, 380px) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
  margin: 8px 0 48px;
}
.rg-main { min-width: 0; }
.rg-main > .alert { border-radius: var(--radius-md); margin-bottom: 20px; }

/* ---------- brand panel ---------- */
.rg-brand {
  position: sticky;
  top: 96px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background-color: var(--card);
  overflow: hidden;
  isolation: isolate;
}
/* subtle dot grid, fading out towards the bottom */
.rg-brand::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(var(--border-strong) 1px, transparent 1.2px);
  background-size: 18px 18px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, .35) 45%, transparent 80%);
          mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, .35) 45%, transparent 80%);
  opacity: .7;
}
.rg-brand-inner { padding: 32px 30px 28px; }

.rg-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: rgba(59, 130, 246, .12);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}
html[data-theme="light"] .rg-eyebrow { color: #1d4ed8; }
.rg-eyebrow svg { width: 14px; height: 14px; color: var(--primary); }
html[data-theme="light"] .rg-eyebrow svg { color: #1d4ed8; }

.rg-title {
  margin: 18px 0 10px;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 30px;
  line-height: 1.12;
  letter-spacing: -.01em;
  color: var(--text);
}
.rg-lead { margin: 0 0 24px; color: var(--text-muted); font-size: 14.5px; line-height: 1.6; }

.rg-benefits { list-style: none; margin: 0 0 26px; padding: 0; display: grid; gap: 14px; }
.rg-benefits li { display: flex; gap: 12px; align-items: flex-start; }
.rg-benefit-ico {
  flex: 0 0 34px;
  width: 34px; height: 34px;
  border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary-soft);
  color: var(--primary);
  border: 1px solid var(--border);
}
.rg-benefit-ico svg { width: 17px; height: 17px; }
.rg-benefits strong { display: block; color: var(--text); font-size: 14px; font-weight: 700; line-height: 1.35; }
.rg-benefits li span:not(.rg-benefit-ico) { display: block; color: var(--text-muted); font-size: 13px; line-height: 1.45; margin-top: 2px; }

/* vertical step list */
.rg-steps {
  position: relative;
  display: grid;
  gap: 4px;
  padding: 16px 0 16px;
  margin-bottom: 18px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.rg-step {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 4px;
  color: var(--text-muted) !important;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none !important;
  border-radius: var(--radius-sm);
  transition: color .2s ease;
}
.rg-step:hover { color: var(--text) !important; }
/* connector line between the dots */
.rg-step:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 17px;
  top: 34px;
  height: 12px;
  width: 1px;
  background: var(--border-strong);
}
.rg-step-dot {
  flex: 0 0 26px;
  width: 26px; height: 26px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border-strong);
  background: var(--bg-subtle);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.rg-step-dot svg { display: none; width: 14px; height: 14px; }
.rg-step.is-done { color: var(--text) !important; }
.rg-step.is-done .rg-step-dot { background: var(--primary); border-color: var(--primary); color: #fff; }
.rg-step.is-done .rg-step-dot svg { display: block; }
.rg-step.is-done .rg-step-n { display: none; }

.rg-have {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  color: var(--text-muted);
  font-size: 14px;
}
.rg-have-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  color: var(--text) !important;
  font-weight: 700;
  text-decoration: none !important;
  transition: border-color .2s ease, background-color .2s ease;
}
.rg-have-link:hover { border-color: var(--primary); background: var(--primary-soft); }
.rg-have-link svg { width: 15px; height: 15px; transition: transform .2s ease; }
.rg-have-link:hover svg { transform: translateX(2px); }

/* ---------- section cards ---------- */
.rg-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  scroll-margin-top: 110px;
  transition: border-color .2s ease;
}
.rg-card:focus-within { border-color: var(--border-strong); }
.rg-card-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 22px 26px 0;
}
.rg-card-ico {
  flex: 0 0 40px;
  width: 40px; height: 40px;
  border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary-soft);
  color: var(--primary);
  border: 1px solid var(--border);
}
.rg-card-ico svg { width: 19px; height: 19px; }
.rg-card-step {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--text-dim);
  margin-bottom: 1px;
}
#registration .rg-card-title {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 19px;
  line-height: 1.25;
  color: var(--text);
}
.rg-card-sub { margin: 3px 0 0; font-size: 13.5px; color: var(--text-muted); }
.rg-card-sub small { font-size: 12.5px; color: var(--text-dim); }
.rg-card-body { padding: 20px 26px 24px; }

/* two-column field grid */
.rg-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.rg-grid > .clearfix { display: none; }
.rg-span-2 { grid-column: 1 / -1; }
.rg-field { min-width: 0; }
.rg-field .form-group { margin-bottom: 0; }

#registration .rg-label {
  display: block;
  margin: 0 0 7px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-muted);
}
.rg-opt {
  margin-left: 4px;
  font-weight: 500;
  font-size: 11.5px;
  color: var(--text-dim);
  text-transform: lowercase;
}

/* inputs: same look for stock fields, custom fields, selects, phone */
#registration .rg-card .field,
#registration .rg-card .form-control,
#registration .rg-card .custom-select {
  width: 100%;
  height: 46px;
  border-radius: 10px;
  background-color: var(--input-bg);
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-size: 14.5px;
  box-shadow: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
#registration .rg-card textarea.form-control { height: auto; min-height: 96px; }
#registration .rg-card .field:hover,
#registration .rg-card .form-control:hover { border-color: var(--text-dim); }
#registration .rg-card .field:focus,
#registration .rg-card .form-control:focus,
#registration .rg-card .custom-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
  outline: 0;
}
#registration .rg-card .field::placeholder,
#registration .rg-card .form-control::placeholder { color: var(--text-dim); opacity: 1; }

/* icon inside the field (Lucide svg replaces the <i>) */
#registration .rg-card .prepend-icon { position: relative; }
#registration .rg-card .prepend-icon .field-icon {
  position: absolute;
  left: 0; top: 0;
  z-index: 3;
  width: 42px;
  height: 46px;
  margin: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-dim);
  pointer-events: none;
}
#registration .rg-card .prepend-icon .field-icon svg { width: 17px; height: 17px; color: var(--text-dim); transition: color .15s ease; }
#registration .rg-card .prepend-icon:focus-within .field-icon svg { color: var(--primary); }
#registration .rg-card .prepend-icon .field,
#registration .rg-card .prepend-icon .form-control { padding-left: 42px; }
/* state turned into a dropdown by StatesDropdown.js: the icon is hidden, so no indent */
#registration .rg-card .prepend-icon #stateselect { padding-left: 14px; }

/* select arrow */
#registration .rg-card select.field,
#registration .rg-card select.form-control {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
}
#registration .rg-card select option { background-color: var(--card); color: var(--text); }

/* phone (intl-tel-input, old 'intl-tel-input' and new 'iti' markup) */
.rg-field-phone .intl-tel-input,
.rg-field-phone .iti { display: block; width: 100%; }
.rg-field-phone .prepend-icon > .field-icon { display: none !important; }
#registration .rg-field-phone .intl-tel-input .flag-container,
#registration .rg-field-phone .iti__flag-container { z-index: 4; }
#registration .rg-field-phone .intl-tel-input .selected-flag,
#registration .rg-field-phone .iti__selected-flag {
  height: 44px;
  margin: 1px 0 0 1px;
  border-radius: 9px 0 0 9px;
  background-color: var(--bg-subtle);
  border-right: 1px solid var(--border);
}
#registration .rg-field-phone .intl-tel-input .selected-dial-code { color: var(--text); font-size: 14px; font-weight: 600; }
.rg-field-phone .intl-tel-input .country-list {
  background-color: var(--card);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  box-shadow: var(--shadow);
  color: var(--text);
  max-width: min(360px, 80vw);
  white-space: normal;
}
.rg-field-phone .intl-tel-input .country-list .country.highlight { background-color: var(--primary-soft); }
.rg-field-phone .intl-tel-input .country-list .dial-code { color: var(--text-dim); }
.rg-field-phone .intl-tel-input .country-list .divider { border-bottom-color: var(--border); }

/* custom fields (CNP/CUI ...): label above, icon inside text-like inputs */
.rg-cf .form-group { margin-bottom: 0; }
.rg-cf-control { position: relative; }
.rg-cf-ico {
  position: absolute;
  left: 0; top: 0;
  width: 42px; height: 46px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-dim);
  pointer-events: none;
  z-index: 3;
}
.rg-cf-ico svg { width: 17px; height: 17px; transition: color .15s ease; }
.rg-cf-control:focus-within .rg-cf-ico { color: var(--primary); }
#registration .rg-cf-control > input.form-control,
#registration .rg-cf-control > select.form-control { padding-left: 42px; }
/* no icon next to checkboxes / textareas / radios */
.rg-cf-control:has(> textarea) .rg-cf-ico,
.rg-cf-control:has(> input[type="checkbox"]) .rg-cf-ico,
.rg-cf-control:has(> input[type="radio"]) .rg-cf-ico,
.rg-cf-control:has(> label) .rg-cf-ico { display: none; }
.rg-cf .field-help-text { display: block; margin-top: 6px; font-size: 12.5px; color: var(--text-dim); }
.rg-cf input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--primary); vertical-align: middle; }

/* ---------- password ---------- */
.rg-pw .field { padding-right: 46px; }
.rg-pw-eye {
  position: absolute;
  right: 4px; top: 4px;
  z-index: 3;
  width: 38px; height: 38px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-dim);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: color .15s ease, background-color .15s ease;
}
.rg-pw-eye:hover { color: var(--text); background: var(--row-hover); }
.rg-pw-eye.is-on { color: var(--primary); }
.rg-pw-eye svg { width: 17px; height: 17px; }

.rg-pw-tools {
  display: flex;
  align-items: center;
  gap: 16px 20px;
  padding: 14px 16px;
  border: 1px dashed var(--border-strong);
  border-radius: 12px;
  background: var(--bg-subtle);
}
.rg-pw-tools .password-strength-meter { flex: 1 1 auto; min-width: 0; }
#registration .rg-pw-tools .progress {
  height: 6px;
  margin: 0 0 8px;
  border-radius: var(--radius-pill);
  background-color: var(--border);
  overflow: hidden;
}
#registration .rg-pw-tools .progress-bar { border-radius: var(--radius-pill); background-image: none; transition: width .25s ease, background-color .25s ease; }
#registration .rg-pw-tools .progress-bar.bg-danger { background-color: var(--danger) !important; }
#registration .rg-pw-tools .progress-bar.bg-warning { background-color: var(--warning) !important; }
#registration .rg-pw-tools .progress-bar.bg-success { background-color: var(--success) !important; }
#registration .rg-pw-tools #passwordStrengthTextLabel { margin: 0; text-align: left; font-size: 12.5px; color: var(--text-muted) !important; }
.rg-gen { flex: 0 0 auto; margin: 0; }
#registration .rg-gen .generate-password {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: var(--card);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: none;
  transition: border-color .15s ease, background-color .15s ease;
}
#registration .rg-gen .generate-password:hover { border-color: var(--primary); background: var(--primary-soft); }
#registration .rg-gen .generate-password svg { width: 16px; height: 16px; color: var(--primary); }
#passwdFeedback { border-radius: 10px; }
.rg-secq { margin-top: 18px; }

/* ---------- finish: mailing list switch, captcha, terms, submit ---------- */
.rg-optin {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-subtle);
  margin-bottom: 18px;
}
.rg-optin-text strong { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 14.5px; font-weight: 700; }
.rg-optin-text strong svg { width: 16px; height: 16px; color: var(--primary); }
.rg-optin-text p { margin: 4px 0 0; color: var(--text-muted); font-size: 13px; line-height: 1.5; }

.rg-switch { position: relative; flex: 0 0 auto; display: inline-block; width: 48px; height: 28px; margin: 0; cursor: pointer; }
.rg-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 2; }
.rg-switch-track {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-pill);
  background: var(--border-strong);
  transition: background-color .2s ease;
}
.rg-switch-track::after {
  content: "";
  position: absolute;
  top: 3px; left: 3px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
  transition: transform .2s ease;
}
.rg-switch input:checked + .rg-switch-track { background: var(--primary); }
.rg-switch input:checked + .rg-switch-track::after { transform: translateX(20px); }
.rg-switch input:focus-visible + .rg-switch-track { box-shadow: 0 0 0 3px var(--primary-soft); }

/* captcha (default image captcha; reCAPTCHA just centres itself) */
.rg-captcha:empty { display: none; }
.rg-captcha > .row { margin: 0; justify-content: flex-start !important; text-align: left !important; }
.rg-captcha .col-md-8 { flex: 0 0 100%; max-width: 100%; padding: 0; margin: 0 0 18px !important; }
#registration .rg-captcha #default-captcha-domainchecker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin: 0;
  padding: 16px 18px !important;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-subtle);
  text-align: left !important;
}
#registration .rg-captcha #default-captcha-domainchecker p { flex: 0 0 100%; margin: 0; color: var(--text-muted); font-size: 13px; line-height: 1.5; }
#registration .rg-captcha #default-captcha-domainchecker > [class*="col-"] { flex: 0 0 auto; max-width: none; width: auto; padding: 0; }
#registration .rg-captcha #default-captcha-domainchecker > .col-6:not(.captchaimage) { flex: 0 1 200px; min-width: 0; }
#registration .rg-captcha .captchaimage img { display: block; height: 46px; width: auto; border-radius: 10px; border: 1px solid var(--border-strong); }
#registration .rg-captcha #inputCaptcha {
  float: none !important;
  height: 46px;
  border-radius: 10px;
  background-color: var(--input-bg);
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 16px;
  letter-spacing: .2em;
  text-transform: uppercase;
}
#registration .rg-captcha #inputCaptcha:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.rg-captcha .recaptcha-container { margin: 0 0 18px !important; }

/* terms */
.rg-tos { margin-bottom: 18px; }
#registration .rg-tos .form-check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-subtle);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
#registration .rg-tos .form-check-input {
  position: static;
  flex: 0 0 20px;
  width: 20px; height: 20px;
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
  border: 1.5px solid var(--border-strong);
  border-radius: 6px;
  background: var(--input-bg) center / 14px no-repeat;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease;
}
#registration .rg-tos .form-check-input:checked {
  background-color: var(--primary);
  border-color: var(--primary);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}
#registration .rg-tos .form-check-input:focus-visible { outline: 0; box-shadow: 0 0 0 3px var(--primary-soft); }
.rg-tos a { color: var(--primary); font-weight: 700; }

/* submit */
.rg-submit { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
#registration .rg-submit .btn-primary {
  min-width: 220px;
  height: 50px;
  padding: 0 32px;
  border-radius: var(--radius-pill);
  background: var(--primary);
  border: 1px solid var(--primary);
  color: #fff;
  font-size: 15.5px;
  font-weight: 700;
  box-shadow: none;
  transition: background-color .15s ease, transform .15s ease;
}
#registration .rg-submit .btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
#registration .rg-submit .btn-primary:active { transform: translateY(1px); }
.rg-secure { display: inline-flex; align-items: center; gap: 7px; margin: 0; color: var(--text-dim); font-size: 12.5px; }
.rg-secure svg { width: 14px; height: 14px; }

/* linked accounts (social sign-up), if enabled */
#containerNewUserSignup .providerLinkingFeedback:empty { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 1199.98px) {
  .rg-shell { grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: 24px; }
  .rg-brand-inner { padding: 26px 22px 22px; }
  .rg-title { font-size: 26px; }
}
@media (max-width: 991.98px) {
  .rg-shell { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .rg-brand { position: relative; top: 0; }
  .rg-brand-inner { padding: 24px 22px 20px; }
  .rg-benefits { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 18px; margin-bottom: 18px; }
  .rg-steps { display: none; }
  .rg-title { font-size: 25px; margin-top: 14px; }
  .rg-lead { margin-bottom: 18px; }
}
@media (max-width: 767.98px) {
  .rg-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .rg-card-head { padding: 18px 18px 0; }
  .rg-card-body { padding: 16px 18px 20px; }
  .rg-benefits { grid-template-columns: minmax(0, 1fr); }
  .rg-benefits li span:not(.rg-benefit-ico) { display: none; }
  .rg-benefits strong { line-height: 34px; }
  .rg-pw-tools { flex-direction: column; align-items: stretch; }
  #registration .rg-gen .generate-password { width: 100%; justify-content: center; }
  .rg-optin { align-items: flex-start; }
  #registration .rg-captcha #default-captcha-domainchecker > .col-6:not(.captchaimage) { flex: 1 1 120px; }
  .rg-submit { flex-direction: column; align-items: stretch; text-align: center; }
  #registration .rg-submit .btn-primary { width: 100%; min-width: 0; }
  .rg-secure { justify-content: center; }
}
