/* ── Mortgage Lead Form — Public CSS (split-panel popup design) ────────── */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:wght@700&display=swap');

:root {
  --mlc-primary:  #0a1628;
  --mlc-accent:   #c9a84c;
  --mlc-accent-l: #e8c878;
  --mlc-bg:       #faf7f2;
  --mlc-text:     #1f2937;
  --mlc-gray:     #6b7280;
  --mlc-light:    #f9fafb;
  --mlc-border:   #e5e7eb;
  --mlc-r:        0px;
  --mlc-trans:    .22s ease;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
}
body {
  margin: 0;
  min-height: 100vh;
}

/* ── Card shell ──────────────────────────────────────────────────────── */
.mlc-wrap {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--mlc-text);
  background: #fff;
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 100vh;
  overflow: hidden;
}

/* Top bar — dark strip above the panel column: progress track, step
   counter, and close button together. Sits only above the panel, not
   the sidebar (see .mlc-panel-col below), matching the reference. */
.mlc-topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--mlc-primary);
  padding: 14px 16px;
  flex-shrink: 0;
}
.mlc-progress-track { flex: 1; height: 4px; border-radius: 999px; background: rgba(255,255,255,.15); overflow: hidden; }
.mlc-progress-bar { height: 100%; width: 0%; background: linear-gradient(90deg,var(--mlc-accent),var(--mlc-accent-l)); transition: width .4s ease; }

.mlc-count {
  font-size: 12px; font-weight: 600; letter-spacing: .5px;
  color: rgba(255,255,255,.55);
  flex-shrink: 0;
}

.mlc-close {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,.12);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background var(--mlc-trans);
}
.mlc-close:hover { background: rgba(255,255,255,.22); }

/* ── Two-column shell ────────────────────────────────────────────────── */
.mlc-shell {
  display: flex;
  flex: 1;
  min-height: 0;
}

/* Panel column: top bar + panel, stacked — sits only to the right of the
   sidebar, so the progress/close bar doesn't stretch over the sidebar. */
.mlc-panel-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* Sidebar (dark, brand/trust panel) */
.mlc-sidebar {
  width: 340px;
  flex-shrink: 0;
  background: var(--mlc-primary);
  background-image: radial-gradient(circle at 85% 25%, rgba(201,168,76,.22), transparent 60%);
  color: #fff;
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
}
.mlc-logo-row { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.mlc-logo { max-height: 44px; max-width: 160px; object-fit: contain; border-radius: 6px; }
.mlc-company-name { color: #fff; font-family: 'Playfair Display',Georgia,serif; font-size: 15px; font-weight: 700; line-height: 1.25; }

.mlc-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--mlc-accent-l);
  margin-bottom: 14px;
}
.mlc-badge::before {
  content: ''; width: 6px; height: 6px; border-radius: 1px; transform: rotate(45deg);
  background: var(--mlc-accent);
  display: inline-block;
}

.mlc-side-headline {
  font-family: "Poppins", sans-serif;
  font-size: 26px;
  line-height: 1.28;
  color: #fff;
  margin: 0 0 14px;
}
.mlc-side-desc {
  font-size: 13.5px;
  line-height: 1.65;
  color: rgba(255,255,255,.65);
  margin: 0 0 22px;
}

.mlc-side-trust { list-style: none; margin: 0 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.mlc-side-trust li { display: flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 500; color: rgba(255,255,255,.9); }
.mlc-side-trust i { color: var(--mlc-accent); font-size: 13px; flex-shrink: 0; }

.mlc-agent {
  margin-top: auto;
  padding-top: 22px;
  border-top: 1px solid rgba(255,255,255,.14);
  display: flex; align-items: center; gap: 12px;
}
.mlc-agent-avatar {
  width: 46px; height: 46px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
  border: 2px solid var(--mlc-accent);
}
.mlc-agent-avatar-fallback {
  width: 46px; height: 46px; border-radius: 50%;
  background: rgba(255,255,255,.1); border: 2px solid var(--mlc-accent);
  display: flex; align-items: center; justify-content: center;
  color: var(--mlc-accent-l); font-weight: 700; font-size: 16px; flex-shrink: 0;
}
.mlc-agent-name { font-size: 14px; font-weight: 700; color: #fff; line-height: 1.3; }
.mlc-agent-sub { font-size: 12px; color: rgba(255,255,255,.55); line-height: 1.4; }
.mlc-agent-sub i { width: 12px; color: var(--mlc-accent); margin-right: 4px; }
.mlc-agent-sub a{
    color: rgba(255, 255, 255, .55);
    text-decoration: none;
    transition: 0.1s ease-in;
    
}
.mlc-agent-sub a:hover{
    color: var(--mlc-accent-l);
}

/* Right panel (steps) */
.mlc-panel {
  flex: 1;
  min-width: 0;
  background: #fff;
  padding: 48px 44px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Screens */
.mlc-screen { display: none; animation: mlcFadeIn .6s ease both; }
.mlc-screen.mlc-active { display: block; text-align: center; }
@keyframes mlcFadeIn { from{opacity:0;transform:translateY(10px)} to{opacity:1;transform:translateY(0)} }

/* Intro screen */
.mlc-pre-head {font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--mlc-accent); margin-bottom: 10px; }
.mlc-main-h {  font-family: "Poppins", sans-serif; font-size: 27px; color: var(--mlc-primary); line-height: 1.25; margin-bottom: 12px; }
.mlc-desc { color: var(--mlc-gray); font-size: 14px; line-height: 1.65; margin-bottom: 24px; max-width: 460px; }
.mlc-start-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg,var(--mlc-accent),var(--mlc-accent-l));
  color: var(--mlc-primary); font-weight: 700; font-size: 15px;
  padding: 14px 28px; border-radius: 10px; border: none; cursor: pointer;
  transition: filter var(--mlc-trans); font-family: inherit;
  margin-bottom: 4px;
}
.mlc-start-btn:hover { filter: brightness(1.06); }

