:root {
  --biloxx-bg-dark:   #161310;
  --biloxx-bg-card:   #FFFFFF;
  --biloxx-bg-field:  #F7F5F1;
  --biloxx-gold:      #E8A33D;
  --biloxx-gold-dark: #C9862A;
  --biloxx-text:      #1A1712;
  --biloxx-text-muted:#7A7469;
  --biloxx-border:    #E5E0D6;
  --biloxx-danger:    #D9483C;
  --biloxx-success:   #2F8F4E;
}

/* ===== overlay ===== */
.blx-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 8, 6, 0.78);
  backdrop-filter: blur(4px);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.blx-modal-overlay.active { display: flex; }

/* ===== card ===== */
.blx-modal-box {
  background: var(--biloxx-bg-card);
  width: 100%;
  max-width: 400px;
  border-radius: 18px;
  padding: 30px 30px 26px;
  position: relative;
  box-shadow: 0 24px 70px rgba(0,0,0,0.28);
  font-family: inherit;
  border: 1px solid var(--biloxx-border);
  animation: blx-pop 0.22s ease;
}
@keyframes blx-pop {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.blx-modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(0,0,0,0.045);
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: var(--biloxx-text-muted);
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.blx-modal-close-btn:hover { color: var(--biloxx-gold); background: rgba(232,163,61,0.1); }

/* ===== step progress bar ===== */
.blx-steps {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
}
.blx-step-bar {
  height: 3px;
  flex: 1;
  border-radius: 3px;
  background: var(--biloxx-border);
  overflow: hidden;
}
.blx-step-bar span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--biloxx-gold), var(--biloxx-gold-dark));
  transition: width 0.35s ease;
}
.blx-step-bar.done span { width: 100%; }

/* ===== icon badge ===== */
.blx-modal-header { margin-bottom: 4px; }
.blx-icon-badge {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(232,163,61,0.16), rgba(201,134,42,0.10));
  border: 1px solid rgba(232,163,61,0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.blx-icon-badge svg { width: 20px; height: 20px; stroke: var(--biloxx-gold); }

.blx-modal-box h3 {
  margin: 0 0 6px;
  font-size: 20px;
  color: var(--biloxx-text);
  font-weight: 700;
  letter-spacing: -0.2px;
}
.blx-modal-subtext {
  margin: 0 0 20px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--biloxx-text-muted);
}

/* ===== back button (verify step) ===== */
.blx-back-btn {
  background: none;
  border: none;
  color: var(--biloxx-text-muted);
  font-size: 12.5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 0 14px;
}
.blx-back-btn:hover { color: var(--biloxx-gold); }
.blx-back-btn svg { width: 13px; height: 13px; }

/* ===== form fields ===== */
.blx-form-field { margin-bottom: 15px; }
.blx-form-field label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.2px;
  margin-bottom: 7px;
  color: var(--biloxx-text-muted);
  text-transform: uppercase;
}

.blx-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  border: 1px solid var(--biloxx-border);
  border-radius: 10px;
  background: var(--biloxx-bg-field);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.blx-input-wrap:focus-within {
  border-color: var(--biloxx-gold);
  box-shadow: 0 0 0 3px rgba(232, 163, 61, 0.14);
}
.blx-input-wrap svg {
  width: 17px;
  height: 17px;
  margin-left: 13px;
  stroke: var(--biloxx-text-muted);
  flex-shrink: 0;
}
.blx-input-wrap input {
  width: 100%;
  padding: 12px 13px;
  border: none;
  background: transparent;
  font-size: 14.5px;
  color: var(--biloxx-text);
  outline: none;
  box-sizing: border-box;
}
.blx-input-wrap input::placeholder { color: #6b6357; }

/* Force dark theme even if the site's global CSS sets input backgrounds */
.blx-modal-box input,
.blx-modal-box input[type="text"],
.blx-modal-box input[type="email"],
.blx-modal-box input[type="tel"] {
  background-color: var(--biloxx-bg-field) !important;
  color: var(--biloxx-text) !important;
  -webkit-text-fill-color: var(--biloxx-text) !important;
}
.blx-input-wrap input,
.blx-input-wrap input[type="text"],
.blx-input-wrap input[type="email"],
.blx-input-wrap input[type="tel"] {
  background-color: transparent !important;
}

/* Chrome/Edge autofill turns inputs white with dark text — force it back */
.blx-modal-box input:-webkit-autofill,
.blx-modal-box input:-webkit-autofill:hover,
.blx-modal-box input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--biloxx-text) !important;
  -webkit-box-shadow: 0 0 0 1000px var(--biloxx-bg-field) inset !important;
  box-shadow: 0 0 0 1000px var(--biloxx-bg-field) inset !important;
  caret-color: var(--biloxx-text);
  transition: background-color 5000s ease-in-out 0s;
}

