/* Fire calculator — site integration. Loaded AFTER style.scoped.css.
   Only neutralises site (Bootstrap 5 + frontend-app-v2) rules leaking INTO
   .fire-calc-root, plus mobile/sticky offsets. No calculator design here. */

/* Bootstrap reboot + .btn/.card/.badge collide with calculator class names */
.fire-calc-root .btn { display: inline-block; line-height: 1.45; text-decoration: none; vertical-align: middle; user-select: none; transition: none; }
.fire-calc-root .card { position: static; min-width: 0; word-wrap: normal; background-clip: border-box; }
.fire-calc-root .badge { line-height: 1.4; text-align: left; white-space: normal; vertical-align: middle; }
.fire-calc-root button, .fire-calc-root input, .fire-calc-root select, .fire-calc-root textarea { font-family: inherit; text-transform: none; }
.fire-calc-root label { display: inline; margin-bottom: 0; }
.fire-calc-root .field-label, .fire-calc-root .step-title label { display: block; }
.fire-calc-root .checkbox-row, .fire-calc-root .radio-chip { display: flex; }
.fire-calc-root h1, .fire-calc-root h2, .fire-calc-root h3 { margin-top: 0; }
.fire-calc-root p { margin-top: 0; }
.fire-calc-root ul { margin-top: 0; }
.fire-calc-root table { caption-side: top; }
.fire-calc-root summary { display: list-item; }
.fire-calc-root a { text-decoration: none; }
.fire-calc-root .mobile-total { text-decoration: none; }

/* Site desktop nav (.my_nav) is not sticky/fixed; keep calculator offset */
@media (min-width: 901px) {
  .fire-calc-root .results { top: 16px; }
}

/* Calculator bar above site mobile bottom nav (<768px). Nav is 64px, but
   its centre badge (50px + 3px margin + ~13px label + 4+4px padding,
   translateY(-8px)) reaches ~82px above the viewport bottom at centre,
   so the bar sits at 88px to clear it; WhatsApp lifted by the same 24px. */
@media (max-width: 767.98px) {
  .fire-calc-root #mobileTotalBar.mobile-total:not(.hidden) { bottom: calc(88px + env(safe-area-inset-bottom, 0px)); }
  body:has(.fire-calc-root) .floating_btn { bottom: 156px; }
}
@media (max-width: 900px) {
  body:has(.fire-calc-root) { padding-bottom: 128px; }
}

/* Title band: sits inside the calculator container (same width/gutter as .layout), no logo (site nav already has it). */
.fire-calc-root .topbar {
  width: calc(100% - 40px);
  max-width: 1240px;
  margin: 20px auto 0;
  border-radius: var(--radius);
  gap: 16px;
  padding: 16px 20px;
}
.fire-calc-root .topbar .brand-mark { display: none; }
.fire-calc-root .topbar .brand { min-width: 0; }
.fire-calc-root .topbar .brand-name { font-size: 18px; font-weight: 700; color: #fff; line-height: 1.3; }
.fire-calc-root .topbar .brand-sub { font-size: 13px; color: #b9c8e0; margin-top: 2px; }
.fire-calc-root .topbar #resetBtn { flex-shrink: 0; white-space: nowrap; }
@media (max-width: 900px) {
  .fire-calc-root .topbar { width: calc(100% - 32px); margin-top: 16px; }
}
@media (max-width: 520px) {
  .fire-calc-root .topbar { padding: 12px 14px; gap: 12px; }
  .fire-calc-root .topbar .brand-name { font-size: 16px; }
  .fire-calc-root .topbar .brand-sub { font-size: 12px; }
  .fire-calc-root .topbar #resetBtn { padding: 7px 12px; font-size: 13px; }
}
