/* /css/lg-estimate-analyze.css
   Check My Loan Estimate: the upload form (Views/Partials/EstimateAnalyze/EstimateUpload.cshtml) in the buyer
   dashboard's "Check My Loan Estimate" tab and on the results page, and the parts of the results page that
   Check My Quote doesn't have (the costs line by line, the checks). The rest of the results page is styled by
   /css/lg-quote-check.css, which the page loads first. Same colors as the buyer dashboard. Phones: under 768px. */

.lgea-up { --ea-green:#2f9e44; --ea-green-d:#166534; --ea-green-l:#ebf8ee; --ea-ink:#14181f; --ea-muted:#5b6472; --ea-line:#e3e7ec;
    --ea-bg:#f5f7f9; --ea-blue:#1a56db; --ea-amber-l:#fff4db; --ea-violet:#4c3fd1; --ea-violet-l:#efedff;
    margin:0; font-family:Poppins, sans-serif; color:var(--ea-ink); text-align:left; }
.lgea-up *, .lgea-up *::before, .lgea-up *::after { box-sizing:border-box; }
.lgea-up [hidden] { display:none !important; }
.lgea-up .ea-lede { margin:0 0 12px; font-size:15px; line-height:1.5; color:#343b46; }

/* The three pages */
.lgea-up .ea-drops { display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:10px; margin:0 0 12px; }
.lgea-up .ea-drop { position:relative; min-width:0; height:132px; border:2px dashed #c5ccd4; border-radius:14px; background:var(--ea-bg); overflow:hidden; transition:border-color .15s, background .15s; }
.lgea-up .ea-drop.ea-opt { border-style:dotted; }
.lgea-up .ea-drop:hover, .lgea-up .ea-drop.ea-over { border-color:var(--ea-green); background:var(--ea-green-l); }
.lgea-up .ea-file { position:absolute; width:1px; height:1px; opacity:0; overflow:hidden; pointer-events:none; }
.lgea-up .ea-file:focus-visible + .ea-drop-in { outline:3px solid var(--ea-blue); outline-offset:-3px; border-radius:12px; }
.lgea-up .ea-drop-in { position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px; margin:0; padding:8px; text-align:center; cursor:pointer; }
.lgea-up .ea-drop-ico { color:var(--ea-green); margin-bottom:2px; }
.lgea-up .ea-drop-t { font-size:15px; font-weight:600; line-height:1.2; color:var(--ea-ink); }
.lgea-up .ea-drop-in small { font-size:12px; line-height:1.3; color:var(--ea-muted); }
.lgea-up .ea-thumb { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; object-position:top center; background:#fff; pointer-events:none; }
.lgea-up .ea-drop.ea-has { border-style:solid; border-color:var(--ea-green); }
.lgea-up .ea-drop.ea-has .ea-drop-in { opacity:0; }
.lgea-up .ea-drop.ea-loading::after { content:"Preparing…"; position:absolute; inset:0; display:flex; align-items:center; justify-content:center; background:rgba(255,255,255,.85); font-size:13px; font-weight:600; color:var(--ea-muted); }
.lgea-up .ea-x { position:absolute; top:6px; right:6px; z-index:2; width:28px; height:28px; padding:0; border:0; border-radius:50%; background:rgba(20,24,31,.75); color:#fff; font:600 18px/28px Poppins, sans-serif; cursor:pointer; }
.lgea-up .ea-x:hover { background:var(--ea-ink); }

/* Credit score and the button */
.lgea-up .ea-row { display:flex; align-items:flex-end; gap:12px; flex-wrap:wrap; }
.lgea-up .ea-score { display:flex; flex-direction:column; gap:4px; margin:0; font-size:13px; font-weight:600; color:var(--ea-ink); text-transform:none; letter-spacing:normal; }
.lgea-up .ea-score input { width:130px; height:44px; margin:0; padding:0 12px; border:2px solid var(--ea-line); border-radius:12px; background:#fff; font:500 16px Poppins, sans-serif; color:var(--ea-ink); box-shadow:none; }
.lgea-up .ea-score input:focus { outline:none; border-color:var(--ea-green); }
.lgea-up .ea-go, .lgea .ea-go { display:inline-flex; align-items:center; justify-content:center; gap:8px; height:44px; margin:0; padding:0 20px; border:0; border-radius:12px;
    background:var(--ea-green, #2f9e44); color:#fff; font:600 16px Poppins, sans-serif; text-transform:none; letter-spacing:normal; cursor:pointer; transition:background .15s; }
.lgea-up .ea-go { flex:1 1 auto; }
.lgea-up .ea-go:hover, .lgea .ea-go:hover { background:var(--ea-green-d, #166534); }
.lgea-up .ea-go:focus-visible, .lgea .ea-go:focus-visible { outline:3px solid var(--ea-blue, #1a56db); outline-offset:2px; }
.lgea-up .ea-go:disabled { cursor:wait; opacity:.75; }
.lgea-up.ea-busy .ea-ai { animation:ea-pulse 1s ease-in-out infinite; }
@keyframes ea-pulse { 50% { opacity:.3; } }
@media (prefers-reduced-motion: reduce) { .lgea-up.ea-busy .ea-ai { animation:none; } }
.lgea-up .ea-msg, .lgea .ea-msg { margin:10px 0 0; padding:8px 12px; border-radius:12px; font-size:14px; line-height:1.45; font-weight:500; }
.lgea-up .ea-msg-need, .lgea .ea-msg-need { background:#fff4db; color:#7c4a03; }
.lgea-up .ea-msg-wait { background:var(--ea-bg); color:var(--ea-muted); }
.lgea-up .ea-privacy { display:flex; gap:6px; align-items:flex-start; margin:10px 0 0; font-size:12px; line-height:1.45; color:var(--ea-muted); }
.lgea-up .ea-privacy svg { flex:none; margin-top:2px; }

/* In the buyer dashboard's chart box: smaller, and the panel scrolls if it must. */
.lgea-up.lgea-compact .ea-lede { margin-bottom:8px; font-size:12.5px; line-height:1.45; }
.lgea-up.lgea-compact .ea-drops { gap:8px; margin-bottom:8px; }
.lgea-up.lgea-compact .ea-drop { height:92px; border-radius:12px; }
.lgea-up.lgea-compact .ea-drop-ico { width:18px; height:18px; margin:0; }
.lgea-up.lgea-compact .ea-drop-t { font-size:13.5px; }
.lgea-up.lgea-compact .ea-drop-in small { font-size:11px; }
.lgea-up.lgea-compact .ea-row { gap:8px; flex-wrap:nowrap; }
.lgea-up.lgea-compact .ea-score { font-size:12px; }
.lgea-up.lgea-compact .ea-score input { width:96px; height:38px; font-size:15px; border-radius:10px; border-width:1.5px; }
.lgea-up.lgea-compact .ea-go { height:38px; padding:0 14px; font-size:14px; border-radius:10px; }
.lgea-up.lgea-compact .ea-msg { margin-top:6px; padding:6px 10px; font-size:12.5px; }
.lgea-up.lgea-compact .ea-privacy { margin-top:6px; font-size:11px; }
.lgbd .bd-cpanel.bd-ea { overflow-y:auto; scrollbar-width:thin; }
.lgbd .bd-ctabs .bd-ai-ico { flex:none; width:15px; height:15px; margin:0 5px -2px 0; color:var(--bd-green, #2f9e44); }
@media (min-width: 768px) {
    /* Two lines beside the other tabs, so the charts keep their width. */
    .lgbd .bd-ctabs button[data-bd-ctab="estimate"] { white-space:normal; max-width:150px; line-height:1.3; }
}

/* ---------- the results page (inside .lgqc) ---------- */

.lgea .ea-fail { padding:16px 18px; margin:0 0 20px; border-radius:16px; background:#fff4db; color:#7c4a03; font-weight:500; }
.lgea .ea-reading .ea-scan { display:flex; gap:10px; margin:16px 0 4px; }
.lgea .ea-scan img { position:relative; width:84px; height:108px; object-fit:cover; object-position:top; border-radius:8px; border:1px solid var(--qc-line); box-shadow:0 2px 8px rgba(20,24,31,.08); animation:ea-scan 1.6s ease-in-out infinite alternate; }
.lgea .ea-scan img:nth-child(2) { animation-delay:.4s; } .lgea .ea-scan img:nth-child(3) { animation-delay:.8s; }
@keyframes ea-scan { from { opacity:.55; } to { opacity:1; } }
@media (prefers-reduced-motion: reduce) { .lgea .ea-scan img { animation:none; } }

/* Saving and sharing */
.lgea .ea-save { margin:16px 0 0; padding:16px 18px; border-radius:16px; background:var(--qc-green-l); border:1px solid #cfe9d6; }
.lgea .ea-save-l { display:flex; align-items:center; gap:7px; margin:0 0 8px; font-size:15px; font-weight:700; color:var(--qc-green-d); text-transform:none; letter-spacing:normal; }
.lgea .ea-save-row, .lgea .ea-link { display:flex; gap:8px; max-width:620px; }
.lgea .ea-save-row input, .lgea .ea-link input { flex:1 1 auto; min-width:0; height:42px; margin:0; padding:0 12px; border:2px solid var(--qc-line); border-radius:11px; background:#fff; font:500 15px Poppins, sans-serif; color:var(--qc-ink); box-shadow:none; }
.lgea .ea-save-row input:focus, .lgea .ea-link input:focus { outline:none; border-color:var(--qc-green); }
.lgea .ea-link input { font-size:13.5px; color:#343b46; }
.lgea .ea-go.ea-go-sm { flex:none; height:42px; padding:0 18px; font-size:15px; border-radius:11px; }
.lgea .ea-own-acts .ea-go.ea-go-sm { height:36px; margin-right:8px; font-size:14px; }
.lgea .ea-save-note { margin:8px 0 0; font-size:13px; line-height:1.45; color:#36513f; }
.lgea .ea-save .ea-msg a { color:inherit; font-weight:700; }
.lgea .ea-savedhead { margin:0 0 16px; padding:0 0 14px; border-bottom:1px solid var(--qc-line); }
.lgea .ea-save .ea-savedhead { margin:0; padding:0; border:0; }
.lgea .ea-saved-k { margin:0 0 2px; font-size:12px; font-weight:700; letter-spacing:.05em; text-transform:uppercase; color:var(--qc-green-d); }
.lgea .ea-saved-n { margin:0 0 4px; font-size:22px; line-height:1.3; font-weight:600; color:var(--qc-ink); text-align:left; overflow-wrap:anywhere; }
.lgea .ea-saved-d { margin:0 0 8px; font-size:14px; color:var(--qc-muted); }
.lgea .ea-own { margin-top:10px; }
.lgea .ea-own-k { display:flex; align-items:center; gap:7px; margin:0 0 8px; font-size:14px; font-weight:600; color:var(--qc-ink); }
.lgea .ea-dot-on { flex:none; display:inline-block; width:9px; height:9px; border-radius:50%; background:var(--qc-green); }
.lgea .ea-own-acts { display:flex; flex-wrap:wrap; align-items:center; gap:4px; margin:10px 0 0; font-size:14px; color:var(--qc-muted); }
.lgea .ea-own-acts .qc-link { margin:0; font-size:14px; }

/* The few questions we ask */
.lgea .ea-ask-h { margin:0 0 6px; font-size:24px; font-weight:600; color:var(--qc-ink); text-align:left; }
.lgea .ea-ask-p { margin:0 0 16px; max-width:720px; font-size:16px; line-height:1.55; color:#343b46; }
.lgea .ea-fs { display:flex; flex-wrap:wrap; gap:14px; margin:0 0 16px; }
.lgea .ea-f { display:flex; flex-direction:column; gap:5px; margin:0; font-size:14px; font-weight:600; color:var(--qc-ink); text-transform:none; letter-spacing:normal; }
.lgea .ea-f input, .lgea .ea-f select { width:220px; max-width:100%; height:46px; margin:0; padding:0 12px; border:2px solid var(--qc-line); border-radius:12px; background:#fff; font:500 16px Poppins, sans-serif; color:var(--qc-ink); box-shadow:none; }
.lgea .ea-f input:focus, .lgea .ea-f select:focus { outline:none; border-color:var(--qc-green); }

/* Level badges */
.lgea .ea-lvl { display:inline-block; padding:2px 9px; border-radius:999px; font-size:12px; font-weight:700; white-space:nowrap; background:var(--qc-bg); color:#343b46; }
.lgea .qc-vhead .ea-lvl { padding:6px 12px; font-size:14px; }
.lgea .ea-l-low { background:var(--qc-green-l); color:var(--qc-green-d); }
.lgea .ea-l-typ { background:#eef1f4; color:#343b46; }
.lgea .ea-l-high { background:#fff1dc; color:#9a4a00; }
.lgea .ea-l-vhigh { background:var(--qc-red-l); color:var(--qc-red); }

/* The verdict's cost block */
.lgea .ea-costv .ea-costh { font-weight:600; color:var(--qc-ink); }
.lgea .ea-notes { margin:0; padding:0; list-style:none; display:grid; gap:10px; }
.lgea .ea-notes li { display:grid; grid-template-columns:28px minmax(0,1fr); gap:12px; align-items:start; margin:0; padding:12px 14px; border-radius:14px; background:#fff; }
.lgea .ea-notes li p { margin:0; font-size:15px; line-height:1.6; color:#343b46; }

/* The costs, line by line */
.lgqc.lgea .qc-sec[data-qc-src="costs"], .lgqc.lgea .qc-sec[data-qc-src="checks"] { grid-column:1 / -1; }
.lgea .ea-costs .qc-k { display:flex; flex-wrap:wrap; align-items:baseline; gap:4px 10px; margin-top:22px; }
.lgea .ea-k-sub { font-size:12.5px; font-weight:500; letter-spacing:normal; text-transform:none; }
.lgea .ea-sec { margin:0 0 12px; padding:14px 16px; border:1px solid var(--qc-line); border-radius:16px; }
.lgea .ea-sec-d { background:var(--qc-bg); border-color:transparent; }
.lgea .ea-sec-h { display:flex; flex-wrap:wrap; align-items:center; gap:6px 12px; }
.lgea .ea-code { display:inline-flex; align-items:center; justify-content:center; width:28px; height:28px; border-radius:8px; background:var(--qc-ink); color:#fff; font-size:14px; font-weight:700; }
.lgea .ea-sec-n { font-size:17px; font-weight:600; }
.lgea .ea-sec-t { margin-left:auto; font-size:18px; font-weight:700; font-variant-numeric:tabular-nums; text-align:right; }
.lgea .ea-sec-t small { display:block; font-size:12px; font-weight:500; color:var(--qc-muted); }
.lgea .ea-about { margin:6px 0 4px; font-size:13.5px; line-height:1.5; color:var(--qc-muted); }
.lgea .ea-lines { margin:8px 0 0; padding:0; list-style:none; }
.lgea .ea-ln { display:grid; grid-template-columns:minmax(0,1.4fr) minmax(90px,1fr) 88px 92px; align-items:center; column-gap:14px; margin:0; padding:8px 4px; border-top:1px solid #eef1f4; }
.lgea .ea-ln-n { min-width:0; font-size:15px; font-weight:500; line-height:1.35; overflow-wrap:anywhere; }
.lgea .ea-ln-n small { display:block; margin-top:1px; font-size:12px; font-weight:400; color:var(--qc-muted); }
.lgea .ea-ln-n .ea-opt-t { display:inline; margin-left:4px; padding:1px 7px; border-radius:999px; background:var(--qc-violet-l); color:var(--qc-violet); font-weight:600; }
.lgea .ea-ln-a { text-align:right; font-size:15px; }
.lgea .ea-ln-l { text-align:right; }
.lgea .ea-ln-hi .ea-ln-a { color:#9a4a00; }
.lgea .ea-tip { grid-column:1 / -1; margin:6px 0 2px; padding:8px 12px; border-radius:10px; background:var(--qc-amber-l); font-size:13.5px; line-height:1.5; color:#3b3222; }
.lgea .ea-rb { position:relative; display:block; height:18px; }
.lgea .ea-rb::before { content:""; position:absolute; left:0; right:0; top:50%; height:2px; margin-top:-1px; border-radius:2px; background:#e9edf1; }
.lgea .ea-rb-band { position:absolute; top:50%; height:8px; margin-top:-4px; border-radius:4px; background:#cfe8d5; }
.lgea .ea-rb-mid { position:absolute; top:2px; bottom:2px; width:2px; margin-left:-1px; background:#6b9d76; }
.lgea .ea-rb-you { position:absolute; top:50%; width:12px; height:12px; margin:-6px 0 0 -6px; border-radius:50%; border:2px solid #fff; box-shadow:0 1px 3px rgba(20,24,31,.35); background:#7b8592; padding:0; }
.lgea .ea-rb-you.ea-l-low { background:var(--qc-green); }
.lgea .ea-rb-you.ea-l-typ { background:#5b6472; }
.lgea .ea-rb-you.ea-l-high { background:#e8590c; }
.lgea .ea-rb-you.ea-l-vhigh { background:var(--qc-red); }

/* What we checked */
.lgea .ea-checks { margin:0; padding:0; list-style:none; display:grid; grid-template-columns:repeat(auto-fill, minmax(min(420px, 100%), 1fr)); gap:10px; }
.lgea .ea-checks li { display:grid; grid-template-columns:28px minmax(0,1fr); gap:12px; align-items:start; margin:0; padding:12px 14px; border-radius:14px; background:var(--qc-bg); }
.lgea .ea-checks b { display:block; margin:3px 0 2px; font-size:15px; }
.lgea .ea-checks p { margin:0; font-size:14.5px; line-height:1.55; color:#343b46; }
.lgea .ea-c-i { display:inline-flex; align-items:center; justify-content:center; width:28px; height:28px; border-radius:50%; font-size:14px; font-weight:700; color:#fff; background:#8a94a1; }
.lgea .ea-c-good .ea-c-i { background:var(--qc-green); }
.lgea .ea-c-warn .ea-c-i { background:#d97706; }
.lgea .ea-c-bad { background:var(--qc-red-l); }
.lgea .ea-c-bad .ea-c-i { background:var(--qc-red); }
.lgea .ea-src { list-style:none; padding-left:0; }

@media (max-width: 767.98px) {
    .lgbd .bd-cpanel.bd-ea { height:auto; overflow:visible; }
    .lgea-up .ea-drops { gap:8px; }
    .lgea-up .ea-drop, .lgea-up.lgea-compact .ea-drop { height:104px; }
    .lgea-up .ea-row, .lgea-up.lgea-compact .ea-row { flex-wrap:wrap; }
    .lgea-up .ea-score { flex:1 1 100%; }
    .lgea-up .ea-score input, .lgea-up.lgea-compact .ea-score input { width:100%; height:46px; font-size:16px; }   /* 16px keeps iOS from zooming */
    .lgea-up .ea-go, .lgea-up.lgea-compact .ea-go { flex:1 1 100%; height:48px; font-size:16px; }

    .lgea .ea-save { padding:14px; }
    .lgea .ea-save-row, .lgea .ea-link { flex-direction:column; }
    .lgea .ea-save-row input, .lgea .ea-link input { height:46px; font-size:16px; }
    .lgea .ea-go.ea-go-sm { height:46px; }
    .lgea .ea-saved-n { font-size:19px; }
    .lgea .ea-ask-h { font-size:20px; }
    .lgea .ea-f, .lgea .ea-f input, .lgea .ea-f select { width:100%; }
    .lgea .ea-sec { padding:12px; }
    .lgea .ea-ln { grid-template-columns:minmax(0,1fr) auto; row-gap:4px; }
    .lgea .ea-ln-r { grid-column:1 / -1; grid-row:2; }
    .lgea .ea-ln-l { grid-column:2; grid-row:1; display:none; }
    .lgea .ea-ln-hi .ea-ln-l { display:block; grid-column:1 / -1; grid-row:3; text-align:left; }
    .lgea .ea-scan img { width:64px; height:84px; }
}
