#wa-otp-box {
  border: 1px solid #e0e0e0;
  border-left: 4px solid #25D366;
  border-radius: 6px;
  background: #f8fffb;
  padding: 18px 20px;
  margin-bottom: 25px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

#wa-otp-box.wa-verified {
  border-left-color: #1a8f4c;
  background: #f1fbf4;
}

.wa-otp-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.wa-otp-icon {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  font-size: 22px;
  line-height: 42px;
  text-align: center;
}

.wa-otp-titles h4 {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 600;
}

.wa-otp-intro {
  margin: 0;
  color: #6b7280;
  font-size: 13px;
}

.wa-otp-badge {
  display: none;
  font-size: 12px;
  color: #1a8f4c;
  font-weight: 600;
  margin-left: 6px;
}

#wa-otp-box.wa-verified .wa-otp-badge {
  display: inline;
}

.wa-otp-alert {
  margin-bottom: 12px;
  padding: 8px 12px;
  font-size: 13px;
}

.wa-otp-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.wa-input-group {
  display: flex;
  align-items: stretch;
  flex: 1 1 220px;
  min-width: 180px;
}

.wa-cc {
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  background: #eef2f1;
  border: 1px solid #ccc;
  border-right: 0;
  border-radius: 4px 0 0 4px;
  font-weight: 600;
  color: #444;
}

.wa-cc + .form-control {
  border-radius: 0 4px 4px 0;
}

#wa-otp-box .form-control {
  height: 40px;
}

#wa-otp {
  letter-spacing: 4px;
  font-size: 18px;
  font-weight: 600;
  text-align: center;
}

.wa-resend-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 100%;
}

.wa-expiry {
  color: #b45309;
  font-size: 12px;
}

#wa-resend {
  padding-left: 0;
}

#wa-resend[disabled] {
  color: #9ca3af;
  text-decoration: none;
}

.wa-locked-note {
  margin-top: 8px;
  font-size: 12px;
  color: #b45309;
}

#wa-otp-box.wa-verified .wa-locked-note {
  display: none;
}

/* Form lock / highlight states */
#account-register form .form-control:disabled,
#account-register form input:disabled,
#account-register form select:disabled,
#account-register form textarea:disabled {
  background-color: #f3f4f6;
  cursor: not-allowed;
}

/* Field locked to the verified WhatsApp number */
#account-register form .wa-locked-field {
  background-color: #f1fbf4 !important;
  border-color: #25D366 !important;
  font-weight: 600;
  cursor: not-allowed;
}

#account-register form.wa-form-unlocked .form-control {
  border-color: #25D366;
  box-shadow: 0 0 0 1px rgba(37, 211, 102, 0.25);
  transition: border-color 0.4s ease, box-shadow 0.4s ease, background-color 0.4s ease;
  background-color: #fcfffd;
}

@media (max-width: 480px) {
  .wa-otp-row { flex-direction: column; align-items: stretch; }
  .wa-otp-row .btn { width: 100%; }
  .wa-input-group { flex: 1 1 auto; width: 100%; min-width: 0; }
}

/* Keep the country-code box exactly as tall as the input. Some themes give
   .form-control a bottom margin, which made the flex group (and so the +91
   box) taller than the field itself. */
.wa-input-group .form-control {
  margin: 0 !important;
  float: none;
}

.wa-input-group .wa-cc {
  box-sizing: border-box;
  flex: 0 0 auto;
  align-self: stretch;
}

