/* PermitMyHouse Estimate Calculator — by endupla.com
   Fonts: Aeonik (body, 18px base / minimum) + Copernicus (titles), both embedded
   in the WordPress theme and referenced here by name.
   Every class is prefixed (pmh-) AND scoped under .pmh-calc, so neither the
   theme nor any other plugin can leak styles in or out. */

.pmh-calc, .pmh-calc *, .pmh-calc *::before, .pmh-calc *::after { box-sizing: border-box; }

.pmh-calc {
  --pmh-bg:        #FFFFF0;
  --pmh-card:      #ffffff;
  --pmh-border:    #e5e7eb;
  --pmh-text:      #1f2937;
  --pmh-heading:   #111827;
  --pmh-muted:     #6b7280;
  --pmh-blue:      #2563eb;
  --pmh-blue-bar:  #2d7bf4;
  --pmh-blue-soft: #eaf2fd;
  --pmh-price:     #3b82f6;
  --pmh-gray-btn:  #64748b;
  --pmh-gray-btn-h:#52606d;
  --pmh-red:       #dc2626;
  --pmh-green:     #16a34a;
  --pmh-shadow:    0 1px 3px rgba(17,24,39,.06), 0 6px 18px rgba(17,24,39,.05);

  --pmh-font:       'Aeonik', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --pmh-font-title: 'Copernicus', Georgia, 'Times New Roman', serif;

  font-family: var(--pmh-font);
  color: var(--pmh-text);
  background: var(--pmh-bg);
  line-height: 1.5;
  font-size: 18px;               /* base + minimum text size */
  -webkit-text-size-adjust: 100%;
}

.pmh-calc .pmh-wrap { max-width: 1040px; margin: 0 auto; padding: 1.6rem 1.4rem 3rem; }

/* Reset elements we render, so theme base styles don't bleed in */
.pmh-calc h3 { margin: 0; padding: 0; font-family: var(--pmh-font-title); }
.pmh-calc p { margin: 0; }
.pmh-calc ul { margin: 0; padding: 0; list-style: none; }
.pmh-calc label { margin: 0; }

