:root {
  --dark-blue1: #0B335A;
  --dark-blue2: #1f5e9d;
  --hover-blue1: #1761a0;
  --hover-blue2: #0b4a83;
}

/* ---------- WRAPPER ---------- */
.register-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f9fafc;
  padding: 2rem 1rem;
}

/* ---------- CARD ---------- */
.register-card {
  background: #fff;
  padding: 2.5rem 2rem;
  border-radius: 16px;
  box-shadow: 0 5px 18px rgba(11, 51, 90, 0.3);
  text-align: center;
  max-width: 560px;
  width: 100%;
  position: relative;
  overflow: hidden;
}

.register-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #042B56 0%, #0DC3F4 100%);
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  z-index: 2;
}

.register-card h1,
.register-card h2 {
  font-size: 1.8rem;
  margin-bottom: 0.25rem;
  color: #042b56;
  font-weight: 700;
}

/* ---------- INPUTS ---------- */
.register-card input {
  width: 100%;
  padding: 12px 15px;
  margin: 10px 0;
  border: 1.6px solid #aabcd4;
  border-radius: 10px;
  font-size: 15px;
  transition: all 0.3s ease;
  color: #042B56;
}

.register-card input:focus {
  border-color: var(--dark-blue2);
  box-shadow: 0 0 6px rgba(11, 51, 90, 0.15);
  outline: none;
}

.register-label {
  display: block;
  font-weight: 600;
  font-size: 15px;
  color: #042b56;
  text-align: left;
  margin-bottom: -3px;
  margin-top: 3px;
}

/* ---------- BUTTON ---------- */
.register-card button {
  width: 100%;
  padding: 12px;
  margin-top: 8px;
  border: none;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  color: #fff;
  background: linear-gradient(90deg, #0B335A, #1f5e9d);
  cursor: pointer;
  transition: all 0.3s ease;
}

.register-card button:hover:not(:disabled) {
  background: linear-gradient(90deg, #0B4A83 0%, #0A63B0 100%);
  box-shadow: 0 6px 14px rgba(11, 51, 90, 0.25);
  transform: translateY(-2px);
}

.register-card button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* ---------- MESSAGE ---------- */
.message {
  text-align: center;
  color: red;
  margin-bottom: 10px;
  font-size: 14px;
}

/* ---------- EMAIL / PASSWORD VALIDATION STYLES ---------- */
.email-error {
  font-size: 13px;
  color: #d93025;
  text-align: left;
  margin: 0 2px;
  display: none;
  align-items: center;
  gap: 5px;
}

.email-error.visible {
  display: flex;
  margin-bottom: 2px;
}

.email-error.visible::before {
  content: "⚠";
  font-size: 12px;
}

/* Red border */
.register-card input.input-error {
  border-color: #d93025 !important;
  box-shadow: 0 0 0 3px rgba(217, 48, 37, 0.12) !important;
}

/* ---------- SWITCH TEXT ---------- */
.switch-text {
  text-align: center;
  margin-top: 18px;
  font-size: 14px;
  color: #042b56;
}

.switch-text a {
  color: #042b56;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.switch-text a:hover {
  opacity: 0.8;
}

.password-field {
  position: relative;
  width: 100%;
}

.password-field input {
  width: 100%;
  padding-right: 40px;
}

.password-field .toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: #7b8a9a;
  font-size: 1rem;
  transition: color 0.3s ease;
}

.password-field .toggle-password:hover {
  color: #118AF2;
}

/* Remove Chrome autofill blue background */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
select:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
  box-shadow: 0 0 0 1000px #ffffff inset !important;
  -webkit-text-fill-color: #042B56 !important;
  transition: background-color 5000s ease-in-out 0s;
}

.step-indicator {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 500;
  color: #042b56;
  background: rgba(13, 195, 245, 0.06);
  padding: 4px 12px;
  border-radius: 20px;
  white-space: nowrap;
  border: 1px solid rgba(4, 43, 86, 0.5);
  margin-top: 0.25rem;
}

.register-card .modal-header {
  display: block;
  text-align: center;
  padding: 0;
  border: none;
  margin-bottom: 0.75rem;
}

