/* =============================================================
   Lendera.ai — Visual-first theme (floating chat + secret calculators)
   Palette: #0072ff → #00c6ff
============================================================= */
:root {
  --brand-start: #0072ff;
  --brand-end:   #00c6ff;
  --ink: #0b0f1a;
  --muted: #516070;
  --glass: rgba(255,255,255,0.72);
  --glass-deep: rgba(255,255,255,0.86);
  --line: rgba(0,0,0,0.06);
  --glow: 0 25px 80px rgba(0,114,255,0.14);
  --success: #16a34a;
}

/* Background */
body { background: radial-gradient(circle at 50% 20%, #f8fbff 0%, #eef4ff 60%, #e7f0ff 100%); color: var(--ink); font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; margin: 0; }
body.modal-open { overflow: hidden; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  position: relative;
}
/* Promo bar */
.promo-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  margin: 0;
  padding: 8px 10px;
  z-index: 9999;
}
.promo-icon { filter: drop-shadow(0 2px 8px rgba(0,0,0,0.2)); }

/* Hero */
.hero { display: grid; place-items: center; padding: 70px 16px 24px; margin-top: 50px; }
.hero--compact { padding-top: 90px; }
.hero-inner { width: 100%; max-width: 1160px; display: grid; gap: 24px; }
.hero-text { text-align: center; }
.brand { font-size: clamp(40px, 6vw, 68px); font-weight: 900; letter-spacing: -0.02em; margin: 0; background: linear-gradient(90deg, var(--brand-start), var(--brand-end)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.tagline { margin: 8px 0 0; color: var(--muted); font-weight: 600; }

.section-title { font-size: clamp(24px, 3.4vw, 34px); font-weight: 800; text-align: center; margin: 28px auto 24px; background: linear-gradient(90deg, var(--brand-start), var(--brand-end)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

/* ========================
   Floating Chat Experience
======================== */
.chat-section { position: relative; }
.chat-container { width: min(900px, 92vw); margin: 0 auto; border-radius: 20px; background: var(--glass); backdrop-filter: blur(12px); border: 1px solid var(--line); box-shadow: var(--glow); overflow: hidden; transition: all 0.4s ease; }

/* Collapsed chat slightly bigger */
.chat-container.chat-collapsed {
  height: 72px;
  min-height: 72px;
  max-height: 72px;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255,255,255,0.92);
  padding: 0 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(0,114,255,0.12);
  cursor: text;
}
.chat-container.chat-collapsed .chat-header, .chat-container.chat-collapsed .chat-messages { display: none !important; }
.chat-container.chat-collapsed .chat-input {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
}

.chat-container.chat-collapsed .chat-send {
  height: 48px;
  border-radius: 999px;
  padding: 0 20px;
  font-size: 15px;
  background: linear-gradient(135deg, var(--brand-start), var(--brand-end));
  box-shadow: 0 6px 16px rgba(0,114,255,0.25);
}

.chat-container.chat-collapsed .chat-text {
  border-radius: 999px;
  background: #fff;
  font-size: 16px;
  border: none;
  height: 48px;
}

.chat-container:hover { box-shadow: 0 35px 90px rgba(0,114,255,0.18); transform: translateY(-1px); }
.chat-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, rgba(255,255,255,.9), rgba(255,255,255,.6)); }
.chat-title { font-weight: 700; color: var(--ink); }
.chat-close { all: unset; cursor: pointer; font-size: 22px; line-height: 1; padding: 6px 10px; border-radius: 10px; }
.chat-close:hover { background: rgba(0,0,0,.06); }
.chat-messages { display: grid; gap: 10px; padding: 16px; height: min(46vh, 420px); overflow: auto; background: radial-gradient(1000px 300px at 20% -10%, rgba(0,198,255,0.12), transparent), radial-gradient(900px 280px at 90% 120%, rgba(0,114,255,0.1), transparent); }
.msg { max-width: 85%; padding: 12px 14px; border-radius: 16px; font-weight: 500; line-height: 1.35; box-shadow: 0 10px 26px rgba(0,0,0,.06); animation: pop .18s ease-out both; }
.ai-msg { background: #fff; border: 1px solid var(--line); color: var(--ink); justify-self: start; }
.user-msg { background: linear-gradient(135deg, var(--brand-start), var(--brand-end)); color: #fff; justify-self: end; }
@keyframes pop { from { transform: scale(.98) translateY(4px); opacity: 0; } to { transform: scale(1) translateY(0); opacity: 1; } }
.chat-input {
  display: flex;
  align-items: center;
  background: #fff;
  overflow: hidden;
  padding: 0.5rem;
}
.chat-text {
  width: 100%;
  padding: 14px 16px;
  border-radius: 999px;
  border: none;
  outline: none;
  background: #fff;
  font-size: 16px;
  color: var(--ink);
}
.chat-text:focus {
  border: none;
}

.chat-send { padding: 12px 18px; border-radius: 999px; border: 0; cursor: pointer; color: #fff; font-weight: 700; letter-spacing: .2px; background: linear-gradient(135deg, var(--brand-start), var(--brand-end)); box-shadow: 0 8px 26px rgba(0,114,255,0.28); }
.chat-send:hover { transform: translateY(-1px); box-shadow: 0 12px 34px rgba(0,114,255,0.34); }

/* Docking */
.chat-container.is-docked { position: fixed; right: 22px; bottom: 22px; width: min(420px, 92vw); height: 68px; border-radius: 18px; overflow: hidden; transform: translateY(12px) scale(.98); }
.chat-container.is-docked .chat-header, .chat-container.is-docked .chat-messages { display: none; }
.chat-container.is-docked .chat-input { display: grid; padding: 10px; }
.chat-container.is-docked.is-open { height: min(70vh, 680px); transform: translateY(0) scale(1); }
.chat-container.is-docked.is-open .chat-header, .chat-container.is-docked.is-open .chat-messages { display: grid; }
.chat-fab { position: fixed; right: 26px; bottom: 26px; width: 56px; height: 56px; border-radius: 50%; border: 0; cursor: pointer; font-size: 22px; display: none; align-items: center; justify-content: center; background: #fff; box-shadow: 0 10px 26px rgba(0,114,255,0.28); }
.chat-fab.is-visible { display: inline-grid; }
.chat-fab:hover { transform: translateY(-1px); box-shadow: 0 16px 38px rgba(0,114,255,0.36); }

/* ========================
   The Lendera Secret Calculators
======================== */
.secret-calcs { max-width: 1160px; margin: 60px auto 40px; padding: 0 16px; }
.secret-head { text-align: center; margin-bottom: 18px; }
.secret-title { font-size: clamp(28px, 4.2vw, 44px); font-weight: 900; letter-spacing: -0.02em; margin: 0 0 6px; background: linear-gradient(90deg, var(--brand-start), var(--brand-end)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.secret-sub { color: var(--muted); font-weight: 600; margin: 0 auto 10px; max-width: 820px; }

.secret-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px,1fr)); gap: 20px; }
.secret-card { position: relative; background: rgba(255,255,255,0.9); border: 1px solid rgba(0,114,255,0.1); border-radius: 22px; padding: 20px; box-shadow: 0 14px 36px rgba(0,114,255,0.1); overflow: hidden; transition: transform .25s, box-shadow .25s; }
.secret-card::before { content: ""; position: absolute; inset: 0; background: radial-gradient(600px 140px at -10% -20%, rgba(0,198,255,0.16), transparent 60%), radial-gradient(600px 140px at 110% 120%, rgba(0,114,255,0.16), transparent 60%); opacity: .7; pointer-events: none; }
.secret-card:hover { transform: translateY(-4px); box-shadow: 0 24px 54px rgba(0,114,255,0.16); }
.card-top { display: grid; gap: 6px; }
.card-icon { font-size: 26px; }
.secret-card h3 { margin: 0; font-size: 18px; color: var(--brand-start); }
.secret-card p { margin: 0; color: var(--ink); opacity: .85; }
.card-cta { margin-top: 12px; }
.cta-btn { width: 100%; padding: 12px 16px; border-radius: 14px; border: 0; cursor: pointer; color: #fff; font-weight: 800; letter-spacing: .2px; background: linear-gradient(135deg, var(--brand-start), var(--brand-end)); box-shadow: 0 10px 28px rgba(0,114,255,0.28); }
.cta-btn:hover { transform: translateY(-1px); box-shadow: 0 16px 34px rgba(0,114,255,0.38); }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
  z-index: 1;
  cursor: pointer;
}

.modal-dialog {
  position: relative;
  z-index: 2;
  background: #fff;
  border-radius: 20px;
  padding: 32px;
  width: 90%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 12px 36px rgba(0,0,0,0.25);
  transform: scale(0.97);
  transition: transform 0.25s ease;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 18px;
  font-size: 24px;
  background: none;
  border: none;
  color: #64748b;
  cursor: pointer;
  z-index: 3;
}
.modal-close:hover { color: #000; }

@media (max-width: 600px) {
  .modal-dialog {
    margin: 0 18px;
    width: auto;
    padding: 26px;
  }
}

body.no-scroll { overflow: hidden; }



/* Prevent background scroll */
body.no-scroll {
  overflow: hidden;
}


/* Phone — up to 480px */
@media (max-width: 480px) {
  .modal-dialog {
    width: 94vw;
    height: 86vh;
    border-radius: 14px;
    padding: 20px 18px;
  }
  .modal-title {
    font-size: 22px;
  }
  .modal-desc {
    font-size: 14px;
  }
  .slider-group {
    padding: 12px 14px;
    border-radius: 14px;
  }
  input[type="range"]::-webkit-slider-thumb {
    width: 22px;
    height: 22px;
  }
  .big-btn {
    font-size: 15px;
    padding: 12px 0;
  }
  .broker-link {
    font-size: 14px;
    padding: 10px 16px;
  }
}

/* Tablet — 481px to 860px */
@media (min-width: 481px) and (max-width: 860px) {
  .modal-dialog {
    width: 88vw;
    height: 80vh;
    border-radius: 18px;
    padding: 26px;
  }
  .modal-title {
    font-size: 24px;
  }
  .slider-group {
    padding: 16px;
  }
}

/* Laptop / Desktop large — 861px+ */
@media (min-width: 861px) {
  .modal-dialog {
    width: min(580px, 80vw);
    height: 80vh;
  }
}

.modal.is-open .modal-dialog {
  transform: scale(1);
  opacity: 1;
}


.modal-title {
  font-size: 26px;
  font-weight: 800;
  color: #0072ff;
  margin-bottom: 8px;
}

.modal-desc {
  font-size: 15px;
  color: #555;
  margin-bottom: 22px;
}

/* Simplified field styling */
.calc-fields label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  color: #333;
}

input[type="number"] {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: textfield;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--glass-deep);
  padding: 10px 12px;
  font-size: 1rem;
  color: var(--ink);
  width: 100%;
  box-shadow: var(--glow);
}


.calc-fields input[type="number"],
.calc-fields input[type="text"] {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  border-radius: 10px;
  border: 1px solid #d0d8e8;
  background: #f8faff;
  outline: none;
  margin-bottom: 16px;
  transition: border-color 0.2s;
}
.calc-fields input:focus {
  border-color: #0072ff;
}

.calc-fields,
.dc-results {
  flex-shrink: 0;
}

.results-cards {
  display: grid;
  gap: 12px;
}
.result-card {
  background: #f9fbff;
  border: 1px solid #e3e8f3;
  border-radius: 12px;
  padding: 14px;
}
.result-card .label {
  font-size: 13px;
  color: #777;
}
.result-card .value {
  font-size: 22px;
  font-weight: 700;
  color: #0072ff;
}

.result-card .sub,
.result-card .savings {
  font-weight: 400; /* normal, not bold */
  color: #334155;   /* subtle dark grey text for readability */
}
/* Fix slider overflow inside modal */
.calc-fields {
  overflow-x: hidden; /* removes horizontal scroll */
}


/* Optional: ensure all calculator elements respect padding */
.modal-dialog * {
  max-width: 100%;
  box-sizing: border-box;
}

.modal-dialog .calc-fields {
  overflow-y: auto;
  flex-grow: 1;
  padding-bottom: 20px;
  margin-bottom: 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(0,114,255,0.3) transparent;
}

/* Anchored Chat Button (bottom-right inside modal, not overlaying content) */
.broker-link {
  position: absolute;
  bottom: 24px;
  right: 26px;
  width: auto;
  padding: 12px 22px;
  background: linear-gradient(90deg, var(--brand-start, #0072ff), var(--brand-end, #00c6ff));
  border: none;
  border-radius: 999px;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0,114,255,0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  z-index: 10;
}

.broker-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0,114,255,0.32);
}

/* Ensure modal content doesn’t overlap the button */
.modal-dialog {
  position: relative;
  padding-bottom: 90px; /* adds safe space at bottom */
}


/* CTA + close styling */
.big-btn {
  width: 100%;
  font-size: 16px;
  border-radius: 999px;
  padding: 14px 0;
  background: linear-gradient(90deg, #0072ff, #00c6ff);
  color: #fff;
  font-weight: 700;
  margin-top: 10px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}
.big-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0,114,255,0.25);
}

/* + Add Debt button */
.add-debt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--brand-start), var(--brand-end));
  color: #fff;
  font-size: 22px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(0,114,255,0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  transform-origin: center center; /* fixes scaling origin */
  margin-left: 8px;                /* gives breathing room from edge */
}

.add-debt:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 20px rgba(0,114,255,0.35);
}