/* Progress bar */
.pmh-calc .pmh-progress-label { font-size: 18px; font-weight: 600; color: var(--pmh-heading); margin-bottom: .55rem; }
.pmh-calc .pmh-progress-track { height: 28px; background: #e2e8f0; border-radius: 5px; overflow: hidden; }
.pmh-calc .pmh-progress-fill {
  height: 100%; background: var(--pmh-blue-bar);
  display: flex; align-items: center; justify-content: flex-end;
  color: #fff; font-size: 18px; font-weight: 600; padding-right: .7rem; border-radius: 5px;
  transition: width .35s ease;
}

/* Step panes */
.pmh-calc .pmh-step-pane { display: none; }
.pmh-calc .pmh-step-pane.pmh-active { display: block; animation: pmh-fadeUp .3s ease; }
@keyframes pmh-fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* Cards */
.pmh-calc .pmh-card { background: var(--pmh-card); border: 1px solid var(--pmh-border); border-radius: 12px; box-shadow: var(--pmh-shadow); padding: 1.6rem 1.8rem; margin-top: 1.4rem; }
.pmh-calc .pmh-card-title { font-family: var(--pmh-font-title); font-size: 24px; font-weight: 700; color: var(--pmh-heading); margin-bottom: 1.2rem; line-height: 1.25; }

/* Form fields */
.pmh-calc .pmh-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem 1.4rem; }
.pmh-calc .pmh-field { display: flex; flex-direction: column; }
.pmh-calc .pmh-fl { font-size: 18px; font-weight: 600; color: var(--pmh-heading); margin-bottom: .4rem; display: block; }
.pmh-calc .pmh-req { color: var(--pmh-red); margin-left: 2px; }
.pmh-calc .pmh-field input[type="text"],
.pmh-calc .pmh-field input[type="email"],
.pmh-calc .pmh-field input[type="tel"],
.pmh-calc .pmh-field input[type="number"],
.pmh-calc .pmh-final-block textarea {
  width: 100%; padding: .6rem .8rem; border: 1px solid var(--pmh-border); border-radius: 7px;
  font-size: 18px; font-family: inherit; color: var(--pmh-text); background: #fff;
  transition: border-color .15s, box-shadow .15s; line-height: 1.4; box-shadow: none;
}
.pmh-calc input::placeholder, .pmh-calc textarea::placeholder { color: #9ca3af; opacity: 1; }
.pmh-calc .pmh-field input:focus, .pmh-calc .pmh-final-block textarea:focus { outline: none; border-color: var(--pmh-blue); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.pmh-calc .pmh-field.pmh-invalid input { border-color: var(--pmh-red); }
.pmh-calc .pmh-err-msg { display: none; color: var(--pmh-red); font-size: 18px; margin-top: .35rem; }
.pmh-calc .pmh-field.pmh-invalid .pmh-err-msg { display: block; }

/* Service rows */
.pmh-calc .pmh-opt-row { display: flex; align-items: center; gap: .6rem; padding: .5rem 0; cursor: pointer; }
.pmh-calc .pmh-opt-row input[type="checkbox"], .pmh-calc .pmh-opt-row input[type="radio"] { width: 18px; height: 18px; accent-color: var(--pmh-blue); flex-shrink: 0; cursor: pointer; margin: 0; }
.pmh-calc .pmh-opt-row.pmh-disabled { opacity: .4; pointer-events: none; }
.pmh-calc .pmh-opt-title { font-size: 18px; font-weight: 400; color: var(--pmh-text); }
.pmh-calc .pmh-opt-dots { flex: 1 1 auto; border-bottom: 1px dotted #cbd5e1; margin: 0 .4rem; position: relative; top: -.18em; }
.pmh-calc .pmh-opt-price { font-size: 18px; font-weight: 600; color: var(--pmh-price); white-space: nowrap; }

/* Inline sub-fields */
.pmh-calc .pmh-sub-grid { display: grid; grid-template-columns: 1fr auto; gap: 1.4rem; align-items: start; margin-bottom: 1rem; }
.pmh-calc .pmh-sub-grid .pmh-field { max-width: 100%; }

/* Segmented toggle */
.pmh-calc .pmh-seg-group { display: inline-flex; border: 1px solid var(--pmh-border); border-radius: 7px; overflow: hidden; }
.pmh-calc .pmh-seg { position: relative; cursor: pointer; margin: 0; }
.pmh-calc .pmh-seg input { position: absolute; inset: 0; opacity: 0; cursor: pointer; margin: 0; }
.pmh-calc .pmh-seg span { display: block; padding: .55rem 1.3rem; font-size: 18px; font-weight: 600; color: var(--pmh-muted); background: #fff; transition: .15s; }
.pmh-calc .pmh-seg input:checked + span { background: var(--pmh-blue); color: #fff; }
.pmh-calc .pmh-seg + .pmh-seg { border-left: 1px solid var(--pmh-border); }

/* Subtotal */
.pmh-calc .pmh-subtotal-row { display: flex; justify-content: flex-end; align-items: baseline; gap: .6rem; margin-top: 1rem; padding-top: .9rem; border-top: 1px solid #f1f5f9; font-weight: 700; font-size: 18px; color: var(--pmh-heading); }
.pmh-calc .pmh-subtotal-val { color: var(--pmh-blue); font-size: 22px; }

.pmh-calc .pmh-note { font-size: 18px; color: #b45309; font-style: italic; margin-top: .7rem; }
.pmh-calc .pmh-pkg-note { font-size: 18px; color: var(--pmh-muted); margin-bottom: .9rem; }

/* Buttons */
.pmh-calc .pmh-btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; padding: .65rem 1.7rem; border-radius: 999px; font-weight: 600; font-size: 18px; cursor: pointer; border: none; transition: all .15s; font-family: inherit; line-height: 1.2; text-transform: none; letter-spacing: normal; text-decoration: none; box-shadow: none; }
.pmh-calc .pmh-btn-gray { background: var(--pmh-gray-btn); color: #fff; }
.pmh-calc .pmh-btn-gray:hover { background: var(--pmh-gray-btn-h); color: #fff; }
.pmh-calc .pmh-btn-blue { background: var(--pmh-blue); color: #fff; border-radius: 8px; }
.pmh-calc .pmh-btn-blue:hover { background: #1d4ed8; color: #fff; }
.pmh-calc .pmh-btn:disabled { opacity: .6; cursor: default; }

.pmh-calc .pmh-step-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 1.6rem; gap: 1rem; }
.pmh-calc .pmh-step-actions.pmh-end { justify-content: flex-end; }

/* Step 3 — summary */
.pmh-calc .pmh-summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2.2rem; }
.pmh-calc .pmh-sum-h { font-family: var(--pmh-font-title); font-size: 20px; font-weight: 700; color: var(--pmh-heading); margin-bottom: 1rem; }
.pmh-calc .pmh-sum-row { display: flex; gap: .8rem; padding: .35rem 0; font-size: 18px; }
.pmh-calc .pmh-sum-k { width: 165px; flex-shrink: 0; font-weight: 700; color: var(--pmh-heading); }
.pmh-calc .pmh-sum-v { color: var(--pmh-text); }
.pmh-calc .pmh-svc-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .35rem 0; font-size: 18px; }
.pmh-calc .pmh-svc-list li::before { content: "•"; color: var(--pmh-muted); margin-right: .5rem; }
.pmh-calc .pmh-svc-name { flex: 1; }
.pmh-calc .pmh-svc-price { font-weight: 700; color: var(--pmh-heading); white-space: nowrap; }
.pmh-calc .pmh-svc-list .pmh-empty { color: var(--pmh-muted); font-style: italic; }
.pmh-calc .pmh-svc-list .pmh-empty::before { content: ""; margin: 0; }

.pmh-calc .pmh-total-box { display: flex; justify-content: space-between; align-items: center; background: var(--pmh-blue-soft); border-radius: 10px; padding: 1.1rem 1.4rem; margin-top: 1.8rem; }
.pmh-calc .pmh-tb-label { font-weight: 700; color: var(--pmh-heading); font-size: 18px; }
.pmh-calc .pmh-tb-sub { display: block; font-size: 18px; font-weight: 400; color: var(--pmh-muted); margin-top: .25rem; }
.pmh-calc .pmh-tb-amt { font-size: 34px; font-weight: 800; color: var(--pmh-blue); }

/* Closing block: hint + notes */
.pmh-calc .pmh-final-block { margin-top: 1.4rem; }
.pmh-calc .pmh-final-hint { font-size: 18px; color: var(--pmh-muted); margin: 0 0 .9rem; }
.pmh-calc .pmh-final-block textarea { resize: vertical; min-height: 96px; display: block; }

/* Send status */
.pmh-calc .pmh-send-status { display: none; margin-top: 1rem; text-align: center; font-size: 18px; font-weight: 600; color: var(--pmh-red); background: #fef2f2; border: 1px solid #fecaca; border-radius: 8px; padding: .7rem 1rem; }
.pmh-calc .pmh-hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* Privacy message */
.pmh-calc .pmh-privacy-msg { display: flex; align-items: center; justify-content: center; gap: .4rem; text-align: center; margin-top: 1.2rem; font-size: 18px; color: var(--pmh-muted); }
.pmh-calc .pmh-privacy-msg svg { width: 16px; height: 16px; flex-shrink: 0; }
.pmh-calc .pmh-privacy-msg a { color: var(--pmh-blue); text-decoration: underline; }

/* Success */
.pmh-calc .pmh-success-overlay { display: none; text-align: center; padding: 2.5rem 1.5rem; }
.pmh-calc .pmh-success-overlay.pmh-show { display: block; animation: pmh-fadeUp .35s ease; }
.pmh-calc .pmh-success-icon { width: 64px; height: 64px; background: #dcfce7; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 1rem; }
.pmh-calc .pmh-success-icon svg { width: 32px; height: 32px; }
.pmh-calc .pmh-success-overlay h3 { font-family: var(--pmh-font-title); font-size: 26px; font-weight: 800; color: var(--pmh-heading); margin-bottom: .5rem; }
.pmh-calc .pmh-success-overlay p { color: var(--pmh-muted); font-size: 18px; }

/* Responsive */
@media (max-width: 760px) {
  .pmh-calc .pmh-grid-3 { grid-template-columns: 1fr; }
  .pmh-calc .pmh-summary-grid { grid-template-columns: 1fr; gap: 1.6rem; }
  .pmh-calc .pmh-sub-grid { grid-template-columns: 1fr; gap: 1rem; }
  .pmh-calc .pmh-total-box { flex-direction: column; gap: .5rem; text-align: center; }
}

/* ── "Talk to an advisor" checkbox ── */
.pmh-calc .pmh-advisor-row {
  display: flex; gap: .6rem; align-items: flex-start; margin-top: 1rem;
  padding: .8rem 1rem; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px;
  cursor: pointer; font-size: .92rem; line-height: 1.4;
}
.pmh-calc .pmh-advisor-row input { margin-top: .2rem; }

/* ── Friendly failure / advisor contact panel ── */
.pmh-calc .pmh-advisor-panel {
  margin-top: 1rem; padding: 1.1rem 1.3rem; border-radius: 12px;
  background: #fff7ed; border: 1px solid #fdba74;
}
.pmh-calc .pmh-advisor-q { margin: 0 0 .8rem; font-weight: 600; color: #7c2d12; }
.pmh-calc .pmh-advisor-actions { display: flex; gap: .6rem; }
.pmh-calc .pmh-advisor-contact { margin-top: 1rem; padding-top: 1rem; border-top: 1px dashed #fdba74; }
.pmh-calc .pmh-advisor-reach { display: flex; flex-wrap: wrap; gap: .8rem; margin: 0 0 .8rem; }
.pmh-calc .pmh-advisor-reach a {
  display: inline-block; padding: .5rem .9rem; border-radius: 8px; font-weight: 600;
  text-decoration: none; background: #2563eb; color: #fff;
}
.pmh-calc .pmh-advisor-reach a.pmh-advisor-wa { background: #22c55e; }
.pmh-calc .pmh-advisor-links { display: flex; flex-wrap: wrap; gap: .3rem 1rem; font-size: .88rem; }
.pmh-calc .pmh-advisor-links a { color: #2563eb; text-decoration: underline; }
.pmh-calc .pmh-advisor-thanks { margin: .8rem 0 0; color: #166534; font-weight: 600; }

/* ── 1.7.0: "Add other services", PE-seal note, reassurance line ── */
.pmh-calc [hidden] { display: none !important; }
.pmh-calc .pmh-other-toggle { display: block; width: 100%; margin-top: 1.4rem; padding: 1rem 1.2rem; background: var(--pmh-card); border: 1px dashed var(--pmh-border); border-radius: 12px; font: inherit; font-weight: 600; font-size: 17px; color: var(--pmh-heading); text-align: left; cursor: pointer; text-transform: none; letter-spacing: normal; box-shadow: none; }
.pmh-calc .pmh-other-toggle:hover, .pmh-calc .pmh-other-toggle:focus { background: var(--pmh-card); color: var(--pmh-heading); border-color: var(--pmh-muted); }
.pmh-calc .pmh-other-toggle span { font-weight: 400; color: var(--pmh-muted); }
.pmh-calc .pmh-reassure { text-align: right; color: var(--pmh-muted); font-size: 15px; margin: .6rem 0 0; }
.pmh-calc .pmh-pe-note { margin-top: .3rem; }

