/* =====================
   GLOBAL
===================== */
body {
  background-color: #F8FAFC;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  margin: 0;
  padding: 0;
}

#leadsFormWrapper {
  max-width: 420px;
  margin: 0 auto;
  padding: 8px;
}


/* =====================
   STEPS
===================== */
.step {
  display: none;
  padding: 8px 2px;
}

.step.active {
  display: block;
  animation: fadeSlide 0.30s ease;
  
}

@keyframes fadeSlide {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.step h2 {
  text-align: center;
  font-size: 20px;
  margin-bottom: 8px;
  color: #002A54;
  line-height: 1.3;
}

.step-subtext {
  text-align: center;
  font-size: 14px;
  color: #6B7280;
  margin-bottom: 8px !important;
  line-height: 1.3;
}

/* =====================
   INPUTS
===================== */
input[type="text"],
input[type="email"], input[type="tel"] {
  width: 100%;
  padding: 12px 12px;
  font-size: 14px;
  border-radius: 16px;
  border: 1.5px solid #CBD5E1;
  outline: none;
}

input[type="text"] {
  margin-bottom: 10px;
}

input[type="email"] {
  margin-bottom: 8px;
}

.consent-text {
    padding: 0px 5px 0px 5px;
}

input:focus {
  border-color: #16A34A;
  box-shadow: 0 0 0 2px rgba(22,163,74,0.2);
}

/* =========================
   Phone Input With +61 Prefix
========================= */

/* =========================
   Phone Input With Divider
========================= */

.phone-input-wrapper {
  position: relative;
  width: 100%;
  margin-bottom: 8px;
}

.phone-prefix {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  padding: 0 14px;
  display: flex;
  align-items: center;
  font-size: 14px;
  font-weight: 500;
  color: #475569;
  background: #f5f5f580;
  border-right: 1.5px solid #CBD5E1;
  border-top-left-radius: 16px;
  border-bottom-left-radius: 16px;
  pointer-events: none;
}

/* Push input after prefix block */
.phone-input-wrapper input {
  padding-left: 85px !important;
}

.phone-input-wrapper.form-field-error .phone-prefix {
  border-right-color: #e53935;
}


/* =====================
   RADIO / CARD STYLE MODERN
===================== */
.option-card.modern-radio {
  display: block;
  cursor: pointer;
  margin-bottom: 14px;
}

/* hide native radio */
.option-card.modern-radio input[type="radio"] {
  display: none;
}

/* Wrapper for card border/background */
.radio-ui-wrapper {
  display: block;
  border: 2px solid #E2E8F0;
  border-radius: 14px;
  transition: all 0.25s ease;
  background: #fff;
  padding: 0;
}

/* Inner flex container */
.radio-ui {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 12px;
}

/* hover effect on card */
.option-card.modern-radio:hover .radio-ui-wrapper {
  border-color: #002A54;
}

/* selected state: highlight border/background */
.option-card.modern-radio input:checked + .radio-ui-wrapper {
  border-color: #16A34A;
  background-color: #ECFDF5;
}

/* selected text & icon color */
.option-card.modern-radio input:checked + .radio-ui-wrapper .radio-content,
.option-card.modern-radio input:checked + .radio-ui-wrapper .radio-content i,
.option-card.modern-radio input:checked + .radio-ui-wrapper .radio-text {
  color: #065F46;
}

/* Radio content text & icon */
.radio-content {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1; /* fill remaining space */
}

.radio-content i {
  font-size: 18px;
  color: #002A54;
  flex-shrink: 0;
}

.radio-text {
  font-size: 14px;
  color: #002A54;
  line-height: 1.3;
  display: flex;
  flex-direction: column;
}

.radio-text small {
  display: block;
  font-size: 10px;
  color: #6B7280;
  margin-top: 2px;
  line-height: 1.3;
}

/* =====================
   FIX RADIO ICON ALIGNMENT
===================== */

/* icon container – KEY FIX */
.radio-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: #F8FAFC;
  border-radius: 10px;
  flex-shrink: 0;
}

/* normalize icon size */
.radio-icon i {
  font-size: 18px !important;
  color: #002A54;
}

/* stacked icon layout */
.icon-stack {
  position: relative;
  width: 20px;
  height: 20px;
}

.icon-stack i:first-child {
  font-size: 18px;
}

.icon-stack i:last-child {
  font-size: 12px;
  position: absolute;
  bottom: -4px;
  right: -4px;
}

/* =====================
   FILE INPUT
===================== */
.upload-box {
  display: block;
  border: 2px dashed #CBD5E1;
  padding: 28px 20px;
  border-radius: 10px;
  text-align: center;
  cursor: pointer;
  user-select: none;
  transition: all 0.25s ease;
}

.upload-trust {
  margin-top: 12px;
  font-size: 11px;
  color: #6B7280;
}



.upload-box:hover {
  border-color: #16A34A;
  background: #F8FAFC;
}

.upload-box i {
  font-size: 28px;
  color: #002A54;
  margin-bottom: 8px;
}

.step-subtext,
.radio-text,
.upload-box p {
  font-size: 14px;
  color: #0F172A;
  margin: 0;
  line-height: 1.3;
}

.upload-box span {
  font-size: 12px;
  color: #6B7280;
}