/* Align "Other Debts" title and + button */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 20px 0 10px;
    overflow: visible; /* allows hover growth to remain visible */
  padding-right: 8px;
}

.section-header h4 {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}


/* Close (X) button — subtle, modern */
.modal-close {
  position: absolute;
  top: 16px;
  right: 18px;
  font-size: 22px;
  color: #64748b;
  cursor: pointer;
  background: none;
  border: none;
  z-index: 9999;
  transition: color 0.2s ease;
}
.modal-close:hover {
  color: #000;
}

/* Smooth backdrop */
.modal-backdrop {
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(5px);
}
/* Extra breathing space between button and results */
/* Results section — no internal scroll, just spacing */
.dc-results {
  overflow: visible;                  /* removes internal scroll */
  max-height: none;                   /* let content flow naturally */
  margin-top: 24px;                   /* keep space from button */
  padding-top: 16px;
  border-top: 1px solid rgba(0,114,255,0.1);
}


/* Broker link in modals */
.broker-link { position: sticky; bottom: 0; margin-top: 14px; width: 100%; padding: 12px 16px; border-radius: 12px; border: 1px dashed rgba(0,114,255,0.25); background: rgba(255,255,255,0.9); color: var(--brand-start); font-weight: 800; cursor: pointer; }
.broker-link:hover { background: #fff; box-shadow: 0 10px 30px rgba(0,114,255,0.1); }

/* Specials */
.lender-specials { margin: 40px auto 120px; padding: 0 16px; max-width: 1160px; }
.specials-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; }
.special { background: rgba(255,255,255,0.9); border: 1px solid rgba(0,114,255,0.1); border-radius: 20px; padding: 22px; box-shadow: 0 10px 35px rgba(0,114,255,0.08); position: relative; overflow: hidden; transition: transform .25s, box-shadow .25s; }
.special::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at top left, rgba(0,198,255,0.18), transparent 70%); opacity: 0; transition: opacity .25s; }
.special:hover { transform: translateY(-4px); box-shadow: 0 25px 50px rgba(0,114,255,0.12); }
.special:hover::before { opacity: 1; }
.special h3 { color: var(--brand-start); margin: 0 0 6px; font-size: 18px; }
.special p { color: var(--ink); opacity: .85; margin: 0; }

/* Footer */
.footer { text-align: center; color: var(--muted); padding: 30px 16px 60px; }

/* Responsive */
@media (max-width: 860px) {
  .results-cards { grid-template-columns: 1fr; }
  .modal-dialog { width: 94vw; }
}

.footer p {
  font-weight: normal;
}

.footer p:first-child {
  font-weight: bold;
}
/* ==========================================================
   UNIVERSAL SLIDER STYLE — consistent across all calculators
========================================================== */

/* Responsive sliders */
.slider-group {
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(0,114,255,0.1);
  border-radius: 16px;
  padding: 16px 20px;
  box-shadow: 0 10px 25px rgba(0,114,255,0.06);
  margin-bottom: 16px;
}