/* Trust row (used only where explicitly placed, e.g. final step) */
.mlc-trust { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; justify-content: center; }
.mlc-trust span { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--mlc-gray); }
.mlc-trust i { color: var(--mlc-accent); }

/* Step screens */
.mlc-step-label { font-size: 11px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--mlc-accent); margin-bottom: 10px; }
.mlc-screen h2 { font-family: "Poppins", sans-serif; font-size: 24px; color: var(--mlc-primary); margin-bottom: 8px; line-height: 1.3; }
.mlc-subtitle { color: var(--mlc-gray); font-size: 14px; margin-bottom: 20px; }

/* Options grid — tiles */
.mlc-options-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; max-width: 100%; }
.mlc-option-btn {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px; border: 1.5px solid var(--mlc-border);
  border-radius: 10px; background: #fff; cursor: pointer;
  font-family: inherit; font-size: 15px; font-weight: 500; color: var(--mlc-text);
  transition: all var(--mlc-trans); text-align: left;
}
.mlc-option-btn:hover { border-color: var(--mlc-accent); background: #fffbee; }
.mlc-option-btn.selected { border-color: var(--mlc-accent); background: linear-gradient(135deg,rgba(201,168,76,.12),rgba(232,200,120,.08)); color: var(--mlc-primary); }
.mlc-opt-icon { font-size: 18px; color: var(--mlc-accent); flex-shrink: 0; width: 22px; text-align: center; }
.mlc-check { margin-left: auto; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--mlc-border); flex-shrink: 0; transition: all var(--mlc-trans); }
.mlc-option-btn.selected .mlc-check { background: var(--mlc-accent); border-color: var(--mlc-accent); background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 12 10' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 5l3.5 3.5L11 1' stroke='%230a1628' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: center; background-size: 10px; }

