/* CoverMonth — multi-step form styles (public/1/get-loan.php, and the
   homepage wizard overlay in public/1/index.php) */

.form-page{background:var(--surface);}

/* -------- Wizard overlay (homepage modal, matches the original single-file design) -------- */
html.wizard-locked, body.wizard-locked{overflow:hidden;height:100%;}

.wizard-overlay{
  position:fixed;
  inset:0;
  z-index:1000;
  background:rgba(3,32,66,.55);
  display:none;
  align-items:center;
  justify-content:center;
  padding:40px 16px;
  overflow:hidden;
}
.wizard-overlay.open{display:flex;}
.wizard-modal{
  background:var(--white);
  border-radius:20px;
  width:100%;
  max-width:920px;
  margin:auto;
  position:relative;
  box-shadow:0 30px 80px rgba(3,32,66,.4);
  max-height:calc(100vh - 80px);
  display:flex;
  flex-direction:row;
  overflow:hidden;
}
.wizard-close{
  position:absolute;
  top:20px;
  right:20px;
  z-index:2;
  background:none;
  border:none;
  font-size:1.6rem;
  line-height:1;
  color:var(--muted-small);
  padding:6px 10px;
  cursor:pointer;
}
.wizard-close:hover{color:var(--text);}
.wizard-scroll{
  flex:1;
  min-width:0;
  overflow-y:auto;
  padding:32px 36px 36px;
}

/* Side panel — shown on the last few steps (name/DOB/phone/SSN), matches the original wizard-side */
.wizard-side{
  display:none;
  flex-direction:column;
  gap:14px;
  width:280px;
  flex:none;
  background:var(--surface);
  padding:32px 28px;
  overflow-y:auto;
}
.wizard-side.show{display:flex;}
.wizard-side h4{font-size:.85rem;font-weight:700;color:var(--navy);margin:0 0 4px;}
.wizard-side ol{margin:0;padding-left:18px;color:var(--muted-small);font-size:.88rem;}
.wizard-side ol li{margin-bottom:8px;}

/* On the standalone get-loan.php page (not the modal) the side panel isn't a
   fixed-width rail next to the form — it's a full-width card below it. */
.form-wrapper > .wizard-side{
  width:100%;
  border-radius:16px;
  margin-top:20px;
  padding:24px 28px;
}

@media (max-width:600px){
  .wizard-overlay{padding:0;}
  .wizard-modal{max-width:100%;max-height:100vh;height:100vh;border-radius:0;}
  .wizard-scroll{padding:56px 20px 28px;}
  .wizard-close{top:14px;right:14px;}
  .wizard-side{display:none !important;}
}