input[type="range"] {
  width: 100%;
  height: 8px;
  border-radius: 10px;
}

@media (max-width: 480px) {
  .slider-group label {
    font-size: 14px;
  }
  .slider-group span {
    font-size: 14px;
  }
}

body.modal-open {
  overflow: hidden;
}
.modal {
  -webkit-overflow-scrolling: touch;
}

/* ==========================================================
   Enhanced Premium Slider — Glassy + Gradient Fill
========================================================== */

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 10px;
  border-radius: 12px;
  background: linear-gradient(90deg, var(--brand-start), var(--brand-end)) 0/var(--fill, 0%) no-repeat,
              #e5ebf7;
  outline: none;
  cursor: pointer;
  margin: 8px 0 22px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.15), inset 0 0 6px rgba(0,114,255,0.2);
  transition: background-size 0.3s ease;
}

/* For live fill color as you slide */
input[type="range"]::-webkit-slider-runnable-track {
  height: 10px;
  border-radius: 12px;
  background: transparent;
}
input[type="range"]::-moz-range-track {
  height: 10px;
  border-radius: 12px;
  background: transparent;
}

/* Thumb */
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fff, #f4f7fb);
  border: 3px solid var(--brand-start);
  box-shadow: 0 4px 10px rgba(0,114,255,0.25), inset 0 0 4px rgba(255,255,255,0.6);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}
input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(0,114,255,0.35), inset 0 0 4px rgba(255,255,255,0.6);
}

/* Firefox thumb */
input[type="range"]::-moz-range-thumb {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fff, #f4f7fb);
  border: 3px solid var(--brand-start);
  box-shadow: 0 4px 10px rgba(0,114,255,0.25), inset 0 0 4px rgba(255,255,255,0.6);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}
input[type="range"]::-moz-range-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(0,114,255,0.35), inset 0 0 4px rgba(255,255,255,0.6);
}

/* 🔧 Align slider thumb perfectly on track */
input[type="range"] {
  vertical-align: middle;
  height: 10px; /* ensures track height is standard */
}

/* Center the thumb exactly on the bar */
input[type="range"]::-webkit-slider-thumb {
  margin-top: -9px; /* half of thumb height (28px) minus half of track height (10px) */
}
input[type="range"]::-moz-range-thumb {
  transform: translateY(-1px); /* Firefox fine-tune */
}
/* ==========================================================
   ✅ FIXED — Cashback Specials always visible + adaptive
========================================================== */
/* ✅ Fix Cashback Visibility — always show specials */
#specials {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}


/* 2️⃣ Ensure proper spacing + responsive behaviour */
.lender-specials {
  position: relative;
  z-index: 1;
  margin-top: 80px;
  margin-bottom: 120px;
  padding: 0 16px;
  max-width: 1160px;
  width: 100%;
  box-sizing: border-box;
}

.specials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
  width: 100%;
}

/* 3️⃣ Card styling */
.special {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 18px;
  padding: 22px;
  border: 1px solid rgba(0, 114, 255, 0.1);
  box-shadow: 0 10px 25px rgba(0, 114, 255, 0.08);
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.special::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top left, rgba(0,198,255,0.18), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s;
}

.special:hover {
  transform: translateY(-4px);
  box-shadow: 0 25px 50px rgba(0,114,255,0.12);
}

.special:hover::before {
  opacity: 1;
}

.special h3 {
  color: var(--brand-start);
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 700;
}

.special p {
  color: var(--ink);
  opacity: 0.85;
  margin: 0;
  line-height: 1.5;
}

/* 4️⃣ Responsive tweak for mobile */
@media (max-width: 480px) {
  .lender-specials {
    padding: 0 12px;
    margin-top: 60px;
    margin-bottom: 80px;
  }

  .special {
    padding: 18px;
    border-radius: 14px;
  }

  .special h3 {
    font-size: 16px;
  }

  .special p {
    font-size: 14px;
  }
}

/* ==========================
   Property Type Toggle Buttons
========================== */
.occ-toggle {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-top: 8px;
}

.occ-toggle input[type="radio"] {
  display: none;
}

.occ-btn {
  flex: 1;
  text-align: center;
  padding: 12px 0;
  font-weight: 700;
  border-radius: 12px;
  border: 2px solid rgba(0,114,255,0.2);
  background: rgba(255,255,255,0.85);
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(0,114,255,0.06);
}

.occ-btn:hover {
  border-color: var(--brand-start);
  box-shadow: 0 4px 14px rgba(0,114,255,0.12);
  transform: translateY(-1px);
}

/* Selected (active) state */
.occ-toggle input[type="radio"]:checked + .occ-btn {
  background: linear-gradient(90deg, var(--brand-start), var(--brand-end));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 20px rgba(0,114,255,0.25);
}

/* Repayment Toggle */
.repay-toggle {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-top: 8px;
}
.repay-toggle input[type="radio"] { display: none; }
.repay-btn {
  flex: 1;
  text-align: center;
  padding: 12px 0;
  font-weight: 700;
  border-radius: 12px;
  border: 2px solid rgba(0,114,255,0.2);
  background: rgba(255,255,255,0.85);
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--ink);
}
.repay-btn:hover {
  border-color: var(--brand-start);
  box-shadow: 0 4px 14px rgba(0,114,255,0.12);
  transform: translateY(-1px);
}
.repay-toggle input[type="radio"]:checked + .repay-btn {
  background: linear-gradient(90deg, var(--brand-start), var(--brand-end));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 20px rgba(0,114,255,0.25);
}

/* Results Table */
/* =============================
   Responsive Results Table
============================= */
/* =============================
   Responsive Switch & Save Table
============================= */
.ref-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  text-align: center;
  border-radius: 10px;
  overflow: hidden;
}

.ref-table th {
  background: linear-gradient(90deg, var(--brand-start), var(--brand-end));
  color: #fff;
  padding: 10px;
  font-size: 14px;
}

.ref-table td {
  padding: 12px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  font-weight: 600;
  color: var(--ink);
  font-size: 15px;
}

.ref-table tr:hover td {
  background: rgba(0,114,255,0.04);
}

.positive { color: #0a9b31; }
.negative { color: #c62828; }

.brand-typing {
  font-weight: 800;
  font-size: clamp(28px, 5vw, 48px);
  display: inline-flex;
  align-items: baseline;
  letter-spacing: -0.5px;
}

#typeTarget {
  white-space: pre;
}

.caret {
  width: 2px;
  height: 1em;
  margin-left: 2px;
  background: currentColor;
  animation: blink 1s steps(1) infinite;
  transform: translateY(2px);
}

@keyframes blink {
  50% { opacity: 0; }
}


/* --- Mobile-friendly stacked cards --- */
@media (max-width: 768px) {
  .ref-table,
  .ref-table thead,
  .ref-table tbody,
  .ref-table th,
  .ref-table td,
  .ref-table tr {
    display: block;
    width: 100%;
  }

  .ref-table thead { display: none; }

  .ref-table tr {
    background: #fff;
    margin-bottom: 16px;
    border-radius: 14px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.06);
    overflow: hidden;
  }

  .ref-table td {
    display: flex;
    justify-content: space-between;
    text-align: left;
    padding: 10px 14px;
    border: none;
    font-size: 14px;
  }

  .ref-table td::before {
    content: attr(data-label);
    font-weight: 700;
    color: var(--brand-start);
  }
}


/* Property Type Toggle Buttons */
.occ-toggle, .repay-toggle {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-top: 8px;
}

.occ-toggle input[type="radio"],
.repay-toggle input[type="radio"] {
  display: none;
}

.occ-btn, .repay-btn {
  flex: 1;
  text-align: center;
  padding: 12px 0;
  font-weight: 700;
  border-radius: 12px;
  border: 2px solid rgba(0,114,255,0.2);
  background: rgba(255,255,255,0.85);
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(0,114,255,0.06);
}

.occ-btn:hover, .repay-btn:hover {
  border-color: var(--brand-start);
  box-shadow: 0 4px 14px rgba(0,114,255,0.12);
  transform: translateY(-1px);
}

/* Selected (active) state */
.occ-toggle input[type="radio"]:checked + .occ-btn,
.repay-toggle input[type="radio"]:checked + .repay-btn {
  background: linear-gradient(90deg, var(--brand-start), var(--brand-end));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 20px rgba(0,114,255,0.25);
}

