/*
 * Reflow and text-resize layer (WCAG 1.4.10 / 1.4.4).
 *
 * Goal: at 320 CSS px wide and at 200% text no in-scope page needs sideways
 * scrolling and nothing is cut off. The theme keeps "html, body {
 * overflow-x: hidden }" (left in place on purpose); the rules below stop the
 * components from overflowing in the first place, so nothing depends on that
 * clip.
 *
 * Sections:
 *   1. Carousels: the markup uses the Swiper 7 container class ".swiper" but
 *      the theme ships the Swiper 4.5.1 stylesheet, which only clips
 *      ".swiper-container". Every slide therefore sat beside the page (body
 *      5324 px wide at 320). The track now scrolls inside its own box.
 *   2. Fixed-width utilities (w_N, min_w_N, max_w_N and the _sm_ variants)
 *      are capped at the width of their container below 992 px. Where a
 *      value fits it does not change.
 *   3. Component fixes for rows and boxes that still stick out.
 *   4. Fixed-height header rows that cut off or overlap enlarged text, the
 *      room below the fixed header, and a grown header that is taller than
 *      half the window (scrolls away instead of covering the page). Set
 *      by js/pd-a11y-reflow.js only when the text no longer fits.
 *   5. UberMenu mega panels (vendor plugin CSS overridden here, never
 *      edited): an open panel scrolls inside itself when the window is
 *      shorter than the panel.
 *
 * Selectors start with "html body" so they win over the theme utilities
 * (which use !important) even when child-theme.min.css is printed again
 * after wp_head(). Desktop (992 px and wider) is not changed except where a
 * rule says so. No colour changes; no form field changes.
 *
 * Author: Dan DiCecca
 */

/* 1. Carousels ------------------------------------------------------------ */
html body .swiper {
	position: relative;
	overflow: hidden;
	max-width: 100%;
}

/* 2. Fixed-width utilities ------------------------------------------------- */
/* Generated by _build/r4-13/gen-utilities.py: 38 base + 6 _sm_ classes (N >= 240, used and defined), 2 narrower _sm_ kept. */
@media (max-width: 991.98px) {
	html body .max_w_350 { max-width: min(350px, 100%) !important; }
	html body .max_w_430 { max-width: min(430px, 100%) !important; }
	html body .max_w_445 { max-width: min(445px, 100%) !important; }
	html body .max_w_500 { max-width: min(500px, 100%) !important; }
	html body .max_w_520 { max-width: min(520px, 100%) !important; }
	html body .max_w_530 { max-width: min(530px, 100%) !important; }
	html body .max_w_545 { max-width: min(545px, 100%) !important; }
	html body .max_w_548 { max-width: min(548px, 100%) !important; }
	html body .max_w_550 { max-width: min(550px, 100%) !important; }
	html body .max_w_680 { max-width: min(680px, 100%) !important; }
	html body .max_w_708 { max-width: min(708px, 100%) !important; }
	html body .max_w_769 { max-width: min(769px, 100%) !important; }
	html body .max_w_800 { max-width: min(800px, 100%) !important; }
	html body .min_w_260 { min-width: min(260px, 100%) !important; }
	html body .min_w_281 { min-width: min(281px, 100%) !important; }
	html body .min_w_318 { min-width: min(318px, 100%) !important; }
	html body .min_w_350 { min-width: min(350px, 100%) !important; }
	html body .min_w_399 { min-width: min(399px, 100%) !important; }
	html body .min_w_423 { min-width: min(423px, 100%) !important; }
	html body .min_w_545 { min-width: min(545px, 100%) !important; }
	html body .min_w_548 { min-width: min(548px, 100%) !important; }
	html body .min_w_680 { min-width: min(680px, 100%) !important; }
	html body .min_w_769 { min-width: min(769px, 100%) !important; }
	html body .w_240 { width: min(240px, 100%) !important; }
	html body .w_260 { width: min(260px, 100%) !important; }
	html body .w_267 { width: min(267px, 100%) !important; }
	html body .w_276 { width: min(276px, 100%) !important; }
	html body .w_310 { width: min(310px, 100%) !important; }
	html body .w_316 { width: min(316px, 100%) !important; }
	html body .w_317 { width: min(317px, 100%) !important; }
	html body .w_339 { width: min(339px, 100%) !important; }
	html body .w_350 { width: min(350px, 100%) !important; }
	html body .w_356 { width: min(356px, 100%) !important; }
	html body .w_360 { width: min(360px, 100%) !important; }
	html body .w_410 { width: min(410px, 100%) !important; }
	html body .w_600 { width: min(600px, 100%) !important; }
	html body .w_700 { width: min(700px, 100%) !important; }
	html body .w_1110 { width: min(1110px, 100%) !important; }
}
@media (max-width: 767px) {
	html body .max_sm_w_340 { max-width: min(340px, 100%) !important; }
	html body .max_sm_w_350 { max-width: min(350px, 100%) !important; }
	html body .min_sm_w_340 { min-width: min(340px, 100%) !important; }
	html body .min_sm_w_350 { min-width: min(350px, 100%) !important; }
	html body .w_sm_275 { width: min(275px, 100%) !important; }
	html body .w_sm_335 { width: min(335px, 100%) !important; }
	/* narrower _sm_ classes kept (2) */
	html body .w_sm_157 { width: min(157px, 100%) !important; }
	html body .w_sm_233 { width: min(233px, 100%) !important; }
}
/* Theme overrides of the utilities, kept (generated; 2 declarations). */
@media screen and (max-width: 768px) {
	html body .global-zipcode-input input { min-width: min(223px, 100%) !important; }
	html body .global-zipcode-input input { max-width: min(223px, 100%) !important; }
}

