/* Power Underwriter — shared demo-request modal (lead capture + enrichment wizard).
   Pair with /assets/demo-modal.js. Requires colors_and_type.css for design tokens. */

.enrich { position: fixed; inset: 0; z-index: 120; background: rgba(3,54,61,0.82); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: none; align-items: center; justify-content: center; padding: 5vw; opacity: 0; transition: opacity .28s; }
.enrich.show { display: flex; opacity: 1; }
.enrich-card { width: min(540px, 100%); background: #fff; border-radius: var(--radius-2xl); box-shadow: var(--shadow-modal); position: relative; overflow: hidden; display: flex; flex-direction: column; max-height: 94vh; transform: translateY(16px) scale(.97); transition: transform .34s cubic-bezier(.2,.85,.25,1); }
.enrich.show .enrich-card { transform: none; }

/* self-contained buttons so the modal renders correctly on pages without global .btn styles */
.enrich .btn { font-family: var(--font-action); font-weight: 600; font-size: 15px; border: none; cursor: pointer; border-radius: var(--radius-sm);
  padding: 14px 28px; transition: transform .15s, box-shadow .25s, background .2s; display: inline-flex; align-items: center; gap: 9px; line-height: 1; }
.enrich .btn-primary { background: var(--puw-coral-600); color: #fff; box-shadow: 0 8px 22px rgba(255,54,33,0.24); }
.enrich .btn-primary:hover { background: #E62A17; transform: translateY(-2px); box-shadow: 0 14px 30px rgba(255,54,33,0.32); }
.enrich .btn-lg { padding: 17px 34px; font-size: 16px; }

.enr-head { display: flex; align-items: flex-start; gap: 13px; padding: 24px 24px 0; }
.enr-av { width: 38px; height: 38px; border-radius: 50%; background: var(--puw-coral-500); display: grid; place-items: center; flex: 0 0 auto; }
.enr-av svg { width: 20px; height: 20px; }
.enr-htx { flex: 1; min-width: 0; }
.enr-title { font-family: var(--font-display); font-weight: 600; font-size: 18px; color: var(--puw-teal-900); line-height: 1.12; }
.enr-sub { font-family: var(--font-meta); font-size: 12.5px; color: var(--puw-slate-400); margin-top: 3px; line-height: 1.4; }
.enr-close { margin-left: auto; width: 34px; height: 34px; border-radius: var(--radius-sm); border: none; background: var(--puw-surface-3); color: var(--puw-slate-400); font-size: 21px; cursor: pointer; display: grid; place-items: center; transition: background .2s, color .2s; flex: 0 0 auto; line-height: 1; }
.enr-close:hover { background: var(--puw-coral-50); color: var(--puw-coral-600); }

.enr-saved { margin: 16px 24px 0; display: flex; align-items: center; gap: 9px; padding: 11px 14px; border-radius: var(--radius-md); background: var(--puw-success-bg); font-family: var(--font-meta); font-size: 12.5px; color: #0a7a52; }
.enr-saved .tk { width: 18px; height: 18px; border-radius: 50%; background: var(--puw-success); flex: 0 0 auto; display: grid; place-items: center; }
.enr-saved .tk::after { content: ""; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg) translateY(-1px); }

.enr-prog { display: flex; gap: 6px; padding: 20px 24px 0; }
.enr-prog i { flex: 1; height: 4px; border-radius: 3px; background: var(--puw-slate-100); transition: background .3s; }
.enr-prog i.fill { background: var(--puw-coral-500); }

.enr-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 16px 24px 0; }
.enr-meta .lbl { font-family: var(--font-display); font-weight: 600; font-size: 15px; color: var(--puw-teal-900); white-space: nowrap; flex: 0 0 auto; }
.enr-meta .cnt { font-family: var(--font-meta); font-size: 12px; color: var(--puw-slate-400); white-space: nowrap; flex: 0 0 auto; }

.enr-body { padding: 14px 24px 4px; overflow-y: auto; }
.enr-step { display: none; }
.enr-step.active { display: block; animation: enrIn .34s cubic-bezier(.2,.8,.2,1); }
@keyframes enrIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.enr-q { font-size: 14px; color: var(--puw-teal-600); margin: 6px 0 16px; line-height: 1.5; }

/* role rows */
.enr-roles { display: flex; flex-direction: column; gap: 8px; }
.enr-role { display: flex; align-items: center; gap: 13px; padding: 12px 14px; border: 1.5px solid var(--puw-border-light); border-radius: var(--radius-lg); background: #fff; cursor: pointer; text-align: left; font-family: var(--font-body); transition: border-color .18s, background .18s, box-shadow .18s; }
.enr-role:hover { border-color: var(--puw-coral-100); background: var(--puw-coral-50); }
.enr-role.sel { border-color: var(--puw-coral-500); background: var(--puw-coral-50); box-shadow: 0 4px 14px rgba(254,106,87,0.14); }
.enr-role .ric { width: 38px; height: 38px; border-radius: var(--radius-md); background: var(--puw-surface-3); display: grid; place-items: center; flex: 0 0 auto; color: var(--puw-teal-600); transition: background .18s, color .18s; }
.enr-role .ric svg { width: 21px; height: 21px; }
.enr-role.sel .ric { background: var(--puw-coral-500); color: #fff; }
.enr-role .rtx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.enr-role .rnm { display: block; font-weight: 600; font-size: 14.5px; color: var(--puw-teal-900); }
.enr-role .rds { display: block; font-family: var(--font-meta); font-size: 11.5px; color: var(--puw-slate-400); }
.enr-role .rck { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--puw-slate-300); flex: 0 0 auto; display: grid; place-items: center; transition: border-color .18s, background .18s; }
.enr-role.sel .rck { border-color: var(--puw-coral-500); background: var(--puw-coral-500); }
.enr-role.sel .rck::after { content: ""; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg) translateY(-1px); }

/* company size cards */
.enr-sizes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.enr-size { border: 1.5px solid var(--puw-border-light); border-radius: var(--radius-lg); background: #fff; padding: 15px 16px; cursor: pointer; text-align: left; font-family: var(--font-body); transition: border-color .18s, background .18s, box-shadow .18s; }
.enr-size:hover { border-color: var(--puw-coral-100); background: var(--puw-coral-50); }
.enr-size.sel { border-color: var(--puw-coral-500); background: var(--puw-coral-50); box-shadow: 0 4px 14px rgba(254,106,87,0.14); }
.enr-size .sv { display: block; font-family: var(--font-display); font-weight: 600; font-size: 26px; color: var(--puw-teal-900); letter-spacing: -0.02em; line-height: 1; }
.enr-size .sl { display: block; font-family: var(--font-meta); font-size: 11.5px; color: var(--puw-slate-400); margin-top: 6px; }

/* loan origination system cards */
.enr-systems { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.enr-sys { display: flex; align-items: center; min-height: 62px; border: 1.5px solid var(--puw-border-light); border-radius: var(--radius-lg); background: #fff; padding: 14px 16px; cursor: pointer; text-align: left; font-family: var(--font-body); transition: border-color .18s, background .18s, box-shadow .18s; }
.enr-sys:hover { border-color: var(--puw-coral-100); background: var(--puw-coral-50); }
.enr-sys.sel { border-color: var(--puw-coral-500); background: var(--puw-coral-50); box-shadow: 0 4px 14px rgba(254,106,87,0.14); }
.enr-sys .syn { font-family: var(--font-display); font-weight: 600; font-size: 16px; color: var(--puw-teal-900); letter-spacing: -0.01em; line-height: 1.22; }

/* text fields */
.enr-field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--puw-teal-900); margin-bottom: 8px; font-family: var(--font-body); }
.enr-input { width: 100%; padding: 14px 16px; border-radius: var(--radius-lg); border: 1.5px solid var(--puw-border-light); background: var(--puw-surface-2); font-family: var(--font-body); font-size: 15px; color: var(--puw-teal-900); outline: none; transition: border-color .18s, box-shadow .18s, background .18s; }
.enr-input::placeholder { color: var(--puw-slate-400); }
.enr-input:focus { border-color: var(--puw-teal-mid); background: #fff; box-shadow: 0 0 0 3px var(--puw-teal-mid-bg); }
.enr-input.invalid { border-color: var(--puw-coral-500); background: var(--puw-coral-50); box-shadow: 0 0 0 3px rgba(254,106,87,0.18); }
.enr-hint { font-family: var(--font-meta); font-size: 11.5px; color: var(--puw-slate-400); margin-top: 10px; line-height: 1.5; }
.enr-contact .enr-field + .enr-field { margin-top: 14px; }
.enr-err { font-family: var(--font-meta); font-size: 12px; color: var(--puw-coral-600); margin-top: 8px; min-height: 14px; }

/* footer */
.enr-foot { display: flex; align-items: center; gap: 6px; padding: 18px 24px 24px; }
.enr-back { font-family: var(--font-body); font-weight: 500; font-size: 14px; color: var(--puw-slate-400); background: none; border: none; cursor: pointer; padding: 8px 4px; transition: color .18s; }
.enr-back:hover { color: var(--puw-teal-900); }
.enr-foot .spacer { flex: 1; }
.enr-taphint { font-family: var(--font-meta); font-size: 12px; color: var(--puw-slate-400); }
.enr-skip { font-family: var(--font-body); font-weight: 500; font-size: 14px; color: var(--puw-teal-mid); background: none; border: none; cursor: pointer; padding: 9px 13px; border-radius: var(--radius-sm); transition: background .18s; }
.enr-skip:hover { background: var(--puw-teal-mid-bg); }

/* success */
.enr-done { text-align: center; padding: 10px 4px 28px; }
.enr-bigck { display: block; width: 64px; height: 64px; margin: 6px auto 0; }
.enr-bigck svg { width: 64px; height: 64px; }
.enr-bigck circle { fill: var(--puw-success-bg); stroke: var(--puw-success); stroke-width: 2; }
.enr-bigck .ck { fill: none; stroke: var(--puw-success); stroke-width: 3.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 0; }
.enr-done.active .enr-bigck .ck { animation: ckdraw .55s .14s cubic-bezier(.6,.1,.3,1) both; }
@keyframes ckdraw { from { stroke-dashoffset: 40; } to { stroke-dashoffset: 0; } }
.enr-done h3 { font-family: var(--font-display); font-weight: 600; font-size: 22px; color: var(--puw-teal-900); margin: 16px 0 0; letter-spacing: -0.01em; }
.enr-done .dp { font-size: 14px; color: var(--puw-teal-600); margin: 9px auto 0; line-height: 1.55; max-width: 360px; }
.enr-summary { margin: 20px 0 0; border: 1px solid var(--puw-border-light); border-radius: var(--radius-lg); overflow: hidden; text-align: left; }
.enr-summary .row { display: flex; justify-content: space-between; gap: 14px; padding: 11px 15px; font-size: 13px; }
.enr-summary .row + .row { border-top: 1px solid var(--puw-border-light); }
.enr-summary .k { font-family: var(--font-meta); color: var(--puw-slate-400); flex: 0 0 auto; }
.enr-summary .v { font-weight: 600; color: var(--puw-teal-900); text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.enr-donebtn { margin-top: 20px; }

/* confirm-leave overlay */
.enr-confirm { position: absolute; inset: 0; background: rgba(255,255,255,0.97); backdrop-filter: blur(2px); display: none; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 34px; z-index: 5; }
.enr-confirm.show { display: flex; animation: enrIn .2s; }
.enr-confirm h4 { font-family: var(--font-display); font-weight: 600; font-size: 19px; color: var(--puw-teal-900); margin: 0; }
.enr-confirm p { font-size: 13.5px; color: var(--puw-teal-600); margin: 11px 0 0; max-width: 320px; line-height: 1.55; }
.enr-confirm .cbtns { display: flex; gap: 10px; margin-top: 22px; }
.enr-cf-leave { font-family: var(--font-body); font-weight: 600; font-size: 14px; background: var(--puw-surface-3); color: var(--puw-teal-600); border: none; border-radius: var(--radius-sm); padding: 13px 22px; cursor: pointer; transition: background .18s; }
.enr-cf-leave:hover { background: var(--puw-border-light); }

@media (max-width: 560px) {
  .enr-head, .enr-saved, .enr-prog, .enr-meta, .enr-body, .enr-foot { padding-left: 18px; padding-right: 18px; }
  .enr-saved, .enr-prog { margin-left: 18px; margin-right: 18px; }
  .enr-systems { gap: 8px; }
  .enr-sizes { gap: 8px; }
  .enr-size { padding: 13px 13px; }
  .enr-size .sv { font-size: 23px; }
}