.header-security{display:flex;align-items:center;gap:6px;color:#C9D3E0;font-size:.82rem;}
.header-security svg{width:16px;height:16px;flex:none;}
@media (max-width:600px){ .header-security span{display:none;} }

.form-main{padding:32px 0 56px;}
.form-wrapper{max-width:640px;margin:0 auto;}

.loan-amount-header{
  background:#F1FAF4;
  border:1px solid #BFE8CC;
  border-radius:12px;
  padding:16px;
  margin-bottom:16px;
  text-align:center;
}
.loan-amount-header p:first-child{color:var(--muted-small);font-size:.85rem;margin-bottom:4px;}
.loan-amount-header p:last-child{color:var(--green-hover);font-size:1.5rem;font-weight:700;font-family:'Lato',sans-serif;}

.progress-container{margin-bottom:28px;}
.progress-top-row{display:flex;align-items:center;gap:16px;}
.progress-bar{flex:1;height:6px;background:var(--border);border-radius:4px;overflow:hidden;}
.progress-fill{height:100%;width:0%;background:var(--green);transition:width .25s ease;}
.progress-close{
  flex:none;
  color:var(--muted-small);
  font-size:1.5rem;
  line-height:1;
  text-decoration:none;
  padding:2px 4px;
}
.progress-close:hover{color:var(--text);}
.progress-text{font-size:.85rem;color:var(--muted-small);margin-top:10px;}

.form-card-main{
  background:var(--white);
  border-radius:20px;
  padding:0;
}

.form-step{display:none;}
.form-step.active{display:block;}

.step-heading{
  font-family:'Lato',sans-serif;
  font-weight:900;
  font-size:1.75rem;
  color:var(--navy);
  margin-bottom:8px;
  text-align:left;
  line-height:1.2;
}
.step-subtitle{color:var(--muted-small);font-size:.95rem;margin-bottom:24px;text-align:left;}

.form-group{margin-bottom:8px;}
/* Direct-child combinator only — a plain field label (e.g. "City") is a direct
   child of .form-group, but a radio-option's <label> lives inside .radio-group,
   one level deeper. Without the ">" this rule's higher specificity silently
   overrode .radio-option's flex layout and stacked the circle above the text. */
.form-group > label{display:block;font-size:.9rem;font-weight:600;margin-bottom:6px;color:var(--text);}
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group select{
  width:100%;padding:14px 16px;border:1px solid var(--border);border-radius:10px;font-size:1.05rem;font-family:inherit;
}
.form-group input:focus, .form-group select:focus{outline:none;border-color:var(--green);}
.form-group input.invalid{border-color:#B00020;}
.form-group input.valid{border-color:var(--green);}

.field-hint{font-size:.8rem;color:var(--muted-small);margin-top:8px;}
.field-error{color:#B00020;font-size:.85rem;margin-top:6px;}
.has-error input, .has-error select{border-color:#B00020;}

.form-row{display:flex;gap:14px;}
.form-row .flex-1{flex:1;}
.form-row .flex-2{flex:2;}
@media (max-width:520px){ .form-row{flex-direction:column;} }

.radio-group{display:flex;flex-direction:column;gap:12px;}

.radio-option{
  border:1px solid var(--border);
  border-radius:12px;
  padding:13px 24px;
  margin:0 6px;
  display:flex;
  flex-direction:row;
  flex-wrap:nowrap;
  align-items:center;
  gap:16px;
  font-size:1.02rem;
  color:var(--text);
  cursor:pointer;
  transition:border-color .15s ease, background-color .15s ease;
}
.radio-option:hover{border-color:#B9C0C8;}
.radio-option:has(input:focus-visible){outline:2px solid var(--green);outline-offset:2px;}
.radio-option:has(input:checked), .radio-option.selected{border-color:var(--green);background:#F1FAF4;}
.radio-option input[type="radio"]{
  accent-color:var(--green);
  width:20px;
  height:20px;
  margin:0;
  flex:0 0 20px;
  outline:none;
  box-shadow:none;
}
.radio-option input[type="radio"]:focus,
.radio-option input[type="radio"]:focus-visible{
  outline:none;
  box-shadow:none;
}
.radio-label{display:flex;align-items:center;gap:8px;flex-wrap:wrap;flex:1;}

.badge-preferred, .badge-warning{font-size:.72rem;font-weight:700;padding:2px 8px;border-radius:9999px;}
.badge-preferred{background:#DCF7E3;color:var(--green-hover);}
.badge-warning{background:#FDEBD2;color:#9C5A00;}

.tcpa-consent-wrap{margin-top:16px;}
.tcpa-consent-box{
  max-height:140px;
  overflow-y:auto;
  border:1px solid var(--border);
  border-radius:10px;
  padding:12px 14px;
  background:var(--surface);
}
.tcpa-consent-text{font-size:.76rem;line-height:1.5;color:var(--muted-small);}
.tcpa-consent-text a{color:var(--blue);}

.ssn-consent-text{max-width:100%;margin-top:20px;text-align:left;}
.ssn-consent-text p{font-size:.78rem;color:var(--muted-small);margin-bottom:8px;}
.ssn-consent-text ul{font-size:.78rem;color:var(--muted-small);padding-left:1.5rem;line-height:1.6;margin:0;}
.ssn-consent-text li{margin-bottom:6px;list-style:disc;}
.ssn-consent-text a{color:var(--blue);}

.form-navigation{display:flex;justify-content:space-between;align-items:center;margin-top:32px;gap:16px;}
.btn-back, .btn-next, .btn-submit{
  border:none;border-radius:10px;font-weight:700;cursor:pointer;font-family:inherit;
}
.btn-back{background:none;color:var(--muted-small);font-size:.95rem;padding:10px 4px;}
.btn-next, .btn-submit{background:var(--green);color:var(--white);font-size:1.05rem;padding:14px 28px;margin-left:auto;}
.btn-next:hover, .btn-submit:hover{background:var(--green-hover);}

.form-security{
  display:flex;align-items:center;justify-content:center;gap:6px;
  margin-top:20px;color:var(--muted-small);font-size:.8rem;
}
.form-security svg{width:16px;height:16px;flex:none;}

.processing-screen, .success-screen{padding:40px 0;text-align:center;}
.spinner-container{position:relative;width:56px;height:56px;margin:0 auto 20px;}
.spinner, .spinner-inner{position:absolute;inset:0;border-radius:50%;border:4px solid var(--border);border-top-color:var(--green);animation:cm-spin 1s linear infinite;}
.spinner-inner{inset:8px;border-top-color:var(--blue);animation-duration:.7s;}
@keyframes cm-spin{to{transform:rotate(360deg);}}
.processing-screen h2, .success-screen h2{font-size:1.3rem;margin-bottom:8px;}
.processing-screen p, .success-screen p{color:var(--muted-small);max-width:44ch;margin:0 auto;}
.processing-security{display:flex;align-items:center;justify-content:center;gap:6px;margin-top:20px;color:var(--muted-small);font-size:.8rem;}
.processing-security svg{width:16px;height:16px;}
.success-icon{color:var(--green);margin:0 auto 16px;width:48px;}
.success-icon svg{width:48px;height:48px;}
.redirect-text{margin-top:12px;font-size:.85rem;}

.trust-indicators{display:flex;justify-content:center;gap:28px;margin-top:24px;flex-wrap:wrap;}
.trust-item{display:flex;align-items:center;gap:6px;color:var(--muted-small);font-size:.82rem;}
.trust-item svg{width:16px;height:16px;color:var(--green);}

.ssl-strip{text-align:center;padding:16px 0;background:var(--white);}
.ssl-strip p{font-size:.85rem;color:var(--muted-small);margin-bottom:6px;}
.ssl-strip a{color:var(--blue);text-decoration:none;}

@media (max-width:520px){
  .form-main{padding:20px 0 40px;}
  .step-heading{font-size:1.4rem;}
  .radio-option{padding:12px 16px;margin:0 2px;gap:12px;font-size:.96rem;}
  .form-group input[type="text"],
  .form-group input[type="email"],
  .form-group input[type="tel"],
  .form-group select{padding:12px 14px;font-size:1rem;}
  .btn-next, .btn-submit{width:100%;margin-left:0;}
  .form-navigation{flex-wrap:wrap;}
  .form-navigation .btn-back{order:2;margin:0 auto;}
  .trust-indicators{gap:16px 20px;}
}