/* =============================
   Switch & Save Card Layout
============================= */
.ref-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-top: 20px;
}

.ref-card {
  background: #fff;
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.08);
  transition: transform 0.2s ease;
}

.ref-card:hover {
  transform: translateY(-3px);
}

.ref-card h4 {
  color: var(--brand-start, #0072ff);
  margin-bottom: 8px;
}

.ref-card p {
  margin: 6px 0;
  font-size: 15px;
}

.positive { color: #0a9b31; font-weight: 600; }
.negative { color: #c62828; font-weight: 600; }

.option-buttons {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.option-btn {
  flex: 1;
  background: #f5f7fa;
  border: 1.5px solid #cfd9e3;
  border-radius: 8px;
  padding: 10px 0;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.option-btn.active {
  background: linear-gradient(135deg, #0072ff, #00c6ff);
  color: #fff;
  border-color: #0072ff;
}

/* 🧠 Insights styling */
.coach-box {
  background: #f9fbff;
  border-radius: 14px;
  padding: 20px;
  margin-top: 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
  animation: fadeIn 0.4s ease;
}

.coach-header h4 {
  color: #0072ff;
  margin-bottom: 4px;
  font-weight: 600;
}

.coach-sub {
  font-size: 14px;
  color: #64748b;
  margin-bottom: 14px;
}

.coach-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.coach-tip {
  font-weight: 400 !important;   /* normal text */
  font-size: 14px;
  color: #334155;
  background: #f8fafc;
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 6px;
}

.coach-tip.positive {
  border-left: 4px solid #22c55e;
}
.coach-tip.warning {
  border-left: 4px solid #f59e0b;
}
.coach-tip.info {
  border-left: 4px solid #3b82f6;
}
.coach-tip.neutral {
  border-left: 4px solid #94a3b8;
}

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

/* === Additional Fine-Tuning for Mobile & Tablet === */

/* Phone-specific adjustments */
@media (max-width: 480px) {
  body {
    font-size: 15px;
    line-height: 1.4;
  }
  .ref-card h4,
  .coach-tip {
    font-size: 15px;
  }
  .ref-card p,
  .coach-tip {
    font-size: 14px;
  }
  .results-cards {
    gap: 10px;
  }
  .ref-card {
    padding: 12px;
    border-radius: 12px;
  }
  .secret-title {
    font-size: 26px;
  }
  .modal-dialog {
    padding: 18px;
  }
}

/* Tablet mid-range tweaks */
@media (min-width: 481px) and (max-width: 860px) {
  .ref-card h4 {
    font-size: 17px;
  }
  .ref-card p {
    font-size: 15px;
  }
  .coach-tip {
    font-size: 15px;
    padding: 10px 12px;
  }
  .modal-dialog {
    padding: 22px;
  }
}

/* Desktop readability */
@media (min-width: 861px) {
  .ref-card h4 {
    font-size: 18px;
  }
  .coach-tip {
    font-size: 16px;
  }
}

canvas {
  width: 100% !important;
  height: auto !important;
}

@media (max-width: 600px) {
  .modal-dialog {
    margin: 0 14px; /* side spacing */
    width: auto;
    max-width: 95%;
    border-radius: 16px;
  }
  .modal-content {
    padding: 20px;
  }
}

@media (max-width: 600px) {
  .chat-fab {
    left: 50%;
    bottom: 20px;
    transform: translateX(-50%);
  }
}



/* =========================================
   ✅ MATCH BOTH SECTIONS (Secrets + Cashback)
   Ensures identical layout, font sizes, spacing
========================================= */

/* Make .lender-secrets visually identical to .secret-calcs */
.lender-secrets {
  max-width: 1160px;
  margin: 60px auto 40px;
  padding: 0 16px;
  background: transparent; /* same as .secret-calcs */
}

.lender-secrets .secret-head {
  text-align: center;
  margin-bottom: 18px;
}

.lender-secrets .secret-title {
  font-size: clamp(28px, 4.2vw, 44px);
  font-weight: 900;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
  background: linear-gradient(90deg, var(--brand-start), var(--brand-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.lender-secrets .secret-sub {
  color: var(--muted);
  font-weight: 600;
  margin: 0 auto 10px;
  max-width: 820px;
}

.lender-secrets .secret-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.lender-secrets .secret-card {
  position: relative;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 114, 255, 0.1);
  border-radius: 22px;
  padding: 20px;
  box-shadow: 0 14px 36px rgba(0, 114, 255, 0.1);
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s;
}

.lender-secrets .secret-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(600px 140px at -10% -20%, rgba(0,198,255,0.16), transparent 60%),
              radial-gradient(600px 140px at 110% 120%, rgba(0,114,255,0.16), transparent 60%);
  opacity: 0.7;
  pointer-events: none;
}

.lender-secrets .secret-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 54px rgba(0,114,255,0.16);
}

.lender-secrets .card-top {
  display: grid;
  gap: 6px;
}

.lender-secrets .card-icon {
  font-size: 26px;
}

.lender-secrets .secret-card h3 {
  margin: 0;
  font-size: 18px;
  color: var(--brand-start);
}

.lender-secrets .secret-card p {
  margin: 0;
  color: var(--ink);
  opacity: 0.85;
}

.lender-secrets .card-cta {
  margin-top: 12px;
}

.lender-secrets .cta-btn {
  width: 100%;
  padding: 12px 16px;
  border-radius: 14px;
  border: 0;
  cursor: pointer;
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.2px;
  background: linear-gradient(135deg, var(--brand-start), var(--brand-end));
  box-shadow: 0 10px 28px rgba(0,114,255,0.28);
  transition: transform 0.2s, box-shadow 0.2s;
}

.lender-secrets .cta-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(0,114,255,0.38);
}

/* Unify Lendera Secrets & Cashback sections visually */
.lender-secrets.secret-calcs {
  background: none;
  margin-top: 80px;
  margin-bottom: 120px;
}

.lender-secrets.secret-calcs .secret-title,
.lender-secrets.secret-calcs .secret-sub,
.lender-secrets.secret-calcs .secret-grid,
.lender-secrets.secret-calcs .secret-card {
  all: unset;
}

.lender-secrets.secret-calcs .secret-title {
  font-size: clamp(28px, 4.2vw, 44px);
  font-weight: 900;
  letter-spacing: -0.02em;
  text-align: center;
  margin: 0 0 6px;
  background: linear-gradient(90deg, var(--brand-start), var(--brand-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: block;
}

.lender-secrets.secret-calcs .secret-sub {
  display: block;
  color: var(--muted);
  font-weight: 600;
  text-align: center;
  margin: 0 auto 10px;
  max-width: 820px;
}

.lender-secrets.secret-calcs .secret-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 28px;
}

.lender-secrets.secret-calcs .secret-card {
  position: relative;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0,114,255,0.1);
  border-radius: 22px;
  padding: 20px;
  box-shadow: 0 14px 36px rgba(0,114,255,0.1);
  overflow: hidden;
  transition: transform .25s, box-shadow .25s;
}

.lender-secrets.secret-calcs .secret-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 54px rgba(0,114,255,0.16);
}

/* Smooth open/close for modal */
/* ✅ Smooth open/close modal animation */
.modal-backdrop {
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
}

.user-msg {
  background: var(--brand-start);
  color: white;
  padding: 10px 14px;
  border-radius: 14px;
  align-self: flex-end;
  max-width: 80%;
  margin: 6px 0;
}

.ai-msg {
  background: var(--glass);
  color: var(--ink);
  padding: 10px 14px;
  border-radius: 14px;
  align-self: flex-start;
  max-width: 80%;
  margin: 6px 0;
}

/* Chat message text normal weight */
.ai-msg,
.user-msg {
  font-weight: 400 !important; /* makes both AI and user text normal */
  font-size: 16px;
  line-height: 1.5;
}


/* Expanded chat state */
.chat-container.chat-open {
  height: 520px;
  max-height: 70vh;
  opacity: 1;
  pointer-events: auto;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.chat-container.chat-open .chat-messages {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.chat-container.chat-open .chat-input {
  margin-top: auto;
  background: #fff;
  border-top: 1px solid var(--line);
}

.user-msg, .ai-msg {
  animation: fadeInUp .25s ease both;
}
@keyframes fadeInUp {
  from { transform: translateY(6px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ===============================
   ✅ CORRECT MODAL OVERLAY STYLES
   =============================== */

.modal {
  /* --- Layout & Positioning (This was missing) --- */
  position: fixed;
  inset: 0; /* (top, left, right, bottom = 0) */
  display: flex; /* We use flex to center the .modal-dialog */
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  z-index: 99999;

  /* --- Hidden State (Default) --- */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: scale(0.97);

  /* --- Animation (This creates the fade/scale) --- */
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.modal.active {
  /* --- Visible State --- */
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: scale(1);
}

/* Ensure backdrop is fixed to the screen */
.modal-backdrop {
  position: fixed; 
  inset: 0;
  z-index: 1;
  /* Your other backdrop styles (blur, color) will now work correctly */
}

.badge-pass { color: #16a34a; }
.badge-fail { color: #b91c1c; }
#brVerdictCard.pass  { border-color: rgba(22,163,74,.25); }
#brVerdictCard.fail  { border-color: rgba(185,28,28,.25); }

.property-block {
  background: var(--glass);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 12px;
}
.property-block input {
  width: 100%;
  margin-bottom: 10px;
  padding: 10px;
  font-size: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: left;
}

/* =============================
   Loan Optimiser (Cleaned Up)
============================= */

/* 1. Main Section Container (Styled like the "Secret Calculators" for consistency) */
.optimise-section {
  background: rgba(255, 255, 255, 0.92);
  border-radius: 22px;
  border: 1px solid rgba(0, 114, 255, 0.1);
  box-shadow: 0 18px 45px rgba(0, 114, 255, 0.08);
  max-width: 1160px;
  margin: 60px auto 80px;
  padding: 40px 20px;
  box-sizing: border-box;
  text-align: center; /* Centers the h2 title */
}

/* 2. Inner Container (centers the form and results) */
.optimise-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  gap: 30px; /* Creates space between the form and the results */
}

/* 3. The Form (Desktop) */
.optimise-form {
  width: 100%;
  max-width: 600px; /* Caps the form width */
  text-align: left; /* Ensures labels are left-aligned */
  box-sizing: border-box;
}

/* 4. Form Group Spacing (This was missing) */
.optimise-form .form-group {
  margin-bottom: 16px;
}
.optimise-form .form-group:last-of-type {
  margin-bottom: 24px; /* More space before the button */
}
.optimise-form .repay-toggle {
  margin-bottom: 16px; /* Space after toggle buttons */
}
.optimise-form small {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  color: var(--muted);
}

/* 5. Form Input Fields (Consistent styling) */
.optimise-form label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  color: #333;
}

.optimise-form input[type="text"] {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  border-radius: 10px;
  border: 1px solid #d0d8e8;
  background: #f8faff;
  outline: none;
  box-sizing: border-box;
}

.optimise-form input[type="text"]:focus {
  border-color: var(--brand-start);
  box-shadow: 0 0 0 3px rgba(0, 114, 255, 0.08);
}

.optimise-form input[type="number"],
.optimise-form input[id*="Rate"] {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  border-radius: 10px;
  border: 1px solid #d0d8e8;
  background: #f8faff;
  outline: none;
  box-sizing: border-box;
  color: var(--ink);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.04);
}

/* Matching focus style */
.optimise-form input[type="number"]:focus,
.optimise-form input[id*="Rate"]:focus {
  border-color: var(--brand-start);
  box-shadow: 0 0 0 3px rgba(0, 114, 255, 0.08);
}

/* 6. The Results Box (Desktop) */
.optimise-results {
  width: 100%;
  max-width: 600px; /* Matches the form width */
  text-align: center;
  background: #f9fbff; /* A slight off-white */
  border-radius: 16px;
  padding: 24px;
  border: 1px solid rgba(0, 114, 255, 0.1);
  box-shadow: 0 12px 32px rgba(0, 114, 255, 0.08);
  margin-top: 0; /* We use 'gap' on the parent now */
  box-sizing: border-box;
}

/* ✅ Force small Start Application button site-wide */
.start-app-wrapper .big-btn {
  all: unset;
  display: inline-block;
  padding: 16px 36px; /* <--- Changed this */
  background: linear-gradient(90deg, #0072ff, #00c6ff);
  color: #fff;
  font-weight: 700;
  font-size: 17px; /* <--- And this */
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0,114,255,0.25);
  text-align: center;
  line-height: 1.2;
}
.start-app-wrapper .big-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(0,114,255,0.32);
}
.start-app-wrapper {
  display: flex;
  justify-content: center;
  margin: 40px 0;
}

/* =============================
   Application Wizard Styling
============================= */

/* --- Step Animation --- */
#modal-application .app-step {
  display: none; /* Hide all steps by default */
}

#modal-application .app-step.active {
  display: block; /* Show the active step */
  /* Uses the fadeInUp animation already in your CSS */
  animation: fadeInUp 0.3s ease both; 
}

/* --- Question Header --- */
#modal-application .app-step h3 {
  font-size: 22px; /* A bit smaller than the main modal title */
  font-weight: 700;
  color: var(--ink); /* Standard text color */
  text-align: center;
  margin-bottom: 24px;
}

/* --- Answer Button List --- */
#modal-application .option-list {
  display: flex;
  flex-direction: column;
  gap: 12px; /* Space between buttons */
}

/* --- Answer Button Styling --- */
#modal-application .option-btn {
  all: unset; /* Clears default button styles */
  box-sizing: border-box; 
  display: block;
  width: 100%;
  text-align: left; /* Aligns text to the left */
  padding: 14px 18px;
  font-weight: 600;
  border-radius: 12px;
  border: 2px solid rgba(0,114,255,0.2); /* Subtle blue border */
  background: rgba(255,255,255,0.85);
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(0,114,255,0.06);
}


/* =============================
   Application Wizard Styling
============================= */

/* --- Remove default padding --- */
#modal-application .modal-dialog {
  padding-bottom: 30px;
}

/* --- Slide Headers --- */
.step-header {
  text-align: center;
  margin-bottom: 24px;
}
.step-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--brand-start);
  margin: 0;
}
.step-subtitle {
  font-size: 15px;
  color: #555;
  margin: 4px 0 0;
}

