/* ACS Nov 21 fixes: contain reviews carousel, compact CookieYes bar, demoted headings */

/* Trustindex / Widgets for Google Reviews: do not widen the page */
.ti-widget,
.ti-widget-container,
.ti-reviews-container,
.ti-reviews-container-wrapper,
[class*="ti-widget"] {
  max-width: 100% !important;
  box-sizing: border-box;
}
.ti-widget .ti-reviews-container,
.ti-widget .ti-reviews-container-wrapper,
.ti-widget .ti-controls-container {
  overflow-x: hidden !important;
  max-width: 100% !important;
}

/* CookieYes notice: compact bottom bar so it does not cover hero CTAs or forms */
.cky-consent-container {
  position: fixed !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  top: auto !important;
  width: 100% !important;
  max-width: 100% !important;
  transform: none !important;
  z-index: 999999 !important;
  padding: 0 !important;
  margin: 0 !important;
}
.cky-consent-bar {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  border-radius: 0 !important;
  box-shadow: 0 -4px 18px rgba(15, 42, 68, 0.16) !important;
  padding: 6px 40px 6px 14px !important;
  box-sizing: border-box !important;
}
.cky-consent-bar .cky-notice {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 8px 16px !important;
}
.cky-consent-bar .cky-title {
  font-size: 14px !important;
  margin: 0 !important;
  line-height: 1.3 !important;
}
.cky-consent-bar .cky-notice-des,
.cky-consent-bar .cky-notice-des p {
  display: none !important;
}
.cky-consent-bar .cky-title::after {
  content: ". We use cookies.";
  font-weight: 400;
}
.cky-consent-bar .cky-notice-group {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 8px 16px !important;
  flex: 1 1 auto !important;
}
.cky-consent-bar .cky-banner-btn-close {
  position: absolute !important;
  top: 8px !important;
  right: 8px !important;
}
.cky-consent-bar .cky-title {
  font-size: 13px !important;
}
@media (max-width: 900px) {
  .cky-consent-bar {
    padding: 6px 36px 6px 10px !important;
  }
  .cky-consent-bar .cky-notice {
    gap: 2px 10px !important;
  }
  .cky-consent-bar .cky-title {
    font-size: 13px !important;
  }
  .cky-consent-bar .cky-notice-des,
  .cky-consent-bar .cky-notice-des p {
    font-size: 11px !important;
    line-height: 1.3 !important;
    max-height: 2.7em;
    overflow: hidden;
  }
}

/* Demoted extra H1s should look the same as they did as H1s */
.seo-master-guide .hero-section h2.acs-was-h1,
.cleaning-service-container .service-header h2.acs-was-h1,
h2.acs-was-h1 {
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  color: inherit;
  margin: inherit;
  text-transform: inherit;
}
.cleaning-service-container .service-header h2.acs-was-h1 {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 0.5em;
}
.seo-master-guide .hero-section h2.acs-was-h1 {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 0.5em;
}


/* Contact (and similar) wide featured image should not widen the page */
html, body {
  max-width: 100%;
  overflow-x: hidden;
}
.ast-single-post-featured-section,
.ast-article-image-container--wide,
.ast-single-post-featured-section.post-thumb {
  max-width: 100% !important;
  overflow: hidden;
  box-sizing: border-box;
}
.ast-single-post-featured-section img,
.ast-article-image-container--wide img {
  max-width: 100% !important;
  height: auto;
}

/* Home hero CTAs must sit above the cookie bar and remain clickable.
   Tightening the left column lifts "Get my free estimate" clear of the bar. */
@media (min-width: 901px) {
  body.home .acs-hero,
  body.home .acs-hero-home,
  body.home section.acs-hero {
    padding-top: 28px !important;
    padding-bottom: 28px !important;
  }
  body.home .acs-hero h1,
  body.home .acs-hero .acs-h1like,
  body.home .acs-hero h1.acs-h1-long {
    font-size: clamp(32px, 3.6vw, 46px) !important;
    margin-bottom: 10px !important;
    line-height: 1.1 !important;
  }
  body.home .acs-offer { margin-bottom: 10px !important; }
  body.home .acs-hero-sub { margin-bottom: 10px !important; font-size: 17px !important; }
  body.home .acs-rating { margin-bottom: 10px !important; }
  body.home .acs-checks li { margin-bottom: 6px !important; }
  body.home .acs-hero-btns { margin-top: 12px !important; }
}
@media (max-width: 900px) {
  body.home .acs-hero,
  body.home .acs-hero-home,
  body.home section.acs-hero {
    padding-top: 22px !important;
    padding-bottom: 28px !important;
  }
  body.home .acs-hero h1,
  body.home .acs-hero .acs-h1like,
  body.home .acs-hero h1.acs-h1-long {
    font-size: clamp(26px, 7vw, 34px) !important;
    margin-bottom: 10px !important;
  }
  body.home .acs-hero-sub {
    margin-bottom: 10px !important;
    font-size: 16px !important;
  }
  body.home .acs-offer {
    margin-bottom: 10px !important;
  }
  body.home .acs-hero-btns {
    margin-top: 12px !important;
    margin-bottom: 0 !important;
  }
  body.home .acs-rating {
    margin-bottom: 8px !important;
  }
}