/* =========================
   FILE LIST CONTAINER
========================= */
.file-list {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* =========================
   FILE ITEM
========================= */
.file-item {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
}

/* File icon (optional) */
.file-item::before {
  content: "\f15b";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  color: #64748B;
}

/* =========================
   FILE NAME
========================= */
.file-item span {
  flex: 1;
  font-size: 13px;
  color: #0F172A;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* =========================
   REMOVE BUTTON
========================= */
.remove-file {
  border: none;
  background: transparent;
  color: #94A3B8;
  font-size: 14px;
  cursor: pointer;
  padding: 5px;
  line-height: 1.5;
  border-radius: 2px;
  transition: all 0.2s ease;
}

.upload-box.has-files {
  border-style: solid;
  border-color: #2c7be5;
  background: #f4f8ff;
}


.remove-file:hover {
  background: #FEE2E2;
  color: #DC2626;
}

.form-progress {
  margin-bottom: 5px;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar .progress {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #22c55e, #16a34a);
  transition: width 0.35s ease;
}

.progress-text {
  margin-top: 8px;
  font-size: 14px;
  color: #6b7280;
  text-align: right;
}


/* =========================
   PROGRESS BAR
========================= */
.upload-progress {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 6px;
  height: 3px;
  background: #E5E7EB;
  border-radius: 4px;
  overflow: hidden;
}

.upload-progress div {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #16A34A, #22C55E);
  transition: width 0.2s ease;
}



/* =====================
   CONSENT TEXT
===================== */

.consent-wrapper {
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: #64748B;
  font-size: 12px;
  margin-top: 12px;
}

.consent-wrapper input {
  margin-top: 3px;
}

.consent-helper {
  font-size: 10px;
  color: #666;
  margin-top: 6px;
}


.consent-checkbox {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #002A54;
}

.consent-checkbox input {
  margin-top: 3px;
  flex-shrink: 0;
}


.option-card input[value="BillUpload"] + .radio-ui-wrapper {
  border: 1px solid #2c7be5;
  background: #f5f9ff;
}

.option-card input[value="BillUpload"]:checked + .radio-ui-wrapper {
  box-shadow: 0 0 0 2px rgba(44, 123, 229, 0.15);
}





/* =====================
   NAV BUTTONS
===================== */
.nav-buttons {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-buttons .next-btn {
  width: 100%;
}

.nav-buttons .cta-helper {
  font-size: 10px;
  color: #6B7280;
  text-align: center;
  margin:0;
}

button,
.next-btn {
  flex: 1;
  background-color: #002A54;
  width: 100%;
  color: #ffffff;
  padding: 10px;
  font-size: 14px;
  border-radius: 14px;
  border: none;
  margin-top:8px;
  cursor: pointer;
  transition: all 0.25s ease;
}

button:hover {
  background-color: #16A34A;
}

.back-btn {
  background: #E2E8F0;
  color: #002A54;
}

.back-btn:hover {
  background: #CBD5E1;
}

.form-message {
  position: sticky;
  top: 0;
  z-index: 50;
  font-size:12px;
  background: #ffffff;
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 12px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.form-message.visible {
  opacity: 1;
  transform: translateY(0);
}

.form-message.success {
  border-left: 4px solid #22C55E;
  color: #065F46;
}

.form-message.error {
  border-left: 4px solid #DC2626;
  color: #7F1D1D;
}

.form-message.loading {
  border-left: 4px solid #2563EB;
  color: #1E3A8A;
}

/* ==========================
   FORM FIELD ERROR UI
========================== */

.form-field-error {
  border: 1px solid #e53935 !important;
  background: #fff6f6;
}

.form-field-error:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(229,57,53,0.2);
}

.field-error-text {
  color: #e53935;
  font-size: 13px;
  margin-top: 4px;
  display: block;
}

/* Shake animation */
@keyframes inputShake {
  0% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  50% { transform: translateX(4px); }
  75% { transform: translateX(-4px); }
  100% { transform: translateX(0); }
}

.shake-error {
  animation: inputShake 0.3s ease;
}






.step h2::after {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  background: #16A34A;
  margin: 8px auto 0;
  border-radius: 4px;
}

.email-trust {
  margin-top: 4px;
  margin-bottom: 6px;
  font-size: 10px;
  line-height: 1.4;
  text-align:center;
}

.email-trust .trust-icon {
  font-size: 10px;
}

.consent-primary {
  font-size: 12px;
  margin: 0;
  line-height: 1.4;
  color: #334155;
}

.consent-secondary {
  font-size: 11px;
  line-height: 1.4;
  color: #64748B;
  margin: 0;
}

.consent-secondary a {
  color: #002A54;
  text-decoration: underline;
}

.post-cta-trust {
  font-size: 10px;
  color: #002A54;
  text-align: center;
}




/* =====================
   MOBILE OPTIMIZATION
===================== */
@media (max-width: 480px) {
  .step h2 {
    font-size: 18px;
  }
  
  .step.active {
    justify-content: flex-start;
  }


  .step-subtext,
  .radio-text,
  .upload-box p {
    font-size: 11px;
    line-height: 1.3;
  }

  button {
    font-size: 13px;
  }

  input[type="text"],
  input[type="email"] {
    font-size: 12px;
    padding: 12px;
  }
  
  .consent-primary {
    font-size: 11px;
  }

  .consent-checkbox {
    font-size: 12px;
  }

  .consent-secondary {
    font-size: 10px;
  }

  .nav-buttons .cta-helper {
    font-size: 10px;
  }
  
  .option-helper {
    padding-left: 0;
  }

  .radio-text {
    font-size: 12px;
  }

  .radio-text small {
    font-size: 10px;
  }

}