/* --- Slide Question --- */
.step-question {
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  text-align: center;
  margin-bottom: 20px;
}

/* --- Hide inactive steps --- */
#modal-application .app-step {
  display: none;
}
#modal-application .app-step.active {
  display: block;
  animation: fadeInUp 0.3s ease both;
}

/* --- Text Input Fields --- */
#modal-application .calc-fields {
  margin-bottom: 20px;
}
#modal-application .calc-fields label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  color: #333;
}
#modal-application .calc-fields input,
#modal-application .calc-fields textarea {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  border-radius: 10px;
  border: 1px solid #d0d8e8;
  background: #f8faff;
  outline: none;
  margin-bottom: 16px;
  transition: border-color 0.2s;
}
#modal-application .calc-fields input:focus {
  border-color: var(--brand-start);
  box-shadow: 0 0 0 3px rgba(0,114,255,0.08);
}

/* --- Button Navigation --- */
.app-nav {
  margin-top: 24px;
  display: flex;
  justify-content: space-between; /* Puts "Back" left and "Next" right */
  align-items: center;
}

.prev-btn {
  all: unset;
  box-sizing: border-box;
  font-weight: 700;
  font-size: 15px;
  color: var(--muted);
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 8px;
}
.prev-btn:hover {
  color: var(--brand-start);
  background: rgba(0,114,255,0.08);
}

.next-btn {
  all: unset;
  box-sizing: border-box;
  display: inline-block;
  padding: 12px 28px;
  background: linear-gradient(90deg, var(--brand-start), var(--brand-end));
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0,114,255,0.25);
  text-align: center;
  transition: all 0.2s ease;
}
.next-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(0,114,255,0.32);
}

/* --- Answer Button Styling --- */
#modal-application .option-btn {
  all: unset; 
  box-sizing: border-box; 
  display: block;
  width: 100%;
  text-align: left; 
  padding: 14px 18px;
  font-weight: 600;
  border-radius: 12px;
  border: 2px solid rgba(0,114,255,0.2); 
  background: rgba(255,255,255,0.85);
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(0,114,255,0.06);
}

