/* =====================================================================
   fc-wp.css: fitting the new pages into WordPress and Divi. Loaded on
   switched pages only (body.fc-kit-page), AFTER the page's kit CSS.

   A. The theme's own header, footer and back-to-top button, and the
      floating widgets (My Sticky Bar, Monarch, Bloom, MailerLite's pop-up
      bar; the retune.so chat bubble only on pages with an "Ask Dr. V's
      chatbot" button, until it is pressed) are hidden: the new page brings
      its own header, footer and booking bar.
   B. Divi's page wrappers get out of the way (no top padding for the old
      fixed header, nothing that would stop the new header from sticking,
      no section or row padding around the pasted page).
   C. The page root sits outside the kit's box-sizing reset, as in the
      previews (Divi makes every element border-box).
   ===================================================================== */

/* ---------- A. Theme chrome and floating widgets ---------- */
body.fc-kit-page #top-header,
body.fc-kit-page #main-header,
body.fc-kit-page #main-footer,
body.fc-kit-page .et_pb_scroll_top,
body.fc-kit-page .mysticky-welcomebar-fixed,
body.fc-kit-page .mysticky-welcomebar-fixed-wrap,
body.fc-kit-page .et_social_sidebar_networks,
body.fc-kit-page .et_social_mobile_button,
body.fc-kit-page .et_social_mobile,
body.fc-kit-page .et_social_pin_images_outer,
body.fc-kit-page .et_social_flyin,
body.fc-kit-page .et_social_popup,
body.fc-kit-page .et_bloom_popup,
body.fc-kit-page .et_bloom_flyin,
body.fc-kit-page .et_bloom_optin {
  display: none !important;
}
/* The retune.so chat bubble waits for "Ask Dr. V's chatbot" only on pages with that button (or when the kit is built
   with chat_bubble 'hide'); elsewhere the body has fcsk-chat-keep and the bubble stays as on the old page. */
html:not(.fcsk-chat-on) body.fc-kit-page:not(.fcsk-chat-keep) iframe[src*="retune"],
html:not(.fcsk-chat-on) body.fc-kit-page:not(.fcsk-chat-keep) [id^="retune-"],
html:not(.fcsk-chat-on) body.fc-kit-page:not(.fcsk-chat-keep) [class*="retune"] {
  display: none !important;
}
/* MailerLite pop-ups (the site-wide green "Book your FREE 15-minute call" bar; 2.0.2): kit.php leaves their loader out
   of switched pages; this is the backup for an old cached copy or a loader added some other way. universal.js appends a
   bare iframe from assets.mailerlite.com, and an overlay div just before it, to <body>. The kit's own e-book form is not
   touched (it sits inside .fc-page and sends a JSONP request, a script, never an iframe; 2.0.3). Two rules, so a
   browser without :has() still hides the bar.
   The overlay rule only matches a div with no id and no class (MailerLite's overlay has neither), so it can never hit
   the chat bubble (div#retune-chat-button) if a future pop-up arrives without its overlay. */
body.fc-kit-page > iframe[src*="assets.mailerlite.com/jsonp/"] {
  display: none !important;
}
body.fc-kit-page > div:not([id]):not([class]):has(+ iframe[src*="assets.mailerlite.com/jsonp/"]) {
  display: none !important;
}
/* A Theme Builder header or footer is hidden too, unless it is the kit's own. */
body.fc-kit-page .et-l--header:not(:has(.fc-header)),
body.fc-kit-page .et-l--footer:not(:has(.fc-footer)) {
  display: none !important;
}

/* ---------- B. Wrappers ---------- */
body.fc-kit-page {
  margin-top: 0 !important;
  padding-top: 0 !important;
  background-color: #F7F1E8;
}
body.fc-kit-page #page-container {
  padding-top: 0 !important;
  margin-top: 0 !important;
  overflow: visible !important;
  background: transparent;
}
body.fc-kit-page #et-main-area,
body.fc-kit-page #main-content {
  overflow: visible !important;
  background: transparent;
}
/* Whatever Divi section, row, column or module holds the pasted page: no padding, no width cap, no background,
   nothing that clips (a clipping wrapper would stop the new header from sticking). */
body.fc-kit-page :is(article, .entry-content, .et-l, .et_builder_inner_content, .et_pb_section, .et_pb_row, .et_pb_column, .et_pb_module, .et_pb_code_inner):has(.fc-page) {
  padding: 0 !important;
  margin: 0 !important;
  width: 100% !important;
  max-width: none !important;
  float: none !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  overflow: visible !important;
  /* any of these on a wrapper would pin the phone booking bar to the wrapper instead of the screen */
  transform: none !important;
  filter: none !important;
  perspective: none !important;
  contain: none !important;
  will-change: auto !important;
}
/* The new header sticks under the WordPress admin bar when an editor is logged in. */
@media (min-width: 601px) {
  body.admin-bar.fc-kit-page .fc-header:not(#fc-wp-boost) { top: var(--wp-admin--admin-bar--height, 32px); }
}

/* ---------- C. Page root ---------- */
.fc-page:not(#fc-wp-boost) {
  box-sizing: content-box;
}

/* ---------- D. Phone menu and booking bar (2.0.9.1, Dr. V on his Android phone, 2026-10-12) ---------- */
/* Scrolled down, the header turns condensed and gets a frosted backdrop-filter. A backdrop-filter makes the header the
   containing block of every position: fixed box inside it, so the Menu drawer (fixed, top: var(--fc-hh), bottom: 0)
   was measured against the 60 px header and opened 9 px tall: "Close" showed, the menu did not. While the drawer is
   open the header has no filter (and a solid background), so the drawer fills the screen again. */
html.fc-nav-open .fc-header:not(#fc-wp-boost) { -webkit-backdrop-filter: none; backdrop-filter: none; }
html.fc-nav-open .fc-header.fc-is-condensed:not(#fc-wp-boost) { background: var(--fc-paper); }
/* The retune.so chat bubble (50 px, 20 px from the right edge) sat on the end of the phone booking bar's "Book a free
   call" button. On pages that keep the bubble (not the quiet self-check pages), the bar leaves 80 px free on its right;
   the buttons' side padding is a little smaller; the 17 px text stays the same and fits on one line from 320 px. */
@media (max-width: 767.98px) {
  body.fc-kit-page.fcsk-chat-keep:not(.fcsk-quiet) .fc-bbar:not(#fc-wp-boost) { padding-right: 80px; }
  body.fc-kit-page.fcsk-chat-keep:not(.fcsk-quiet) .fc-page .fc-bbar__call:not(#fc-wp-boost) { padding: 0 14px; }
  body.fc-kit-page.fcsk-chat-keep:not(.fcsk-quiet) .fc-bbar__book:not(#fc-wp-boost) { padding: 0 12px; }
}