.blx-phone-prefix {
  padding: 0 11px 0 13px;
  margin-right: 2px;
  border-right: 1px solid var(--biloxx-border);
  color: var(--biloxx-text);
  font-size: 14.5px;
  font-weight: 600;
  white-space: nowrap;
}

/* Plain (non-wrapped) inputs, used for OTP field which has no icon */
.blx-form-field > input {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid var(--biloxx-border);
  border-radius: 10px;
  font-size: 14px;
  box-sizing: border-box;
  background: var(--biloxx-bg-field);
  color: var(--biloxx-text);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.blx-form-field > input::placeholder { color: #6b6357; }
.blx-form-field > input:focus {
  border-color: var(--biloxx-gold);
  box-shadow: 0 0 0 3px rgba(232, 163, 61, 0.14);
}
.blx-form-field > input {
  background-color: var(--biloxx-bg-field) !important;
  color: var(--biloxx-text) !important;
  -webkit-text-fill-color: var(--biloxx-text) !important;
}
.blx-otp-input {
  letter-spacing: 8px;
  font-size: 18px !important;
  font-weight: 700;
  text-align: center;
}

/* ===== 4-box OTP display (real input is transparent, on top) ===== */
.blx-otp-display {
  position: relative;
  display: flex;
  gap: 10px;
}
.blx-otp-box {
  flex: 1;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--biloxx-border);
  border-radius: 10px;
  background: var(--biloxx-bg-field);
  color: var(--biloxx-text);
  font-size: 22px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.blx-otp-display.focused .blx-otp-box {
  border-color: var(--biloxx-gold);
  box-shadow: 0 0 0 3px rgba(232, 163, 61, 0.14);
}
.blx-otp-real-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  outline: none;
  font-size: 22px;
  letter-spacing: 0;
  text-align: center;
  padding: 0;
}
.blx-modal-box input.blx-otp-real-input,
.blx-modal-box input.blx-otp-real-input:-webkit-autofill {
  background: transparent !important;
  background-color: transparent !important;
  color: transparent !important;
  -webkit-text-fill-color: transparent !important;
  caret-color: transparent !important;
  box-shadow: none !important;
}

/* ===== submit button ===== */
.blx-submit-btn {
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--biloxx-gold), var(--biloxx-gold-dark));
  color: #1a140b;
  font-size: 15px;
  cursor: pointer;
  font-weight: 700;
  margin-top: 4px;
  transition: opacity 0.15s ease, transform 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.blx-submit-btn:hover:not(:disabled) { opacity: 0.92; transform: translateY(-1px); }
.blx-submit-btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

.blx-spinner {
  width: 15px; height: 15px;
  border-radius: 50%;
  border: 2px solid rgba(26,20,11,0.35);
  border-top-color: #1a140b;
  animation: blx-spin 0.6s linear infinite;
  display: none;
}
.blx-submit-btn.loading .blx-spinner { display: inline-block; }
.blx-submit-btn.loading .blx-btn-label { opacity: 0.85; }
@keyframes blx-spin { to { transform: rotate(360deg); } }

/* ===== status message ===== */
.blx-status-msg {
  font-size: 13px;
  margin-top: 12px;
  min-height: 16px;
}
.blx-status-msg.error { color: var(--biloxx-danger); }
.blx-status-msg.success { color: var(--biloxx-success); }

/* ===== steps ===== */
.blx-form-step { display: none; }
.blx-form-step.active { display: block; animation: blx-fade 0.25s ease; }
@keyframes blx-fade {
  from { opacity: 0; transform: translateX(6px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ===== resend ===== */
.blx-resend-wrap {
  text-align: center;
  margin-top: 16px;
  font-size: 13px;
  color: var(--biloxx-text-muted);
}
.blx-resend-wrap button {
  background: none;
  border: none;
  color: var(--biloxx-gold);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}
.blx-resend-wrap button:hover:not(:disabled) { color: var(--biloxx-gold-dark); text-decoration: underline; }
.blx-resend-wrap button:disabled { color: var(--biloxx-text-muted); cursor: default; }

/* ===== trust row ===== */
.blx-trust-row {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--biloxx-border);
  color: var(--biloxx-text-muted);
  font-size: 11.5px;
}
.blx-trust-row svg { width: 12px; height: 12px; stroke: var(--biloxx-text-muted); }