#modal-application .option-btn:hover {
  border-color: var(--brand-start);
  box-shadow: 0 4px 14px rgba(0,114,255,0.12);
  transform: translateY(-1px);
}

/* --- Selected State (uses .selected from your JS) --- */
#modal-application .option-btn.selected {
  background: linear-gradient(90deg, var(--brand-start), var(--brand-end));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 20px rgba(0,114,255,0.25);
  transform: translateY(-1px);
}


/* --- Textarea Specific Styles --- */
#modal-application .calc-fields textarea {
  resize: vertical; /* Allow vertical resize only */
  min-height: 80px;
  line-height: 1.5;
  font-family: inherit; /* Ensures it uses the same font as other inputs */
}


/* ===========================================
   🧾 Your Debts Step (Dynamic Debt List)
=========================================== */
#appDebtList {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 12px;
}

.debt-item {
  background: var(--glass-deep, rgba(255,255,255,0.9));
  border: 1px solid var(--line, rgba(0,0,0,0.06));
  border-radius: 14px;
  box-shadow: 0 3px 12px rgba(0,0,0,0.05);
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  align-items: end;
  transition: all 0.25s ease;
}

.debt-item:hover {
  box-shadow: 0 4px 16px rgba(0,114,255,0.12);
  transform: translateY(-1px);
}

.debt-item label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink);
}

.debt-item select,
.debt-item input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line, rgba(0,0,0,0.1));
  border-radius: 10px;
  font-size: 0.95rem;
  background: white;
  box-sizing: border-box;
}

.debt-item input:focus,
.debt-item select:focus {
  outline: none;
  border-color: var(--brand-start);
  box-shadow: 0 0 0 2px rgba(0,114,255,0.15);
}

.add-debt {
  background: linear-gradient(90deg, var(--brand-start), var(--brand-end));
  color: white;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  padding: 10px 18px;
  margin-top: 8px;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
}

.add-debt:hover {
  background: linear-gradient(90deg, var(--brand-end), var(--brand-start));
  transform: translateY(-1px);
}

.remove-debt {
  background: none;
  border: none;
  color: #d33;
  font-weight: bold;
  cursor: pointer;
  font-size: 0.95rem;
  align-self: end;
  padding: 4px 0;
  transition: color 0.2s ease;
}

.remove-debt:hover {
  color: #ff5b5b;
}

.app-step[data-step="11b"] .step-sub {
  color: var(--muted);
  margin-bottom: 10px;
  font-size: 0.95rem;
}





/* 🧾 Debt List — All Left-Aligned */
#appDebtList {
  display: flex;
  flex-direction: column;
  align-items: flex-start; /* everything hugs the left */
  gap: 12px;
  margin-top: 12px;
}

#appDebtList .debt-item {
  width: 100%;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #d0d5dd;
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.05);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start; /* ← key */
  text-align: left;        /* ← key */
  gap: 10px;
  transition: all 0.2s ease;
}

#appDebtList .debt-item label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #333;
  text-align: left;
  width: 100%;
}

#appDebtList .debt-item select,
#appDebtList .debt-item input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 14px;
  text-align: left;
  box-sizing: border-box;
}

#appDebtList .remove-debt {
  align-self: flex-start; /* ✅ puts “×” on left */
  background: none;
  border: none;
  color: #e11d48;
  font-size: 20px;
  cursor: pointer;
  margin-top: 4px;
}

#appDebtList .remove-debt:hover {
  color: #ff5b5b;
}

/* Add Debt (+) button also on left */
.add-debt {
  background: #0072ff;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 22px;
  font-weight: bold;
  cursor: pointer;
  margin-top: 10px;
  align-self: flex-end; /* ✅ aligns left */
}







#modal-application .option-btn:hover {
  border-color: var(--brand-start);
  box-shadow: 0 4px 14px rgba(0,114,255,0.12);
  transform: translateY(-1px);
}

/* --- Selected State (uses .selected from your JS) --- */
#modal-application .option-btn.selected {
  background: linear-gradient(90deg, var(--brand-start), var(--brand-end));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 20px rgba(0,114,255,0.25);
  transform: translateY(-1px);
}

.result-card .note {
  font-size: 13px;
  color: #0072ff;
  font-weight: 600;
  margin-top: 4px;
}
.result-card.highlight {
  border: 2px solid #00c6ff;
  box-shadow: 0 0 20px rgba(0,198,255,0.15);
}

/* --- Navigation (Back button) --- */
#modal-application .app-nav {
  justify-content: flex-end; /* Was 'space-between' */
}

#modal-application .prev-btn {
  display: none;
}

#modal-application .prev-btn:hover {
  color: var(--brand-start);
}

/* =====================================================
   🔧 QUICK MOBILE FIXES — Promo bar, Chat, Payoff Section
   ===================================================== */

/* 1️⃣ Promo bar — reduce height & text size */
.promo-bar {
  padding: 8px 10px !important;
  font-size: 13.5px !important;
  line-height: 1.3;
  flex-wrap: wrap;
}
.promo-bar .promo-text {
  text-align: center;
  max-width: 95%;
}

/* 2️⃣ Chat box — consistent internal padding */
.chat-container.chat-collapsed .chat-input,
.chat-container.chat-open .chat-input {
  padding: 8px 10px !important;
  gap: 8px !important;
}

.chat-text {
  padding: 12px 14px !important;
  font-size: 15px !important;
}

.chat-send {
  padding: 10px 16px !important;
  font-size: 14.5px;
  border-radius: 999px;
}

/* 3️⃣ "Pay Off Your Home Loan ASAP" section — add breathing space */
.optimise-section {
  padding-left: 18px !important;
  padding-right: 18px !important;
}

.optimise-inner {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
}

/* Responsive refinements for phones */
@media (max-width: 480px) {
  .promo-bar {
    font-size: 13px !important;
    padding: 6px 8px !important;
  }

  .chat-container {
    width: 92vw;
    border-radius: 14px;
  }

  .optimise-section {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  .optimise-inner {
    max-width: 100%;
  }
}

/* =====================================================
   ✅ SMART PROMO BAR (compact + allows wrapping)
   ===================================================== */
.promo-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;          /* ✅ allow wrapping */
  gap: 6px;
  padding: 6px 10px;
  background: linear-gradient(90deg, #0072ff, #00c6ff);
  color: #fff;
  font-size: 13.5px;
  line-height: 1.3;
  text-align: center;
  min-height: unset;        /* allow it to grow slightly if 2 lines */
  width: 100%;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  z-index: 9999;
}

.promo-bar .promo-icon {
  font-size: 15px;
  flex-shrink: 0;
}

.promo-bar .promo-text {
  display: inline-block;
  max-width: 90%;
  font-weight: 500;
  text-align: center;
  line-height: 1.3;
}

/* 📱 small screens */
@media (max-width: 480px) {
  .promo-bar {
    font-size: 12.5px;
    padding: 6px 8px;
    gap: 4px;
  }

  .promo-bar .promo-text {
    max-width: 100%;
  }
}

/* =====================================================
   ✅ Fix — "Pay Off Your Home Loan ASAP" centering
   ===================================================== */

/* main section wrapper */
.optimise-section {
  display: flex;
  justify-content: center;
  padding: 0 24px !important;   /* equal gap left & right */
  box-sizing: border-box;
}

/* inner container to keep it centred */
.optimise-inner {
  width: 100%;
  max-width: 680px;             /* you can adjust width if needed */
  margin: 0 auto;
  box-sizing: border-box;
}

/* mobile tweak */
@media (max-width: 480px) {
  .optimise-section {
    padding: 0 16px !important;
  }

  .optimise-inner {
    max-width: 100%;
  }
}

/* === FINAL OVERRIDE: keep the Optimiser box evenly padded & centred === */
@media (max-width: 768px) {
  .optimise-section {
    box-sizing: border-box;
    margin: 48px 16px !important;   /* equal left/right gap from the screen */
    padding: 24px 16px !important;  /* breathing room inside the rounded box */
  }
  .optimise-inner {
    max-width: 680px;
    margin: 0 auto;                  /* center the content inside */
  }
}

@media (min-width: 769px) {
  .optimise-section {
    box-sizing: border-box;
    margin: 60px auto !important;    /* center on larger screens */
    padding: 40px 24px !important;   /* consistent inner padding */
  }
  .optimise-inner {
    max-width: 680px;
    margin: 0 auto;
  }
}

/* ==========================================================
   ✨ BUTTON WEIGHT FIX — remove bold text in Start Application
   ========================================================== */

/* Option buttons */
.option-btn {
  font-weight: 400 !important;  /* make text normal weight */
}

/* Navigation + Big buttons */
.prev-btn,
.next-btn,
.app-step .big-btn {
  font-weight: 400 !important;  /* make all step buttons same clean look */
}

/* ==========================================================
   🧾 PARAGRAPH WEIGHT FIX — Secret Calculators & Cashback Cards
   ========================================================== */

.secret-card p,
.card-top p,
.secret-sub,
.modal-desc {
  font-weight: 400 !important;  /* make paragraphs normal weight */
  color: var(--muted);
  line-height: 1.5;
}

/* Optional: improve spacing consistency across card text */
.secret-card h3 {
  font-weight: 600;
  margin-bottom: 6px;
}

.secret-card .card-icon {
  font-size: 26px;
  margin-bottom: 10px;
}

/* ==========================================================
   💳 Debt Consolidation - Align Debt Fields Side-by-Side
   ========================================================== */
#modal-debt .debt-item {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  align-items: end;
}