/* Chaty: the visible bubble is 70px and sits 4px to the RIGHT of a
   0-width fixed .chaty-widget anchor. A `right: 10px` on that anchor
   therefore leaves only a sliver on-screen. Offset the anchor by the
   bubble width, sit it above the cookie bar, and keep it off the
   home hero "Get my free estimate" button. */
.chaty-widget,
.chaty-widget.left-position,
.chaty-widget.right-position {
  left: auto !important;
  width: 0 !important;
  height: 0 !important;
  right: 90px !important;
}
@media (max-width: 900px) {
  .chaty-widget,
  .chaty-widget.left-position,
  .chaty-widget.right-position {
    right: 84px !important;
    bottom: 24px !important;
  }
  body:has(.cky-consent-container:not(.cky-hide) .cky-consent-bar) .chaty-widget,
  body:has(.cky-consent-container:not(.cky-hide) .cky-consent-bar) .chaty-widget.left-position,
  body:has(.cky-consent-container:not(.cky-hide) .cky-consent-bar) .chaty-widget.right-position {
    bottom: 88px !important;
  }
}
@media (min-width: 901px) {
  .chaty-widget,
  .chaty-widget.left-position,
  .chaty-widget.right-position {
    right: 90px !important;
    bottom: 24px !important;
  }
  body:has(.cky-consent-container:not(.cky-hide) .cky-consent-bar) .chaty-widget,
  body:has(.cky-consent-container:not(.cky-hide) .cky-consent-bar) .chaty-widget.left-position,
  body:has(.cky-consent-container:not(.cky-hide) .cky-consent-bar) .chaty-widget.right-position {
    bottom: 90px !important;
  }
}

/* When the cookie bar is visible, lift the mobile sticky CTA so both stay tappable */
@media (max-width: 900px) {
  body:has(.cky-consent-container:not(.cky-hide) .cky-consent-bar) .acs-sticky,
  body:has(.cky-consent-container:not(.cky-hide) .cky-consent-bar) .acs-sticky.acs-show {
    bottom: 88px !important;
  }
}


/* Page 5569 body CSS forces every .acs-btn to width:100% and display:inline-flex,
   which made the header "Free estimate" button cover the logo on mobile.
   Keep the redesign header/footer chrome on the same sizes as other pages. */
@media (max-width: 980px) {
  body.page-id-5569 .acs-hdr .acs-btn-sm,
  body.page-id-5569 .acs-hdr .acs-btn.acs-btn-sm,
  body.page-id-5569 .acs-hdr-tel {
    display: none !important;
    width: auto !important;
  }
}
@media (min-width: 981px) {
  body.page-id-5569 .acs-hdr .acs-btn,
  body.page-id-5569 .acs-hdr .acs-btn-sm {
    width: auto !important;
    font-size: 15.5px !important;
    padding: 12px 20px !important;
  }
}

/* On mobile home, leave a right gutter so the Chaty bubble does not cover
   the hero "Get my free estimate" button. */
@media (max-width: 900px) {
  body.home .acs-hero-btns {
    padding-right: 68px !important;
  }
}


/* Easy TOC fallback: if the plugin stylesheet is missing, keep the box
   collapsed (hide-by-default) and styled as the original light-blue card
   instead of a huge unstyled bullet list. */
#ez-toc-container,
.ez-toc-split-section {
  background: #EDF6FF;
  border: 1px solid #AAAAAA;
  border-radius: 4px;
  -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
  display: table;
  margin-bottom: 1em;
  padding: 10px 20px 10px 10px;
  position: relative;
  width: auto;
}
#ez-toc-container ul,
#ez-toc-container li,
#ez-toc-container ul li,
.ez-toc-split-section ul,
.ez-toc-split-section li {
  background: none;
  list-style: none none;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  overflow: hidden;
}
#ez-toc-container .ez-toc-title {
  text-align: left;
  line-height: 1.45;
  margin: 0;
  padding: 0;
}
#ez-toc-container a.ez-toc-link {
  color: #444444;
  text-decoration: none;
}
#ez-toc-container .eztoc-toggle-hide-by-default,
.ez-toc-split-section .eztoc-toggle-hide-by-default {
  display: none;
}
#ez-toc-container .ez-toc-title-container {
  display: table;
  width: 100%;
}
#ez-toc-container .ez-toc-title,
#ez-toc-container .ez-toc-title-toggle {
  display: inline;
  vertical-align: middle;
}
#ez-toc-container a.ez-toc-toggle {
  float: right;
}
