/* BMW Plus — Register form helpers (Mobile Center + National Verify + OTP UX)
   - مرکزچین کامل روی موبایل
   - عددها LTR ولی وسط‌چین
*/

/* Keep form centered */
.registration_wrapper{
  display:flex;
  justify-content:center;
}
.registration_wrapper .login_content{
  width:100%;
  max-width: 720px;
  margin: 0 auto;
}

/* Mobile: center everything */
@media (max-width: 576px){
  .registration_wrapper,
  .registration_wrapper *{
    text-align:center !important;
  }

  #bmw_register_form .input-group{
    justify-content:center;
  }

  #bmw_register_form .input-group-prepend,
  #bmw_register_form .input-group-text{
    justify-content:center;
  }

  #bmw_register_form .small{
    text-align:center !important;
  }
}

/* Inputs: numeric should be LTR but centered */
#bmw_phone,
#bmw_national_code,
#bmw_otp_field{
  direction:ltr;
  text-align:center !important;
}

/* OTP area align nicely */
#otp_confirm_section{
  justify-content:center;
  align-items:center;
  gap:8px;
}

/* Inline message box */
.bmwp-inline-msg{
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.6;
}
.bmwp-inline-msg.bmwp-error{ color: #b91c1c; }
.bmwp-inline-msg.bmwp-ok{ color: #065f46; }

/* National verify UI */
.bmwp-national-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  justify-content:center;
  margin-top: 6px;
}

.bmwp-btn{
  appearance:none;
  border: 1px solid rgba(0,0,0,.15);
  background: #fff;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 13px;
  cursor:pointer;
}
.bmwp-btn:disabled{
  opacity: .6;
  cursor:not-allowed;
}
.bmwp-btn-primary{
  background: #16a34a;
  border-color: #16a34a;
  color: #fff;
}

/* tiny loading state */
.bmwp-loading{
  opacity: .6;
  pointer-events:none;
}

/* =========================
   Global overlay (Hard lock)
   - همیشه قابل مشاهده، حتی اگر تم Loader BMW را پنهان کند
   ========================= */
.bmwp-global-overlay{
  position: fixed;
  inset: 0;
  display: none;
  z-index: 999999;
  background: rgba(0,0,0,.25);
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.bmwp-global-overlay .bmwp-overlay-box{
  background: #fff;
  border-radius: 14px;
  padding: 14px 16px;
  min-width: 240px;
  max-width: 420px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,.18);
}

.bmwp-global-overlay .bmwp-spinner{
  width: 28px;
  height: 28px;
  border: 3px solid rgba(0,0,0,.12);
  border-top-color: rgba(0,0,0,.55);
  border-radius: 50%;
  margin: 0 auto 10px auto;
  animation: bmwpSpin 0.9s linear infinite;
}

.bmwp-global-overlay .bmwp-overlay-msg{
  font-size: 13px;
  line-height: 1.8;
  margin: 0;
}

@keyframes bmwpSpin{
  to{ transform: rotate(360deg); }
}

/* وقتی هاردلاک فعال شد، کلیک‌ها را روی همه چیز (جز overlay) قطع کن */
body.bmwp-hardlocked{
  overflow: hidden;
}
body.bmwp-hardlocked > *:not(.bmwp-global-overlay){
  pointer-events: none !important;
}
body.bmwp-hardlocked .bmwp-global-overlay,
body.bmwp-hardlocked .bmwp-global-overlay *{
  pointer-events: auto !important;
}


/* Phone field locked (readonly - not disabled) */
#bmw_phone.bmwp-readonly{
  opacity: .9;
  background: #f8fafc;
  cursor: not-allowed;
}