#modal-debt .debt-item label {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 4px;
  display: block;
}

#modal-debt .debt-item input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 15px;
  box-sizing: border-box;
}

/* ==========================================================
   💳 Debt Consolidation — Spacing Between Multiple Debt Rows
   ========================================================== */
#modal-debt .debt-container {
  display: flex;
  flex-direction: column;
  gap: 18px; /* spacing between each added debt-item */
}

#modal-debt .debt-item {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  align-items: end;
  background: rgba(255, 255, 255, 0.7);
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

#modal-debt .debt-item label {
  font-weight: 500;
  font-size: 15px;
  margin-bottom: 4px;
  color: var(--ink);
}

#modal-debt .debt-item input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 15px;
  background: #fff;
  box-sizing: border-box;
}

/* ==========================================================
   🧮 CALCULATOR CONSISTENCY FIX — Keep glass style intact
   ========================================================== */

/* Uniform field spacing & padding */
.calc-fields {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Headings + descriptions inside modals */
.modal-title {
  font-size: 26px;
  font-weight: 800;
  color: #0072ff;
  margin-bottom: 6px;
}
.modal-desc {
  font-size: 15px;
  color: #555;
  margin-bottom: 18px;
}

/* Section header and + alignment */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 20px 0 12px;
}
.section-header h4 {
  margin: 0;
  font-size: 16px;
  color: var(--ink);
}

/* + Button placement */
.add-debt,
.add-property {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--brand-start), var(--brand-end));
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(0,114,255,0.25);
  transition: all 0.2s ease;
}
.add-debt:hover,
.add-property:hover {
  transform: scale(1.08);
}

/* Debt & property block consistency */
.debt-item,
.property-block {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  align-items: end;
  padding: 16px;
  border-radius: 12px;
  background: var(--glass); /* keep your soft frosted style */
  border: 1px solid var(--line);
  box-sizing: border-box;
}

/* Proper spacing between dynamic rows */
.debt-container,
#propertyContainer {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Input consistency */
.calc-fields input {
  width: 100%;
  border: 1px solid #d0d8e8;
  border-radius: 10px;
  padding: 10px 12px;
  background: #f8faff;
  font-size: 15px;
}

/* Big button uniformity (keep your gradient) */
.big-btn {
  width: 100%;
  font-size: 16px;
  font-weight: 500;
  border-radius: 999px;
  padding: 14px 0;
  background: linear-gradient(90deg, #0072ff, #00c6ff);
  color: #fff;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}
.big-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0,114,255,0.25);
}

/* ==========================================================
   🧱 Add Property / Add Debt button below field groups
   ========================================================== */

/* Make sure property/debt blocks stay nicely spaced */
#propertyContainer,
.debt-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 12px;
}

/* ==========================================================
   ✅ FIX — Move + button BELOW and LEFT-ALIGNED (not on top)
   ========================================================== */

.property-actions,
.debt-actions {
  display: flex;
  justify-content: flex-end;   /* 👈 right-aligned */
  margin-top: 14px;             /* space above the + */
  position: relative;
  z-index: 2;                   /* ensures it's above backgrounds but below text */
}

.add-property,
.add-debt {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--brand-start), var(--brand-end));
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(0,114,255,0.25);
  transition: all 0.2s ease;
}

.add-property:hover,
.add-debt:hover {
  transform: scale(1.08);
}

/* ==========================================================
   ✅ FIX — Keep + button fully visible, aligned right, safe hover
   ========================================================== */

.property-actions {
  display: flex;
  justify-content: flex-end;   /* right-aligned */
  margin-top: 16px;
  margin-bottom: 8px;
  padding-right: 4px;          /* keeps it off the border */
  position: relative;
  overflow: visible !important; /* ✅ allow glow + scale to show */
}

.add-property {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--brand-start), var(--brand-end));
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,114,255,0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  transform-origin: center;
  z-index: 2; /* ensures it's above inner shadow */
}

.add-property:hover {
  transform: scale(1.07); /* nice hover bounce */
  box-shadow: 0 8px 18px rgba(0,114,255,0.3);
}

/* ==========================================================
   ✅ Make home page calculator buttons NOT bold
========================================================== */
.secret-calcs .cta-btn,
.lender-secrets .cta-btn {
  font-weight: 500 !important; /* medium weight instead of bold */
}

/* ==========================================================
   ✅ Fix spacing in Debt Consolidation calculator
   (match Financial Freedom’s tighter layout)
========================================================== */
#modal-debt .calc-fields {
  display: flex;
  flex-direction: column;
  gap: 10px !important;   /* tighter vertical spacing between each field */
  margin-bottom: 10px !important;
}

#modal-debt .debt-container {
  display: flex;
  flex-direction: column;
  gap: 12px !important;   /* reduce space between each debt block */
  margin-bottom: 12px !important;
}

#modal-debt .debt-item {
  padding: 12px 14px !important;   /* reduce inner padding */
  background: rgba(255,255,255,0.9);
  border-radius: 10px;
  border: 1px solid rgba(0,114,255,0.1);
  box-shadow: 0 2px 8px rgba(0,114,255,0.05);
}

/* ==========================================================
   ✅ Force compact spacing for Debt Consolidation modal
========================================================== */
#modal-debt .calc-fields {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;                /* tighter field spacing */
  margin-bottom: 8px !important;
}

#modal-debt .calc-fields label {
  margin-bottom: 4px !important;
}

#modal-debt .calc-fields input {
  margin-bottom: 0 !important;        /* remove default extra gaps */
}

#modal-debt .debt-container {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;               /* less space between debt blocks */
  margin-bottom: 8px !important;
}

#modal-debt .debt-item {
  padding: 10px 12px !important;      /* match Financial Freedom density */
  background: rgba(255,255,255,0.9) !important;
  border: 1px solid rgba(0,114,255,0.1) !important;
  border-radius: 10px !important;
  box-shadow: 0 2px 8px rgba(0,114,255,0.05) !important;
}

/* === Fix tighter spacing inside Financial Freedom modal === */
#modal-freedom .slider-group label {
  margin-top: 14px;
  display: block;
}

#modal-freedom .slider-group input {
  margin-bottom: 18px !important;
}

#modal-freedom .slider-group {
  padding: 20px 22px;
}

/* 📏 Perfectly balanced Start Application modal (mobile & desktop) */
#modal-application .modal-dialog {
  width: min(560px, 92vw);         /* consistent width */
  max-height: 80vh;                /* capped height (not full screen) */
  height: auto;                    /* grow naturally with content */
  margin: 8vh auto;                /* visible gap top & bottom */
  border-radius: 20px;
  padding: 28px 26px;
  background: #fff;
  overflow-y: auto;                /* scroll inside if needed */
  box-shadow: 0 10px 40px rgba(0,0,0,0.25);
  position: relative;
  transition: none !important;     /* prevent resize animation */
}

/* Keep background visible when open */
#modal-application .modal-backdrop {
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(6px);
}

/* Prevent whole page from moving */
body.modal-open,
body.no-scroll {
  overflow: hidden;
}