/* ---- Registration in two steps (account details -> address) ---- */
.wa-step-hide { display: none !important; }
.wa-steps { margin: 0 0 16px; }
.wa-steps-list { list-style: none; margin: 0 0 10px; padding: 0; display: flex; gap: 10px; flex-wrap: wrap; }
.wa-step-pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 20px; background: #eef0f3; color: #6b7280; font-size: 13px; font-weight: 600; }
.wa-step-pill .wa-step-no { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: #cfd4dc; color: #fff; font-size: 12px; }
.wa-step-pill.active { background: #e7f6ec; color: #1a7f3c; }
.wa-step-pill.active .wa-step-no { background: #25a244; }
.wa-step-alert { margin: 0; }
.wa-address-panel { border: 1px solid #cfe9d8; border-left: 4px solid #25a244; background: #f6fbf8; border-radius: 6px; padding: 16px 18px; margin-bottom: 18px; }
.wa-addr-phone { margin: 6px 0 0; color: #1a7f3c; font-weight: 600; font-size: 13px; }
.wa-addr-grid { display: flex; flex-wrap: wrap; gap: 12px 16px; margin-top: 14px; }
.wa-addr-field { flex: 1 1 calc(50% - 16px); min-width: 220px; }
.wa-addr-field.wa-addr-wide { flex-basis: 100%; }
.wa-addr-field label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 4px; }
.wa-addr-field .wa-req { color: #d9534f; }
.wa-addr-field.has-error .form-control { border-color: #d9534f; }
.wa-addr-error { color: #d9534f; font-size: 12px; margin-top: 3px; }
.wa-addr-hint { color: #1a7f3c; font-size: 12px; margin-top: 3px; }
.wa-addr-hint.wa-hint-bad { color: #b36b00; }
.wa-addr-actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 18px; }
.wa-missing { border-color: #d9534f !important; }
@media (max-width: 575px) { .wa-addr-field { flex-basis: 100%; } }

/* "please wait" while the registration is being saved */
.wa-busy {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, .82);
}

.wa-busy-card {
  max-width: 340px;
  margin: 0 16px;
  padding: 26px 28px;
  text-align: center;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 36px rgba(0, 0, 0, .18);
}

.wa-busy-card p { margin: 14px 0 0; color: #333; font-size: 14px; line-height: 1.5; }

.wa-busy-spin {
  display: inline-block;
  width: 38px; height: 38px;
  border: 4px solid #e3e8f1;
  border-top-color: var(--wa-primary, #1450b0);
  border-radius: 50%;
  animation: wa-spin .8s linear infinite;
}

@keyframes wa-spin { to { transform: rotate(360deg); } }

.wa-btn-busy { opacity: .7; cursor: wait; }

/* Back button of the address step: explicit colours, themes may render .btn-default text white */
#wa-addr-back {
  height: 48px;
  padding: 0 22px;
  color: #333 !important;
  font-weight: 600;
  background: #fff;
  border: 1px solid #cfd6e4;
  border-radius: 8px;
  text-shadow: none;
  box-shadow: none;
}

#wa-addr-back:hover,
#wa-addr-back:focus {
  color: var(--wa-primary, #1450b0) !important;
  border-color: var(--wa-primary, #1450b0);
}

/* "Paste code" link under the OTP field (the phone's own Paste menu does not always open) */
.wa-paste-btn {
  display: inline-block;
  margin: -2px 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--wa-primary, #1450b0);
}

.wa-paste-btn .fa { margin-right: 4px; }

/* Red * on every required field of the Register form (some themes do not draw it).
   Same pseudo-element as OpenCart's own rule, so a theme that has it shows one star, not two. */
#account-register form .form-group.required > .control-label::before,
#account-register form .form-group.required > [class*="col-sm-"] > .control-label::before {
  content: "* ";
  font-weight: 700;
  color: #e02b27;
}

.wa-req-note { margin: 0 0 12px; font-size: 12.5px; color: #6b7280; }
.wa-req-note .wa-req { color: #e02b27; font-weight: 700; }

/* Fields that need attention: red outline + message right under the field */
#account-register form .form-group.has-error .form-control { border-color: #d9534f; box-shadow: 0 0 0 3px rgba(217, 83, 79, .15); }
#account-register form .form-group.has-error > .control-label,
#account-register form .form-group.has-error label.control-label { color: #c9302c; }
#account-register form .wa-inline-err { margin-top: 5px; font-size: 12.5px; }

#wa-steps, #wa-address-panel { scroll-margin-top: 60px; }

.wa-agree-err { clear: both; margin-top: 8px; text-align: right; font-size: 13px; font-weight: 600; }