/* 3. Components ------------------------------------------------------------ */
@media (max-width: 1199.98px) {
	/* Bootstrap rows placed straight in an Elementor widget box: the -15px row
	   margins stuck 5px past the 10px column padding on each side (tabs on the
	   home page, featured categories on the blog). Cols keep their padding. */
	html body .elementor-widget-container > .row {
		margin-left: 0;
		margin-right: 0;
	}
	/* Affiliations logo row: -3rem margins inside a padding-free container
	   reached 16px past the viewport between 992 and 1199 px. */
	html body .afflication-section .container.px-lg-0 > .row.mx-lg-n5 {
		margin-left: 0 !important;
		margin-right: 0 !important;
	}
}
@media (min-width: 1200px) {
	/* Same row at desktop widths: -3rem doubles with text zoom and pushed the
	   page 11-26px wide. Capped at the 100% value (48px), so 100% is unchanged. */
	html body .afflication-section .container.px-lg-0 > .row.mx-lg-n5 {
		margin-left: max(-3rem, -48px) !important;
		margin-right: max(-3rem, -48px) !important;
	}
}
@media (max-width: 991.98px) {
	/* Hyphenated fixed widths used by the CTA and card templates. */
	html body .w-md-316 { width: min(316px, 100%) !important; }
	html body .w-md-300 { width: min(300px, 100%) !important; }
}
@media (max-width: 767px) {
	/* Residential "Get help immediately" CTA (w-sm-325 inside a 300px column). */
	html body .w-sm-325 { width: min(325px, 100%) !important; }
}

/* 4. Site header at enlarged text (1.4.4) ------------------------------------
   The desktop header is fixed and its rows have fixed px heights, so larger
   text spilled out of the announcement bar and the header box and covered the
   top of the page. pd-a11y-reflow.js adds "pd-a11y-grow" to a row (or to the
   header) only when its text no longer fits; the row may then grow. At normal
   text sizes the class is never added, so the 100% layout is unchanged.
   The script also pads the space under the header when the header is taller
   than the room the page leaves for it. */
html body header.bc_header .h_63.pd-a11y-grow {
	height: auto !important;
	min-height: 63px;
}
html body header.bc_header.pd-a11y-grow {
	height: auto !important;
	max-height: none !important;
}
@media (min-width: 1300px) {
	html body header.bc_header.max-header.pd-a11y-grow {
		min-height: 256px;
	}
	html body header.bc_header.smaller-header.pd-a11y-grow {
		min-height: 172px;
	}
}
html body .pd-a11y-header-room {
	padding-bottom: var(--pd-a11y-header-room, 0px);
}
/* Grown header taller than half the window: it scrolls with the page instead of
   staying fixed over it (set by pd-a11y-reflow.js; never at normal text sizes). */
html body header.bc_header.pd-a11y-unfix {
	position: absolute !important;
	top: 0 !important;
	left: var(--pd-a11y-unfix-left, 0px) !important;
	right: auto !important;
	width: var(--pd-a11y-unfix-width, 100%) !important;
	overflow-x: clip;
}

/* 5. UberMenu mega panels (E1239 / E1240) -------------------------------------
   Vendor plugin files are not edited. The panels open inside the fixed header,
   so a panel taller than the space below its menu item could not be scrolled
   into view (short screens, zoom, larger text). pd-a11y-reflow.js measures the
   room below the open item and sets --pd-a11y-menu-room on the nav; the panel
   then scrolls inside itself instead of running off the screen.
   The vendor sheet sets overflow:hidden on mega panels when submenu scrolling is
   disabled (0,5,0) and max-height:none on open panels, so these rules use extra
   classes and !important. Only open panels are touched. */
html body nav.ubermenu.ubermenu.pd-a11y-menu-room .ubermenu-item.ubermenu-item-level-0.ubermenu-active > .ubermenu-submenu.ubermenu-submenu-drop.ubermenu-submenu-type-mega {
	max-height: var(--pd-a11y-menu-room, none) !important;
	overflow-x: hidden !important;
	overflow-y: auto !important;
	overscroll-behavior: contain;
}
/* Flyout panels, only when they hold no nested flyout (a scroll box would clip
   it). Kept as its own rule: a browser without :has() drops just this one. */
html body nav.ubermenu.ubermenu.pd-a11y-menu-room .ubermenu-item.ubermenu-item-level-0.ubermenu-active > .ubermenu-submenu.ubermenu-submenu-drop.ubermenu-submenu-type-flyout:not(:has(.ubermenu-submenu-type-flyout)) {
	max-height: var(--pd-a11y-menu-room, none) !important;
	overflow-x: hidden !important;
	overflow-y: auto !important;
	overscroll-behavior: contain;
}