/* Mobile refinement */
@media (max-width: 600px) {
  #modal-application .modal-dialog {
    width: 90vw;
    margin: 6vh auto;
    padding: 22px 18px;
    border-radius: 16px;
    max-height: 78vh;  /* so you always see the backdrop around it */
  }
}

.disclaimer {
  font-weight: 400 !important;   /* remove any bold */
  font-size: 13px;               /* slightly smaller */
  color: #64748b;                /* muted grey tone */
  margin-top: 12px;
  text-align: center;            /* nice alignment */
}

.coach-heading {
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 12px;
}
/* ==========================================================
   ✅ Unify all primary buttons across site (CTAs + Big buttons)
   ========================================================== */
.cta-btn,
.big-btn,
.start-app-wrapper .big-btn,
.next-btn {
  font-size: 16px !important;     /* match "Show My Plan" */
  font-weight: 600 !important;    /* consistent medium weight */
  padding: 14px 0 !important;     /* same vertical height */
  border-radius: 999px !important;/* uniform pill shape */
  background: linear-gradient(90deg, #0072ff, #00c6ff) !important;
  color: #fff !important;
  box-shadow: 0 8px 20px rgba(0,114,255,0.25) !important;
  text-align: center;
  transition: all 0.2s ease;
}

.cta-btn:hover,
.big-btn:hover,
.start-app-wrapper .big-btn:hover,
.next-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(0,114,255,0.32) !important;
}

/* ==========================================================
   🎯 Uniform Calculator Buttons Only (Not Main Hero Buttons)
   ========================================================== */
.modal .big-btn,
.secret-calcs .cta-btn,
.lender-secrets .cta-btn {
  font-size: 16px !important;
  padding: 14px 0 !important;
  font-weight: 600 !important;
  border-radius: 999px !important;
  letter-spacing: 0.3px;
}

/* Keep main site call-to-actions like "Find My AI Options" larger */
.hero .big-btn {
  font-size: 18px !important;
  padding: 16px 36px !important;
  font-weight: 700 !important;
}

/* ==========================================================
   ✅ Final Override — Match All Calculator Buttons
   ========================================================== */
#modal-equity .big-btn,
#modal-savings .big-btn,
#modal-debt .big-btn,
#modal-freedom .big-btn,
#modal-optimise .big-btn {
  font-size: 16px !important;
  padding: 14px 0 !important;
  font-weight: 600 !important;
  border-radius: 999px !important;
  letter-spacing: 0.3px !important;
  white-space: nowrap !important;
}

/* Keep homepage / hero button bigger */
.hero .big-btn,
.start-app-wrapper .big-btn {
  font-size: 18px !important;
  padding: 16px 36px !important;
  font-weight: 700 !important;
}

/* === Footer Links === */
.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  padding: 30px 10px;
  background: transparent;
}

.footer-link {
  all: unset;
  cursor: pointer;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: var(--brand-start);
  text-decoration: underline;
}

/* === Small Info Modals === */
.small-modal {
  max-width: 600px;
  padding: 28px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.25);
  text-align: left;
  line-height: 1.5;
}

.small-modal h2 {
  margin-bottom: 12px;
  color: var(--brand-start);
  font-weight: 700;
}

.small-modal p {
  color: #334155;
  font-size: 15px;
  font-weight: 400;
}
.small-modal li {
  color: #334155;
  font-size: 15px;
  font-weight: 400;
}

.remove-debt {
  position: absolute;
  top: 6px;
  right: 8px;
  background: none;
  border: none;
  color: #333;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.remove-debt:hover {
  opacity: 1;
}

.debt-item {
  position: relative;
  padding: 10px 0;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

/* ==========================================================
   ✅ FINAL FIX — Vertical layout + Left-aligned titles
========================================================== */
#propertyContainer .property-block {
  display: flex;
  flex-direction: column; /* stack fields vertically */
  align-items: flex-start; /* left-align everything */
  text-align: left;
  gap: 12px;
  background: rgba(255,255,255,0.95);
  border: 1px solid rgba(0,114,255,0.12);
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 14px;
  position: relative;
  box-sizing: border-box;
}

#propertyContainer .property-block label {
  font-size: 15px;
  font-weight: 600;
  color: #333;
  margin-bottom: 4px;
  text-align: left;          /* ensure label text stays left */
  width: 100%;               /* makes text alignment apply cleanly */
}

#propertyContainer .property-block input {
  width: 100%;
  border: 1px solid #d0d8e8;
  border-radius: 10px;
  padding: 10px 12px;
  background: #f8faff;
  font-size: 15px;
  color: var(--ink);
  box-sizing: border-box;
  text-align: left;          /* aligns input text to left */
}

#propertyContainer .remove-property {
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 20px;
  line-height: 1;
  color: #64748b;
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
#propertyContainer .remove-property:hover {
  opacity: 1;
  transform: scale(1.1);
}

/* === Booking button (matches your gradient buttons) === */
.book-btn {
  all: unset;
  display: inline-block;
  padding: 14px 22px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand-start), var(--brand-end));
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0,114,255,0.25);
  transition: transform .2s ease, box-shadow .2s ease;
}
.book-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(0,114,255,0.32);
}
.book-btn--full { width: 100%; }

/* ==========================================================
   🔧 BOOKING CTA — Match .big-btn Styling
========================================================== */
.book-cta {
  display: inline-block;
  width: 100%;
  padding: 16px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 16px;
  color: #fff;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  background: linear-gradient(90deg, var(--brand-start), var(--brand-end));
  box-shadow: 0 8px 20px rgba(0,114,255,0.25);
  transition: all 0.25s ease;
  margin-top: 14px;
}

.book-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(0,114,255,0.32);
}

.book-cta:active {
  transform: scale(0.98);
  box-shadow: 0 4px 12px rgba(0,114,255,0.25);
}

#bookAfterResults {
  margin-top: 18px;
  text-align: center;
}

.find-ai-cta {
  font-size: 15px;
  margin-top: 12px;
}

/* === Fix squished Next/Back buttons inside modal application === */
.app-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
}

.app-nav button {
  flex: 1;
  padding: 12px 16px;
  font-size: 15px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.app-nav .prev-btn {
  background: #e0e7ff;
  color: #1e3a8a;
}

.app-nav .next-btn {
  background: linear-gradient(90deg, var(--brand-start), var(--brand-end));
  color: white;
  font-weight: 600;
}

.app-nav button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

/* ==========================================================
   🔧 Fix — "+ Add Debt" button alignment inside AI modal only
========================================================== */
/* ==========================================================
   ✅ Align "+ Add Debt" button to right — Step 11b only
========================================================== */
#modal-application .debt-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
  margin-bottom: 8px;
}

#modal-application .add-debt {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--brand-start), var(--brand-end));
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(0,114,255,0.25);
  transition: all 0.25s ease;
}

#modal-application .add-debt:hover {
  transform: scale(1.08);
  box-shadow: 0 10px 22px rgba(0,114,255,0.35);
}

/* ==========================================================
   ✅ Match remove "×" in application debts with modal close
========================================================== */
#modal-application .remove-debt {
  background: none;
  border: none;
  color: #999;
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
  position: absolute;
  top: 8px;
  right: 10px;
  transition: color 0.2s ease;
}

#modal-application .remove-debt:hover {
  color: var(--brand-start);
}



/* ✅ Mobile-friendly scaling */
@media (max-width: 480px) {
  .app-nav {
    flex-direction: column;
  }
  .app-nav button {
    width: 100%;
  }
}


/* Responsive adjustments for mobile */
@media (max-width: 480px) {
  .book-cta {
    font-size: 15px;
    padding: 14px 18px;
  }
}

/* === FINAL CHATBOX MOBILE FIX — equal padding on both sides === */
/* ✅ FINAL OVERRIDE — Center chatbox perfectly on mobile */
/* ==========================================================
   ✅ Center Chatbox on Mobile (Fix skewed alignment)
========================================================== */
@media (max-width: 600px) {
  .chat-container.is-docked {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 22px !important;
    margin: 0 auto !important;
    width: auto !important;
    max-width: 90vw !important;
    transform: none !important;
    border-radius: 18px !important;
    box-sizing: border-box !important;
  }

  .chat-fab {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 20px !important;
    margin: 0 auto !important;
    transform: none !important;
  }
}

