/* =============================================================
   CALCULATOR.CSS — Citizens Reverse Mortgage.
   Conditionally enqueued for the page with slug "calculator".
   Page-specific layout for the 4 wireframe sections.
   ============================================================= */

/* ── SECTION 01 — CALCULATOR HERO (centered) ─────────────── */
.calc-hero {
  position: relative;
  background: var(--grad-hero);
  color: #fff;
  padding-block: clamp(56px, 7vw, 100px);
  overflow: hidden;
  text-align: center;
}
.calc-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      620px circle at 50% -8%,
      rgba(184, 148, 58, 0.26),
      transparent 58%
    ),
    radial-gradient(
      440px circle at 90% 100%,
      rgba(61, 122, 138, 0.24),
      transparent 60%
    );
  pointer-events: none;
}
.calc-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(
    rgba(255, 255, 255, 0.06) 1px,
    transparent 1px
  );
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(circle at 50% 40%, #000, transparent 75%);
  mask-image: radial-gradient(circle at 50% 40%, #000, transparent 75%);
  pointer-events: none;
}
.calc-hero__inner {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin-inline: auto;
}
.calc-hero__eyebrow {
  color: var(--gold-soft);
}
.calc-hero h1 {
  color: #fff;
  margin-bottom: var(--space-md);
}
.calc-hero__sub {
  font-size: clamp(21px, 1.9vw, 25px);
  color: #d8e0f2;
  margin-bottom: 0;
}

/* ── SECTION 02 — CALCULATOR TOOL ────────────────────────── */
/* 2-step calculator: left column = our fields -> GHL form -> thank-you; right = results. */
.rm-calc__pane[hidden] { display: none; }
.rm-calc__form { display: flex; flex-direction: column; gap: var(--space-md); }
.rm-field__opt { font-weight: 400; color: var(--text-mid); }
.rm-calc__form-lead { font-weight: 700; color: var(--text-dark); margin-bottom: var(--space-sm); }
.rm-calc__back {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: 0;
  padding: 4px 0;
  margin-bottom: var(--space-sm);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 16px;
  color: var(--teal);
  cursor: pointer;
}
.rm-calc__back:hover { 
  color: var(--navy);
  background: none;
}

.calc-embed { width: 100%; }
.calc-embed iframe {
  display: block;
  width: 100%;
  min-height: 760px;
  border: 0;
  border-radius: var(--radius-sm);
}

/* Confirmation pane (after the GHL form is submitted). */
.rm-calc__done {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 340px;
  gap: var(--space-sm);
}
.rm-calc__done-icon { font-size: 40px; color: var(--gold); }

/* Right column: placeholder text until the estimate is revealed. */
.rm-calc__placeholder { font-size: 17px; opacity: 0.75; }
.rm-calc__results.is-revealed .rm-calc__placeholder { display: none; }

.rm-calc {
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: 1040px;
  margin-inline: auto;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.rm-calc__inputs,
.rm-calc__results {
  padding: clamp(24px, 3vw, 44px);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}
.rm-calc__results {
  background: var(--grad-navy);
  color: #fff;
}

.rm-field label {
  display: block;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 6px;
  font-size: 17px;
}
.rm-field input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--cool-gray);
  border-radius: var(--radius-sm);
  font-size: 18px;
  font-family: var(--font-body);
  color: var(--text-dark);
  background: var(--bg);
}
.rm-field input:focus,
.rm-field input:hover {
  outline: none !important;
  border: 1px solid var(--gold) !important;
  box-shadow: none;
  background: #fff;
}
.rm-field small {
  display: block;
  margin-top: 6px;
  font-size: 14.5px;
  color: var(--text-mid);
  line-height: 1.5;
}
.rm-field__money {
  position: relative;
}
.rm-field__money span {
  position: absolute;
  left: 14px;
  top: 50%;
  color: var(--text-mid);
  font-weight: 600;
  font-size: 18px;
  transform: translateY(-50%);
}
.rm-field__money input {
  padding-left: 28px;
}
.rm-calc__submit {
  margin-top: 4px;
  align-self: flex-start;
}
.rm-calc__error {
  color: #dc2626;
  font-size: 15px;
  font-weight: 600;
  margin: 0;
}

.rm-calc__result-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 13.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold-light);
}
.rm-calc__result-value {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
  margin: 2px 0 4px;
}
.rm-calc__result small {
  color: #aebbd6;
  font-size: 14.5px;
  line-height: 1.5;
  display: block;
}
.rm-calc__result--feature .rm-calc__result-value {
  color: var(--gold-light);
}
.rm-calc__disclaimer {
  font-size: 13px;
  color: #8fa0c0;
  margin: auto 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: var(--space-sm);
  line-height: 1.5;
}

@media (max-width: 760px) {
  .rm-calc {
    grid-template-columns: 1fr;
  }
}

/* ── SECTION 04 — CONSULTATION BRIDGE (navy, centered) ───── */
.calc-bridge__inner {
  max-width: 760px;
  margin-inline: auto;
  text-align: center;
}
.calc-bridge p {
  font-size: clamp(20px, 1.7vw, 24px);
  color: #dce3f2;
}
.calc-bridge__ctas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-sm);
  margin: var(--space-lg) 0 var(--space-md);
}
.calc-bridge__note {
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.03em;
  color: #9fb0d0;
  margin-bottom: 0;
}

.calc-embed iframe {
  min-height: auto !important;
}