/* Goal grid — first-step choice rows (full width, radio on the right) */
.mlc-goal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; max-width: 100%; }
.mlc-goal-btn {
  border: 1.5px solid var(--mlc-border); border-radius: 10px;
  padding: 16px 14px; cursor: pointer; background: #fff;
  text-align: left; transition: all var(--mlc-trans); font-family: inherit;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.mlc-goal-btn::after {
  content: ''; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--mlc-border);
  flex-shrink: 0; transition: all var(--mlc-trans);
}
.mlc-goal-btn:hover { border-color: var(--mlc-accent); background: #fffbee; }
.mlc-goal-btn.selected { border-color: var(--mlc-accent); background: linear-gradient(135deg,rgba(201,168,76,.12),rgba(232,200,120,.08)); }
.mlc-goal-btn.selected::after { background: var(--mlc-accent); border-color: var(--mlc-accent); background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 12 10' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 5l3.5 3.5L11 1' stroke='%230a1628' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: center; background-size: 10px; }
.mlc-g-icon { font-size: 20px; color: var(--mlc-accent); }
.mlc-g-label { font-size: 15px; font-weight: 500; color: var(--mlc-primary); }

/* Input steps */
.mlc-field { margin-bottom: 14px; max-width: 100%; }
.mlc-field label { display: none; font-size: 12px; font-weight: 600; color: var(--mlc-gray); letter-spacing: .5px; margin-bottom: 6px; text-transform: uppercase; }
.mlc-inp {
  width: 100%; padding: 13px 14px;
  border: 1.5px solid var(--mlc-border); border-radius: 10px;
  font-family: inherit; font-size: 16px; color: var(--mlc-text);
  outline: none; transition: border-color var(--mlc-trans);
  background: #fff;
}
.mlc-inp:focus { border-color: var(--mlc-accent); box-shadow: 0 0 0 3px rgba(201,168,76,.15); }
.mlc-inp.mlc-error { border-color: #dc2626; }
.mlc-textarea { resize: vertical; min-height: 110px; line-height: 1.5; }
.mlc-err { color: #dc2626; font-size: 12px; margin-top: 5px; display: none; }

/* Number field with optional $ prefix / % suffix */
.mlc-number-wrap { position: relative; }
.mlc-num-affix {
  position: absolute; top: 50%; transform: translateY(-50%);
  color: var(--mlc-gray); font-size: 16px; font-weight: 500; pointer-events: none;
}
.mlc-num-prefix { left: 14px; }
.mlc-num-suffix { right: 14px; }
.mlc-number-wrap.has-prefix .mlc-num-inp { padding-left: 28px; }
.mlc-number-wrap.has-suffix .mlc-num-inp { padding-right: 28px; }

/* Continue / Submit button */
.mlc-btn-continue {
  padding: 13px 26px; margin-top: 8px; max-width: 100%; width: 100%;
  background: linear-gradient(135deg,var(--mlc-accent),var(--mlc-accent-l));
  color: var(--mlc-primary); font-weight: 700; font-size: 15px;
  border: none; border-radius: 10px; cursor: pointer;
  font-family: inherit; transition: filter var(--mlc-trans);
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.mlc-btn-continue:hover { filter: brightness(1.06); }
.mlc-btn-continue:disabled { opacity: .6; cursor: not-allowed; }

.mlc-btn-back {
  background: none; border: none; color: var(--mlc-gray); font-size: 13px;
  cursor: pointer; margin-top: 14px; font-family: inherit; display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 0; transition: color var(--mlc-trans);
}
.mlc-btn-back:hover { color: var(--mlc-primary); }

/* Rating */
.mlc-rating { display: flex; align-items: center; gap: 8px; margin-top: 16px; }
.mlc-stars { color: var(--mlc-accent); letter-spacing: 1px; font-size: 15px; }
.mlc-rating-text { font-size: 13px; color: var(--mlc-gray); }

/* Spinner */
.mlc-spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid rgba(10,22,40,.3); border-top-color: var(--mlc-primary); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to{ transform:rotate(360deg) } }

/* Success */
.mlc-success { text-align: left; }
.mlc-success-icon { margin-bottom: 18px; }
.mlc-success-icon .mlc-logo { max-height: 48px; }
.mlc-logo-fallback { font-family: 'Playfair Display',Georgia,serif; font-size: 20px; color: var(--mlc-primary); font-weight: 700; }
.mlc-success h2 { font-family: 'Playfair Display',Georgia,serif; font-size: 24px; color: var(--mlc-primary); margin-bottom: 10px; }
.mlc-success p { color: var(--mlc-gray); font-size: 14px; line-height: 1.65; margin-bottom: 8px; max-width: 100%; }
.mlc-success-note { font-size: 12px; color: var(--mlc-gray); display: flex; align-items: center; gap: 5px; justify-content: center; }
.mlc-success-note i { color: var(--mlc-accent); }

/* Footer */
.mlc-footer { background: #fff; padding: 12px 44px 18px; text-align: center; font-size: 11px; color: var(--mlc-gray); font-family: 'DM Sans', sans-serif; }
.mlc-footer a { color: var(--mlc-accent); text-decoration: none; }

/* Responsive — collapse to single column, hide sidebar to save space */
@media (max-width: 760px) {
  .mlc-shell { flex-direction: column; }
  .mlc-sidebar { display: none; }
  .mlc-panel { padding: 30px 22px; }
  .mlc-topbar { padding: 12px 14px; gap: 10px; }
  .mlc-main-h, .mlc-screen h2 { font-size: 21px; }
  .mlc-goal-grid { grid-template-columns: 1fr; }
}

/* Standalone page (visited directly, not inside the popup iframe) —
   show the card centered on the page instead of filling the viewport
   edge-to-edge. The popup iframe already provides that centered-card
   chrome itself, so this only applies when the form stands alone. */
body.mlc-standalone-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}
.mlc-wrap.mlc-standalone {
  min-height: 0;
  width: 100%;
  max-width: 1040px;
  height: 640px;
  max-height: 90vh;
  border-radius: 20px;
  box-shadow: 0 25px 70px rgba(0,0,0,.25);
}
@media (max-width: 760px) {
  body.mlc-standalone-body { padding: 0; }
  .mlc-wrap.mlc-standalone { max-height: 100%; height: 100vh; border-radius: 0; box-shadow: none; }
}
