/* =====================================================================
   Canadian Mortgage Calculator — scoped styles
   ---------------------------------------------------------------------
   ADDITIVE ONLY. This stylesheet is loaded AFTER the site-wide
   /styles.css and every rule is scoped under .mc-* class names, so it
   cannot alter any existing page or component. It reuses the existing
   design tokens (var(--navy), var(--gold), etc.) defined in styles.css
   so the calculator matches the site's colours, type, spacing, and
   radii automatically.
   ===================================================================== */

/* Page intro reuses the existing .blog-hero component; only a small
   supporting caption is added here. */
.mc-hero-note {
  color: #c6d0e0;
  font-size: 16px;
  line-height: 1.6;
  max-width: 640px;
  margin: 14px 0 0;
}

.mc-section { padding: 72px 0 90px; background: var(--cream); }

.mc-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}

/* Card surface — matches the site's white cards (.contact-card etc.) */
.mc-panel {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 34px;
  box-shadow: var(--shadow-sm);
}
.mc-panel h2 {
  color: var(--navy);
  font-size: 26px;
  margin-bottom: 6px;
}
.mc-panel-sub {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

/* Inputs: the calculator borrows the existing .lead-form field styling.
   These rules only add layout helpers specific to the calculator. */
.mc-form .field { margin-bottom: 16px; }
.mc-linked {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 14px;
}
.mc-hint {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0;
  text-transform: none;
  font-weight: 500;
}

/* Validation messages */
.mc-errors {
  margin: 4px 0 16px;
  padding: 14px 16px 14px 18px;
  background: #fdf3f2;
  border: 1px solid #f0c9c4;
  border-left: 3px solid #c0392b;
  border-radius: 14px;
  color: #7d2b21;
  font-size: 14px;
  line-height: 1.55;
}
.mc-errors li { margin: 2px 0; }

/* ===== Results ===== */
.mc-results { position: sticky; top: 96px; }

.mc-payment {
  background:
    radial-gradient(circle at 86% 16%, rgba(242, 193, 78, 0.22), transparent 34%),
    linear-gradient(135deg, var(--navy), #10284f);
  color: #fff;
  border-radius: 22px;
  padding: 28px 30px;
  margin-bottom: 22px;
}
.mc-payment .mc-payment-label {
  color: var(--gold);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin: 0 0 8px;
}
.mc-payment .mc-payment-value {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(38px, 6vw, 52px);
  line-height: 1;
  color: #f7f3ea;
}
.mc-payment .mc-payment-freq {
  display: block;
  margin-top: 8px;
  color: #cdd6e6;
  font-size: 14px;
  font-weight: 600;
}

.mc-rows { margin: 0; }
.mc-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
}
.mc-row:last-child { border-bottom: 0; }
.mc-row dt {
  color: var(--muted);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}
.mc-row dd {
  margin: 0;
  color: var(--navy);
  font-weight: 700;
  font-size: 17px;
  text-align: right;
  white-space: nowrap;
}
.mc-row-total {
  margin-top: 6px;
  padding-top: 16px;
  border-top: 2px solid var(--navy);
  border-bottom: 0;
}
.mc-row-total dt { color: var(--navy); }
.mc-row-total dd {
  font-family: var(--display);
  font-size: 22px;
}

/* Notes (insurance / minimum down payment / accelerated payoff) */
.mc-notes { margin: 20px 0 0; padding: 0; }
.mc-notes li {
  position: relative;
  padding: 10px 14px 10px 16px;
  margin-top: 10px;
  background: var(--cream-deep);
  border-left: 3px solid var(--gold);
  border-radius: 12px;
  color: var(--text);
  font-size: 13.5px;
  line-height: 1.55;
}

/* Disclaimer */
.mc-disclaimer {
  margin: 30px auto 0;
  max-width: 900px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.7;
  text-align: center;
}

/* ===== CTA + optional lead form ===== */
.mc-cta {
  margin-top: 40px;
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius);
  padding: 44px;
}
.mc-cta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}
.mc-cta h2 { color: var(--white); font-size: clamp(26px, 3.4vw, 38px); margin-bottom: 14px; }
.mc-cta p { color: #d7deec; font-size: 17px; line-height: 1.7; margin: 0 0 10px; }
.mc-optional-tag {
  display: inline-block;
  margin-bottom: 14px;
  color: var(--gold);
  background: rgba(242, 193, 78, 0.14);
  border: 1px solid rgba(242, 193, 78, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 11px;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: 999px;
}

/* The optional form sits on the white card so the .lead-form styling reads
   exactly like the site's contact form. */
.mc-form-card {
  background: var(--white);
  color: var(--text);
  border-radius: 22px;
  padding: 30px;
  box-shadow: var(--shadow);
}

/* Consent row — additive checkbox styling that respects existing focus ring */
.mc-consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 6px 0 4px;
}
.mc-consent input[type="checkbox"] {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--gold);
  cursor: pointer;
}
.mc-consent label {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.55;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 500;
  color: var(--muted);
}

/* ===== Responsive ===== */
@media (max-width: 1080px) {
  .mc-layout,
  .mc-cta-grid { grid-template-columns: 1fr; }
  .mc-results { position: static; }
}

@media (max-width: 640px) {
  .mc-section { padding: 56px 0 72px; }
  .mc-panel,
  .mc-cta,
  .mc-form-card { padding: 26px; }
  .mc-linked { grid-template-columns: 1fr; gap: 0; }
  .mc-linked .field { margin-bottom: 16px; }
  .mc-payment { padding: 24px; }
}