@media (max-width: 780px) {
  .step-indicator {
    font-size: 12px;
    padding: 3px 10px;
  }
}

/* OAuth Buttons */
.oauth-btn {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 8px;
  color: white;
  font-size: 1rem;
  cursor: pointer;
}

.google-btn,
.linkedin-btn {
  background: #ffffff;
  color: #042B56;
  border: 1px solid #042B56;
  border-radius: 8px;
  padding: 12px 20px;
  font-size: 16px;
  font-family: "Satoshi", sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 3px 8px rgba(11, 51, 90, 0.08);
  margin-bottom: -8px;
}

.google-btn:hover,
.linkedin-btn:hover {
  transform: translateY(-1px);
}

.auth-toggle {
  position: absolute;
  top: 16px;
  right: 20px;
  font-size: 0.85rem;
  font-family: 'Satoshi', sans-serif;
  z-index: 5;
}

#auth-toggle-link,
.auth-toggle a {
  color: #042B56;
  text-decoration: none;
  font-weight: 500;
  display: inline-block;
  transition: transform 0.2s ease, text-decoration 0.2s ease;
}

#auth-toggle-link:hover,
.auth-toggle a:hover {
  transform: translateY(-1px);
  text-decoration: underline;
}

.email-input-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
  margin: 10px 0;
}

.email-input-row input {
  flex: 1;
  min-width: 0;
  margin: 0 !important;
}

.verify-email-btn {
  width: 100px !important;
  height: 46px !important;
  padding: 0 !important;
  background: linear-gradient(90deg, #0B335A, #1f5e9d) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 999px !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  white-space: nowrap;
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 0 !important;
  transition: none !important;
  transform: none !important;
  box-shadow: none !important;
}

.verify-email-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.otp-row {
  margin-bottom: 10px;
}

.otp-row input {
  margin: 0 !important;
}

/* intl-tel-input wrapper — country flag dropdown + phone number field */
.iti {
  width: 100%;
}

.iti input#phone_number {
  width: 100%;
}

.otp-row button {
  width: auto !important;
  margin-top: 0 !important;
  flex-shrink: 0;
}

/* ── PASSWORD STRENGTH BAR ─────────────────── */
.pw-strength-wrap {
  margin-top: 8px;
  display: none;
}

.pw-bars {
  display: flex;
  gap: 5px;
  margin-bottom: 4px;
}

.pw-seg {
  flex: 1;
  height: 4px;
  border-radius: 3px;
  background: #e2e8f0;
  transition: background 0.3s ease;
}

.pw-strength-label {
  font-size: 12px;
  font-weight: 600;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {
  .register-card {
    padding: 2.5rem 1.5rem 1.25rem;
    max-width: 90%;
  }
  .register-card h1,
.register-card h2 {
    font-size: 1.6rem;
    margin-bottom: 0.25rem;
  }
  .register-card input {
    font-size: 14px;
    padding: 10px 13px;
  }
  .register-card button {
    font-size: 14px;
    padding: 11px;
  }
}

@media (max-width: 480px) {
  .register-container {
    padding: 1.5rem 1rem;
  }
  .register-card {
    padding: 2.5rem 1rem 1rem;
    border-radius: 12px;
  }
  .register-card h1,
.register-card h2 {
    font-size: 1.4rem;
  }
  .register-card input {
    font-size: 13px;
    padding: 9px 12px;
  }
  .register-card button {
    font-size: 13.5px;
    padding: 10px;
  }
}

@media (max-width: 360px) {
  .register-container {
    padding: 1rem 0.5rem;
  }
  .register-card {
    padding: 2.5rem 0.75rem 1rem;
    max-width: 96%;
    border-radius: 10px;
  }
  .register-card h1,
.register-card h2 {
    font-size: 1.25rem;
  }
  .register-card input {
    font-size: 12px;
    padding: 8px 10px;
  }
  .register-card button {
    font-size: 12.5px;
    padding: 9px;
  }
  .step-indicator {
    font-size: 10px;
    padding: 3px 8px;
    white-space: normal;
    text-align: center;
    width: 80%;
  }
  .auth-toggle {
    font-size: 0.75rem;
    right: 10px;
  }
  .google-btn, .linkedin-btn {
    font-size: 13px;
    padding: 10px 8px;
    gap: 6px;
  }
  .verify-email-btn {
    width: 76px !important;
    font-size: 12px !important;
    height: 40px !important;
  }
  .switch-text {
    font-size: 12px;
  }
}

/* ======================================================
   MODAL BACKDROP
====================================================== */
.buyer-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: none;
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.45);
  z-index: 10002;
}

