/* ============================================================
   ENABLE_INSTANT_ESTIMATE = false

   Suppresses every entry point to /calculator while the instant roof
   estimate is offline for maintenance. Nobody should reach the
   maintenance page from a link on our own site.

   This file is linked by scripts/estimate-offline.js, which inserts the
   <link> tag on every page. Nothing in the HTML copy is rewritten, so
   turning the estimate back on is `node scripts/estimate-offline.js on`
   plus deleting this file. See netlify.toml for the full procedure.

   Every rule below checks for a calculator link before hiding anything,
   so reusing one of these components for something else does not make
   it disappear.
   ============================================================ */

/* --- Blocks whose only purpose is the calculator --- */

/* Nav dropdown item and footer item. Hiding the <a> alone would leave a
   gap in both lists, so the <li> goes with it. */
li:has(> a[href^="/calculator"]) { display: none !important; }

/* Standalone links and buttons: mobile nav submenu, city-page hero
   secondary CTA, blog CTA buttons, estimator teaser button, and the
   pricing configurator's back link. */
a.nav__mobile-submenu-link[href^="/calculator"],
a.btn[href^="/calculator"],
a.et__btn[href^="/calculator"],
a.pricing-back[href^="/calculator"] { display: none !important; }

/* Whole sections and cards that exist only to sell the estimate. Left
   in the HTML, hidden here: the estimator teaser band on 11 pages, the
   blog sidebar rail card, the blog inline CTA card, the blog
   end-of-article banner, and the free-second-opinion tie-in. */
section.et:has(a[href^="/calculator"]),
.blog-rail__card--est:has(a[href^="/calculator"]),
.blog-inline-cta:has(a[href^="/calculator"]),
section.cta-banner:has(a[href^="/calculator"]),
section:has(> .container > .calc-feature) { display: none !important; }

/* --- Links left in place are dead on click --- */

/* 25 bare anchors sit mid-sentence in blog and city-page prose. Hiding
   them would punch holes in the copy, so they stay visible and stop
   behaving like links. Keyboard and screen-reader users can still
   reach them, and they land on the maintenance page, which is fine. */
a[href^="/calculator"] {
  pointer-events: none;
  cursor: text;
  color: inherit;
  text-decoration: none;
}