.privacy-note {
  margin-top: 6px;
  margin-bottom: 8px;
  font-size: 12px;
  line-height: 1.5;
  color: #042b56;
}

/* ======================================================
   WRAPPER
====================================================== */
.buyer-modal-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.buyer-modal-shell {
  width: 100%;
  max-width: 860px;
}

/* ======================================================
   MODAL CARD
====================================================== */
.buyer-modal-card {
  position: relative;
  width: 100%;
  max-width: 860px;
  background:
    linear-gradient(90deg, #042B56 0%, #118AF2 45%, #0DC3F4 100%) top / 100% 5px no-repeat,
    #ffffff;
  padding: 2rem 2.5rem;
  border-radius: 16px;
  overflow: visible;
  box-shadow:
    0 20px 50px rgba(4, 43, 86, 0.35),
    0 8px 18px rgba(0, 0, 0, 0.15);
  animation: buyerModalIn 0.35s ease;
  margin: auto;
}

/* ======================================================
   HEADINGS
====================================================== */
.buyer-modal-card h2 {
  color: #042B56;
  margin-bottom: 4px;
  text-align: center;
}

.form-subhead {
  font-size: 14px;
  color: #5f6f86;
  text-align: center;
  margin-bottom: 18px;
}

.modal-divider {
  border: none;
  border-top: 1px solid #042b56;
  margin: 8px 0 24px 0;
}

/* ======================================================
   MODAL ANIMATION
====================================================== */
@keyframes buyerModalIn {
  from {
    opacity: 0;
    transform: translateY(28px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ======================================================
   FORM LAYOUT
====================================================== */
.form-row {
  display: flex;
  gap: 18px;
  margin-bottom: 16px;
}

.form-group {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ======================================================
   LABELS
====================================================== */
.form-label {
  font-weight: 600;
  font-size: 14px;
  color: #042b56;
  margin-bottom: 5px;
}

/* ======================================================
   INPUTS
====================================================== */
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="tel"] {
  width: 100%;
  height: 46px;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1.6px solid #CFDBE8;
  font-size: 15px;
  color: #042B56;
  background: #ffffff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus {
  outline: none;
  border-color: #042B56;
  box-shadow: 0 0 0 2px rgba(4, 43, 86, 0.08);
}

/* ======================================================
   DROPDOWN (UB SELECT)
====================================================== */
.ub-select {
  position: relative;
  height: 46px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  border-radius: 12px;
  border: 1.6px solid #CFDBE8;
  background: #ffffff;
  font-size: 15px;
  color: #042B56;
  cursor: pointer;
}

.ub-select.open {
  border-color: #042B56;
  box-shadow: 0 0 0 2px rgba(4, 43, 86, 0.08);
}

.ub-select i {
  font-size: 14px;
  color: #0396FF;
}

.ub-select-trigger {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  padding-right: 32px;
}

.ub-select.open-upward .ub-options {
  top: auto;
  bottom: calc(100% + 6px);
}

.ub-select-trigger i {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: #0396FF;
  pointer-events: none;
  transition: transform 0.2s ease;
}

.ub-select.open .ub-select-trigger i {
  transform: translateY(-50%) rotate(180deg);
}

/* Options */
.ub-options {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 100%;
  display: none;
  max-height: 240px;
  overflow-y: auto;
  background: #ffffff;
  border: 1.6px solid #CFDBE8;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  z-index: 999;
}

.ub-select.open .ub-options {
  display: block;
}

.ub-option {
  padding: 10px 14px;
  font-size: 15px;
  cursor: pointer;
}

.ub-option:hover {
  background: rgba(13, 195, 245, 0.06);
}

.ub-option.selected {
  background: rgba(13, 195, 245, 0.06);
  border-left: 3px solid #0DC3F4;
  border-top-left-radius: 6px;
  border-bottom-left-radius: 6px;
  font-weight: 600;
}

/* ======================================================
   OTHER INPUT
====================================================== */
.other-input {
  margin-top: 6px;
  height: 46px;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1.6px solid #CFDBE8;
}

/* ======================================================
   INDUSTRY SEARCH DROPDOWN
====================================================== */
.ob-ind-trigger {
  height: 46px;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1.6px solid #CFDBE8;
  background: #fff;
  font-size: 14px;
  color: #042B56;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ob-ind-trigger.open {
  border-color: #042B56;
  box-shadow: 0 0 0 2px rgba(4, 43, 86, 0.08);
}

.ob-ind-trigger i {
  font-size: 13px;
  color: #0396FF;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.ob-ind-trigger.open i { transform: rotate(180deg); }

.ob-ind-trigger span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ob-ind-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1.6px solid #CFDBE8;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.10);
  z-index: 1000;
  overflow: hidden;
}

.ob-ind-search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-bottom: 1px solid #e8eef5;
}

.ob-ind-search-icon { color: #94a3b8; font-size: 13px; flex-shrink: 0; }

.ob-ind-search-input {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  height: auto !important;
  padding: 0 !important;
  font-size: 14px;
  color: #042b56;
  background: transparent;
  width: 100%;
}

.ob-ind-list {
  max-height: 200px;
  overflow-y: auto;
  padding: 4px 0;
}

.ob-ind-item {
  padding: 9px 14px;
  font-size: 14px;
  color: #042b56;
  cursor: pointer;
  transition: background 0.15s;
}

.ob-ind-item:hover { background: rgba(17, 138, 242, 0.07); }
.ob-ind-item.ob-ind-checked { font-weight: 600; color: #118af2; }
.ob-ind-empty { padding: 12px 14px; font-size: 13px; color: #94a3b8; margin: 0; }

/* ======================================================
   BUTTON
====================================================== */
.submit-btn {
  height: 50px;
  width: 100%;
  border-radius: 12px;
  border: none;
  background: linear-gradient(90deg, #0B4A83, #0A63B0);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 4px;
}

.submit-btn:disabled {
  background: #b7c3d1;
  cursor: not-allowed;
}

.ob-req {
  color: #ef4444;
}

/* ======================================================
   RESPONSIVE
====================================================== */
@media (min-width: 1280px) {
  .buyer-modal-shell,
  .buyer-modal-card { max-width: 1020px; }
}

@media (min-width: 1440px) {
  .buyer-modal-shell,
  .buyer-modal-card { max-width: 1160px; }
  .buyer-modal-card { padding: 1.8rem 2.6rem; }
}

@media (max-width: 768px) {
  .buyer-modal-wrapper {
    padding: 16px 16px 32px;
  }
  .buyer-modal-card {
    padding: 2rem 1.5rem;
  }
  .form-row {
    flex-direction: column;
  }
}

#agree-all-wrap {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 24px;
  cursor: pointer;
}
#agree_all {
  flex-shrink: 0;
  width: 15px;
  height: 15px;
  accent-color: #118af2;
  cursor: pointer;
}
#agree_all.checkbox-error {
  box-shadow: inset 0 0 0 1.5px #dc2626;
}
.buyer-terms-link {
  color: #042b56;
  font-weight: 600;
  text-decoration: none;
}
#marketing-consent-wrap {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 4px;
  cursor: pointer;
}
#marketing_consent {
  flex-shrink: 0;
  width: 15px;
  height: 15px;
  accent-color: #118af2;
  cursor: pointer;
}
.marketing-consent-text {
  font-size: 13px;
  color: #64748b;
  line-height: 1.6;
  text-align: left;
}
.marketing-consent-text strong {
  font-weight: 600;
}
