
/* =========================================================================
   Contractor Search — v2 two-panel layout.
   Active when `.cs-layout` is rendered (layout flag = v2). Coexists with the
   v1 minified block above so the legacy layout still works when flag = v1.
   Authored in sass/pages/_contractor-search.scss; this block was compiled
   manually for environments without the gulp pipeline.
   ========================================================================= */

.path-homeequipment:has(.cs-layout) .background-image-block__section { padding: 0; display: none; }
.path-homeequipment:has(.cs-layout) main { padding: 0; }
.path-homeequipment:has(.cs-layout) .main-content .container { max-width: none !important; width: 100% !important; padding-left: 0 !important; padding-right: 0 !important; margin-left: 0 !important; margin-right: 0 !important; }
.path-homeequipment:has(.cs-layout) .main-content .container .main-content__container,
.path-homeequipment:has(.cs-layout) .main-content .container .main-content__container .main-content__section,
.path-homeequipment:has(.cs-layout) .region-content,
.path-homeequipment:has(.cs-layout) .search-contractor { padding: 0 !important; margin: 0 !important; max-width: none !important; width: 100% !important; }
.path-homeequipment:has(.cs-layout) .contractor-block { padding-inline: 24px; }
@media (max-width: 991px) { .path-homeequipment:has(.cs-layout) .contractor-block { padding-inline: 16px; } }

/* Flatten the rest of the .cs-layout ancestor chain vertically. Without this, theme/Bootstrap padding on .main-content, .container, .row, .col-*, the block wrapper, and the form pushes body height past 100svh and the document scrolls. Vertical-only — horizontal layout (Bootstrap gutters, .contractor-block padding-inline, .cs-layout's own padding-inline) is preserved. */
.path-homeequipment:has(.cs-layout) .main-content,
.path-homeequipment:has(.cs-layout) .main-content > .container,
.path-homeequipment:has(.cs-layout) .main-content__container > .row,
.path-homeequipment:has(.cs-layout) .main-content__container > .row > [class*="col-"],
.path-homeequipment:has(.cs-layout) #block-showcaseplus-content,
.path-homeequipment:has(.cs-layout) #block-showcaseplus-content > .content,
.path-homeequipment:has(.cs-layout) .contractor-block,
.path-homeequipment:has(.cs-layout) .contractor-block > .content,
.path-homeequipment:has(.cs-layout) .fac-findacontractor-filter-form { padding-block: 0 !important; margin-block: 0 !important; }
@media (min-width: 992px) {
  html:has(.cs-layout),
  .path-homeequipment:has(.cs-layout) { overflow: hidden; }
}

/* Hide site chrome and pre-layout content on the v2 surface only. .cs-panel__title ("Find a Contractor") is the first thing the visitor sees. */
.path-homeequipment:has(.cs-layout) .header-container,
.path-homeequipment:has(.cs-layout) .sticky-wrapper,
.path-homeequipment:has(.cs-layout) .banner,
.path-homeequipment:has(.cs-layout) .contractor-block-top,
.path-homeequipment:has(.cs-layout) .contractor-block-bottom,
.path-homeequipment:has(.cs-layout) .featured-top,
.path-homeequipment:has(.cs-layout) .featured-bottom,
.path-homeequipment:has(.cs-layout) .highlighted-top,
.path-homeequipment:has(.cs-layout) .highlighted,
.path-homeequipment:has(.cs-layout) .footer-top-first,
.path-homeequipment:has(.cs-layout) .footer-top-second,
.path-homeequipment:has(.cs-layout) .footer,
.path-homeequipment:has(.cs-layout) .subfooter,
.path-homeequipment:has(.cs-layout) .sub-footer-first,
.path-homeequipment:has(.cs-layout) .footer-bottom { display: none; }

.cs-sticky-frame { min-height: 0; }

/* Brand tokens. The default values match the original hardcoded hex literals
 * across this stylesheet — programs override them per-site via the Branding
 * section of /admin/config/system/find-a-contractor (FacConfigForm). The
 * controller injects an inline `style` attribute on `.fac-page` that sets
 * these three custom properties to the configured hex values; CSS resolves
 * `var(--fac-*)` against that scope without needing a stylesheet rebuild. */
/* Defaults MUST live on `.fac-page` — same element as the controller's inline
 * override. Declared on a descendant (`.cs-layout`), the stylesheet rule
 * shadows the inherited inline value and the overrides silently no-op. */
.fac-page { --fac-primary: #184681; --fac-secondary: #D7263D; --fac-accent: #0071A8; --fac-text-primary: var(--fac-primary, #184681); --fac-map-pin: var(--fac-secondary, #D7263D); }

.cs-layout { display: grid; grid-template-columns: minmax(360px, 40%) 1fr; height: calc(100vh - var(--fac-brand-header-h, 0px)); height: calc(100svh - var(--fac-brand-header-h, 0px)); padding-inline: 24px; background: #fff; font-family: "Nunito Sans", sans-serif; font-feature-settings: 'lnum' 1; }
.cs-layout *, .cs-layout *::before, .cs-layout *::after { box-sizing: border-box; }
@media (max-width: 991px) { .cs-layout { grid-template-columns: 1fr; height: auto; padding-inline: 16px; } }

.cs-panel { position: relative; display: flex; flex-direction: column; border-right: 1px solid #C3CED5; background: #fff; min-width: 0; height: 100%; overflow: hidden; }
@media (max-width: 991px) { .cs-panel { height: auto; overflow: visible; } }
.cs-panel__header { position: sticky; top: 0; z-index: 5; background: #fff; padding: 20px 24px 16px; border-bottom: 1px solid #C3CED5; }
.cs-panel__title { font-size: 4rem; font-family: "Nunito Sans Bold", sans-serif; color: var(--fac-text-primary, #184681); margin: 0 0 18px; text-transform: none; letter-spacing: -0.2px; line-height: 1.1; }

/* Brand header band — full-bleed stripe + logo row above `.cs-layout`.
 * Rendered only when a logo is configured (see twig). The stripe takes
 * the configured primary brand color; the logo row sits flush against
 * the viewport edges with the logo aligned to the layout's left padding.
 *
 * `.cs-layout` is fixed to viewport height; when the band is present we
 * shrink the grid by `--fac-brand-header-h` so the map panel still ends
 * exactly at the bottom of the viewport. The `:has()` selector keeps the
 * default 100vh sizing for sites without branding. */
.fac-page:has(.cs-brand-header) { --fac-brand-header-h: 140px; }
.cs-brand-header { display: block; background: #fff; border-bottom: 1px solid #C3CED5; }
.cs-brand-header__stripe { height: 60px; background: var(--fac-primary, #184681); }
.cs-brand-header__row { display: flex; align-items: center; height: 80px; padding: 0 24px; }
.cs-brand-header__logo { display: block; max-height: 56px; width: auto; }
@media (max-width: 991px) {
  .cs-brand-header__stripe { height: 40px; }
  .cs-brand-header__row { height: 64px; padding: 0 16px; }
  .cs-brand-header__logo { max-height: 44px; }
  .fac-page:has(.cs-brand-header) { --fac-brand-header-h: 104px; }
}
.cs-search-tabs { display: flex; gap: 24px; margin: 0 0 12px; border-bottom: 1px solid #C3CED5; }
.cs-search-tab { background: transparent; border: 0; border-bottom: 3px solid transparent; padding: 8px 0 10px; font-size: 1.6rem; font-family: "Nunito Sans SemiBold", sans-serif; color: #4f5263; cursor: pointer; transition: color 120ms ease, border-color 120ms ease; }
.cs-search-tab:hover, .cs-search-tab:focus-visible { color: var(--fac-text-primary, #184681); outline: none; }
.cs-search-tab.is-active { color: var(--fac-text-primary, #184681); font-family: "Nunito Sans Bold", sans-serif; border-bottom-color: var(--fac-secondary, #D7263D); }
.cs-search-row__inputs { display: flex; gap: 8px; align-items: center; flex: 1 1 auto; min-width: 0; flex-wrap: wrap; }
.cs-search-row__inputs[hidden] { display: none; }
.cs-search-row__county { flex: 1 1 240px; min-width: 0; }
.cs-search-row__county .form-item { margin: 0; }
.cs-search-row__county label { display: none; }
.cs-search-row__county .select2-container { width: 100% !important; }
.cs-search-row__county .select2-container--default .select2-selection--multiple { min-height: 40px; border: 1px solid #C3CED5; border-radius: 4px; background: #fff; font-size: 1.4rem; font-family: "Nunito Sans Medium", sans-serif; color: #4f5263; padding: 2px 6px; }
.cs-search-row__county .select2-container--default .select2-selection--multiple .select2-selection__rendered { padding: 0 4px; }
.cs-search-row__county .select2-container--default .select2-selection--multiple .select2-selection__choice { background: #EEF2F6; border: 1px solid #C3CED5; color: var(--fac-text-primary, #184681); font-size: 1.3rem; padding: 2px 8px; margin: 4px 4px 4px 0; }
.cs-search-row__county .select2-container--default .select2-selection--multiple .select2-search--inline .select2-search__field { font-size: 1.4rem; font-family: "Nunito Sans Medium", sans-serif; color: #4f5263; margin-top: 8px; }
.cs-search-row__county .select2-container--default.select2-container--disabled .select2-selection--multiple { background: #F5F7F9; }

/* County dropdown — checkbox-styled options. select2 marks the selected
   option with [aria-selected="true"], which we mirror as a filled checkbox.
   `closeOnSelect: false` (set in the form) keeps the dropdown open while
   the user picks multiple counties. */
.cs-county-dropdown .select2-results__options { padding: 4px 0; }
.cs-county-dropdown .select2-results__option { position: relative; padding: 8px 12px 8px 36px; font-size: 1.4rem; font-family: "Nunito Sans Medium", sans-serif; color: #4f5263; }
.cs-county-dropdown .select2-results__option::before { content: ""; position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; border: 1px solid #C3CED5; border-radius: 3px; background: #fff; box-sizing: border-box; }
.cs-county-dropdown .select2-results__option[aria-selected="true"] { color: var(--fac-text-primary, #184681); font-family: "Nunito Sans SemiBold", sans-serif; background: #fff; }
.cs-county-dropdown .select2-results__option[aria-selected="true"]::before { background: var(--fac-accent, #0071A8) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>") no-repeat center / 12px; border-color: var(--fac-accent, #0071A8); }
.cs-county-dropdown .select2-results__option--highlighted[aria-selected] { background: #EEF2F6; color: var(--fac-text-primary, #184681); }
.cs-county-dropdown .select2-results__option--highlighted[aria-selected="true"] { background: #EEF2F6; }

.cs-search-row { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.cs-search-row__zip { flex: 1 1 140px; position: relative; }
.cs-search-row__zip::before { content: ""; position: absolute; left: 12px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); background: var(--fac-accent, #0071A8); -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z'/><circle cx='12' cy='10' r='3'/></svg>") no-repeat center / contain; mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z'/><circle cx='12' cy='10' r='3'/></svg>") no-repeat center / contain; pointer-events: none; }
.cs-search-row__zip .form-item { margin: 0; }
.cs-search-row__zip label { display: none; }
.cs-search-row__zip input[type="text"] { width: 100%; height: 40px; padding: 0 12px 0 36px; border: 1px solid #C3CED5; border-radius: 4px; background: #fff; font-size: 1.4rem; font-family: "Nunito Sans Medium", sans-serif; color: #4f5263; }
.cs-search-row__radius { flex: 0 0 auto; }
.cs-search-row__radius .form-item { margin: 0; }
.cs-search-row__radius label { display: none; }
.cs-search-row__radius select { height: 40px; padding: 0 30px 0 12px; border: 1px solid #C3CED5; border-radius: 4px; background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234f5263' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>") no-repeat right 10px center / 12px; -webkit-appearance: none; -moz-appearance: none; appearance: none; font-size: 1.4rem; font-family: "Nunito Sans Medium", sans-serif; color: #4f5263; }
.cs-search-row__submit { position: relative; flex: 0 0 40px; width: 40px; height: 40px; }
.cs-search-row__submit .form-submit { width: 40px; height: 40px; min-height: 40px; max-height: 40px; padding: 0; margin: 0; border-radius: 4px; background: var(--fac-accent, #0071A8) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='7'/><line x1='21' y1='21' x2='16.65' y2='16.65'/></svg>") no-repeat center / 20px; text-indent: -9999px; white-space: nowrap; overflow: hidden; border: 0; cursor: pointer; box-sizing: border-box; }
.cs-search-row__submit .form-submit:hover { background-color: #005e8c; }
.cs-search-row__submit .form-submit:focus-visible { outline: 2px solid var(--fac-accent, #0071A8); outline-offset: 2px; }
.cs-search-row__submit > .ajax-progress.ajax-progress-throbber { position: absolute; top: 0; left: 0; width: 40px; height: 40px; padding: 0; margin: 0; display: flex; align-items: center; justify-content: center; background: var(--fac-accent, #0071A8); border-radius: 4px; pointer-events: none; z-index: 2; box-sizing: border-box; }
.cs-search-row__submit > .ajax-progress.ajax-progress-throbber .throbber { display: block; width: 20px; height: 20px; padding: 0; margin: 0; background: transparent; border: 2px solid rgba(255, 255, 255, 0.35); border-top-color: #fff; border-radius: 50%; animation: cs-throbber-spin 0.7s linear infinite; box-sizing: border-box; }
.cs-search-row__submit > .ajax-progress.ajax-progress-throbber .message { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.cs-search-row__submit::after { content: "Search"; position: absolute; top: 100%; left: 50%; margin-top: 6px; padding: 4px 8px; border-radius: 4px; background: #2b2f38; color: #fff; font-size: 1.2rem; font-family: "Nunito Sans SemiBold", sans-serif; white-space: nowrap; transform: translate(-50%, 2px); opacity: 0; pointer-events: none; transition: opacity 120ms ease, transform 120ms ease; z-index: 10; }
.cs-search-row__submit:hover::after, .cs-search-row__submit:focus-within::after { opacity: 1; transform: translate(-50%, 0); }
@keyframes cs-throbber-spin { to { transform: rotate(360deg); } }

.cs-filter-btn { height: 40px; padding: 0 16px; border: 1px solid var(--fac-accent, #0071A8); border-radius: 20px; background: #fff; color: var(--fac-accent, #0071A8); font-size: 1.4rem; font-family: "Nunito Sans SemiBold", sans-serif; cursor: pointer; }
.cs-filter-btn:hover { background: rgba(0, 113, 168, 0.08); }
.cs-filter-btn #cs-filter-count { font-family: "Nunito Sans Bold", sans-serif; }

.cs-results-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.cs-results-bar__count { font-size: 1.4rem; font-family: "Nunito Sans Medium", sans-serif; color: #4f5263; }
.cs-results-bar__count strong { font-family: "Nunito Sans Bold", sans-serif; color: var(--fac-text-primary, #184681); }
.cs-results-bar__sort .form-item { margin: 0; display: flex; align-items: center; gap: 6px; }
.cs-results-bar__sort label { font-size: 1.4rem; font-family: "Nunito Sans Medium", sans-serif; color: #4f5263; margin: 0; white-space: nowrap; }
.cs-results-bar__sort select { height: 32px; padding: 0 28px 0 10px; border: 1px solid #C3CED5; border-radius: 4px; background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234f5263' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>") no-repeat right 8px center / 12px; -webkit-appearance: none; -moz-appearance: none; appearance: none; font-size: 1.4rem; font-family: "Nunito Sans Medium", sans-serif; color: #4f5263; }

/* View switcher — split-style trigger button (icon + chevron) with a
 * popover menu of the two view modes. Sits next to the Sort By
 * dropdown in `.cs-results-bar`. The trigger's color treatment matches
 * the design reference (warm-red background, white icon). */
.cs-view-switcher { position: relative; display: inline-flex; }
.cs-view-switcher__trigger { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 8px; border: 1px solid #B23A2A; border-radius: 4px; background: #C44432; color: #fff; cursor: pointer; font-family: inherit; }
.cs-view-switcher__trigger:hover, .cs-view-switcher__trigger[aria-expanded="true"] { background: #B23A2A; }
.cs-view-switcher__trigger:focus-visible { outline: 2px solid var(--fac-primary, #184681); outline-offset: 2px; }
/* Trigger icon mirrors the active option (mode-dependent via class on
 * the parent set by JS). Defaults to the Map View pictogram. The
 * pictograms are inline SVGs masked by `currentColor` so the same
 * shape can change color via the trigger's `color` property without
 * a second asset. */
.cs-view-switcher__icon { display: inline-block; width: 16px; height: 16px; background: currentColor; -webkit-mask: var(--cs-view-icon-map); mask: var(--cs-view-icon-map); -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: center; mask-position: center; -webkit-mask-size: contain; mask-size: contain; }
.cs-view-switcher[data-cs-active-view="grid"] .cs-view-switcher__icon { -webkit-mask: var(--cs-view-icon-grid); mask: var(--cs-view-icon-grid); -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: center; mask-position: center; -webkit-mask-size: contain; mask-size: contain; }
.cs-view-switcher__chevron { display: inline-block; width: 10px; height: 10px; background: currentColor; -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><polyline points='6 9 12 15 18 9' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/></svg>") no-repeat center / contain; mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><polyline points='6 9 12 15 18 9' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/></svg>") no-repeat center / contain; transition: transform 150ms ease; }
.cs-view-switcher__trigger[aria-expanded="true"] .cs-view-switcher__chevron { transform: rotate(180deg); }

/* Popover menu — anchored to the trigger's right edge so it doesn't
 * overflow the panel. `hidden` toggled by JS; the rule only kicks in
 * when the attribute is absent. Box-shadow chosen to read as a
 * dropdown above scrolled card content beneath. */
.cs-view-switcher__menu { position: absolute; top: calc(100% + 4px); right: 0; z-index: 10; min-width: 160px; margin: 0; padding: 4px; list-style: none; border: 1px solid #C3CED5; border-radius: 6px; background: #fff; box-shadow: 0 8px 24px rgba(24, 70, 129, 0.18); }
.cs-view-switcher__menu[hidden] { display: none; }
.cs-view-switcher__menu li { margin: 0; }
.cs-view-switcher__option { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; background: transparent; cursor: pointer; font-family: "Nunito Sans Medium", sans-serif; font-size: 1.4rem; color: #4f5263; text-align: left; border-radius: 4px; }
.cs-view-switcher__option:hover, .cs-view-switcher__option:focus-visible { background: #F3F6F9; outline: none; }
.cs-view-switcher__option[aria-checked="true"] { background: #EAF1F8; color: var(--fac-text-primary, #184681); }
.cs-view-switcher__opt-icon { display: inline-block; width: 16px; height: 16px; background: currentColor; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: center; mask-position: center; -webkit-mask-size: contain; mask-size: contain; }
/* Inline-SVG pictograms shared by the trigger and the menu options.
 * Stored as CSS custom properties so the trigger can swap between
 * them via a class without duplicating the data URLs. */
.cs-view-switcher { --cs-view-icon-map: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polygon points='1 6 8 3 16 6 23 3 23 18 16 21 8 18 1 21 1 6'/><line x1='8' y1='3' x2='8' y2='18'/><line x1='16' y1='6' x2='16' y2='21'/></svg>"); --cs-view-icon-grid: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'><rect x='3' y='3' width='7' height='7' rx='1'/><rect x='14' y='3' width='7' height='7' rx='1'/><rect x='3' y='14' width='7' height='7' rx='1'/><rect x='14' y='14' width='7' height='7' rx='1'/></svg>"); }
.cs-view-switcher__opt-icon--map { -webkit-mask-image: var(--cs-view-icon-map); mask-image: var(--cs-view-icon-map); }
.cs-view-switcher__opt-icon--grid { -webkit-mask-image: var(--cs-view-icon-grid); mask-image: var(--cs-view-icon-grid); }

.cs-results { list-style: none; margin: 0; padding: 12px 24px 32px; overflow-y: auto; flex: 1 1 auto; }

.cs-empty { padding: 40px 12px; text-align: center; font-size: 1.4rem; font-family: "Nunito Sans Medium", sans-serif; color: #969DA3; list-style: none; }
.cs-empty--error { color: #FF3636; }

.cs-card { position: relative; border: 1px solid #C3CED5; border-radius: 6px; padding: 12px 16px 14px; margin-bottom: 8px; background: #fff; transition: box-shadow 180ms ease, border-color 180ms ease, transform 180ms ease; }
.cs-card:hover, .cs-card.is-active { border-color: var(--fac-accent, #0071A8); box-shadow: 0 4px 16px rgba(24, 70, 129, 0.12); transform: translateY(-1px); }
.cs-card__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 2px; }
.cs-card__name { font-size: 1.8rem; font-family: "Nunito Sans Bold", sans-serif; color: var(--fac-text-primary, #184681); margin: 0; line-height: 1.25; letter-spacing: -0.1px; }
.cs-card__rating { display: inline-flex; align-items: center; gap: 4px; margin: 0 0 8px; font-size: 1.4rem; font-family: "Nunito Sans Medium", sans-serif; color: #4f5263; }
.cs-card__rating-count--empty { font-style: italic; color: #969DA3; }
.cs-card__stars { display: inline-block; width: 80px; height: 14px; background: linear-gradient(90deg, #F4B400 var(--cs-star-pct, 0%), #E5E9EF var(--cs-star-pct, 0%)); -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 14'><g fill='black'><polygon points='7,0 9,5 14,5 10,8 11,13 7,10 3,13 4,8 0,5 5,5'/><polygon points='23,0 25,5 30,5 26,8 27,13 23,10 19,13 20,8 16,5 21,5'/><polygon points='39,0 41,5 46,5 42,8 43,13 39,10 35,13 36,8 32,5 37,5'/><polygon points='55,0 57,5 62,5 58,8 59,13 55,10 51,13 52,8 48,5 53,5'/><polygon points='71,0 73,5 78,5 74,8 75,13 71,10 67,13 68,8 64,5 69,5'/></g></svg>") no-repeat 0 0 / 80px 14px; mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 14'><g fill='black'><polygon points='7,0 9,5 14,5 10,8 11,13 7,10 3,13 4,8 0,5 5,5'/><polygon points='23,0 25,5 30,5 26,8 27,13 23,10 19,13 20,8 16,5 21,5'/><polygon points='39,0 41,5 46,5 42,8 43,13 39,10 35,13 36,8 32,5 37,5'/><polygon points='55,0 57,5 62,5 58,8 59,13 55,10 51,13 52,8 48,5 53,5'/><polygon points='71,0 73,5 78,5 74,8 75,13 71,10 67,13 68,8 64,5 69,5'/></g></svg>") no-repeat 0 0 / 80px 14px; }
.cs-card__rating-score { font-family: "Nunito Sans Bold", sans-serif; color: var(--fac-text-primary, #184681); }
.cs-card__rating-count { color: #969DA3; }
.cs-card__rating-link { text-decoration: none; cursor: pointer; }
.cs-card__rating-link:hover, .cs-card__rating-link:focus-visible { text-decoration: underline; }
.cs-card__details { margin: 0; padding: 0; }
.cs-card__details-label { font-size: 1.2rem; font-family: "Nunito Sans Bold", sans-serif; color: #969DA3; letter-spacing: 0.08em; margin-bottom: 6px; display: block; }
.cs-card__row { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 2px; line-height: 1.3; font-size: 1.5rem; font-family: "Nunito Sans Medium", sans-serif; color: #4f5263; }
.cs-card__value { color: inherit; word-break: break-word; }
/* `font-size: inherit` is load-bearing — the PPL residential theme ships a
 * global `a { font-size: 2rem }` rule (color-box-block.css) that otherwise
 * blows out phone/email/web links above their containing `.cs-card__row`. */
.cs-card__value[href] { color: inherit; text-decoration: none; font-size: inherit; font-family: inherit; }
.cs-card__value[href]:hover { text-decoration: underline; }
.cs-card__expand { position: absolute; right: 16px; bottom: 16px; width: 24px; height: 24px; padding: 0; border: 1px solid #C3CED5; border-radius: 50%; background: #fff; cursor: pointer; }
.cs-card__expand-icon { position: absolute; inset: 0; margin: auto; width: 10px; height: 10px; background: var(--fac-accent, #0071A8); -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234f5263' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>") no-repeat center / contain; mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234f5263' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>") no-repeat center / contain; transition: transform 180ms ease; }
.cs-card__expand[aria-expanded="true"] .cs-card__expand-icon { transform: rotate(180deg); }
.cs-card__more { margin-top: 12px; padding-top: 12px; border-top: 1px dashed #C3CED5; }
.cs-card__services { margin: 0; padding: 0; }
.cs-card__service { font-size: 1.3rem; font-family: "Nunito Sans Medium", sans-serif; color: #4f5263; margin-bottom: 4px; }
.cs-card__service-name { display: block; font-family: "Nunito Sans Bold", sans-serif; color: var(--fac-text-primary, #184681); }
.cs-card__counties { margin-top: 8px; font-size: 1.3rem; font-family: "Nunito Sans Medium", sans-serif; color: #4f5263; line-height: 1.4; }
.cs-card__counties-label { display: block; font-family: "Nunito Sans Bold", sans-serif; color: var(--fac-text-primary, #184681); }
.cs-card__counties-value { word-break: normal; overflow-wrap: anywhere; }

.cs-ico { display: inline-block; width: 16px; height: 16px; flex-shrink: 0; margin-top: 3px; background: var(--fac-accent, #0071A8); -webkit-mask-repeat: no-repeat; -webkit-mask-position: center; -webkit-mask-size: contain; mask-repeat: no-repeat; mask-position: center; mask-size: contain; }
.cs-ico--pin { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z'/><circle cx='12' cy='10' r='3'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z'/><circle cx='12' cy='10' r='3'/></svg>"); }
.cs-ico--phone { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z'/></svg>"); }
.cs-ico--email { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z'/><polyline points='22,6 12,13 2,6'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z'/><polyline points='22,6 12,13 2,6'/></svg>"); }
.cs-ico--web { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='10'/><line x1='2' y1='12' x2='22' y2='12'/><path d='M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='10'/><line x1='2' y1='12' x2='22' y2='12'/><path d='M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z'/></svg>"); }

.cs-map-panel { position: relative; height: 100%; min-height: 480px; }
@media (max-width: 991px) { .cs-map-panel { height: 60vh; } }
.cs-map { width: 100%; height: 100%; background: #F8F9FA; }
.cs-marker { width: 20px; height: 20px; border-radius: 50%; background: var(--fac-map-pin, #D7263D); border: 3px solid #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35), 0 2px 6px rgba(0, 0, 0, 0.45); transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease; transform-origin: 50% 100%; will-change: transform; }
/* `filter: brightness(.7)` derives the hover/active pin from the configured
 * `--fac-map-pin` automatically, so the darker selected state tracks any
 * chosen pin color without needing a second config field. */
.cs-marker-active, .cs-marker.cs-marker-active { transform: scale(1.35); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.45), 0 4px 12px rgba(0, 0, 0, 0.55); filter: brightness(0.7); z-index: 1; }

/* Grid View — full-bleed results panel, 3 cards per row, no map.
 *
 * The default layout (`.cs-layout`) is a 2-column grid: left panel for
 * the cards, right panel for the map. Grid View collapses that to a
 * single 1fr column and hides the map panel entirely. The cards' own
 * `<ul class="cs-results">` flips from a vertical stack to a CSS grid
 * — 3 columns at ≥992px, 2 at 600–991px, 1 below.
 *
 * Card markup is unchanged; we only switch the layout context. The
 * Card markup is unchanged; we only switch the layout context. */
.cs-layout.is-view-grid { grid-template-columns: 1fr; }
.cs-layout.is-view-grid .cs-map-panel { display: none; }
.cs-layout.is-view-grid .cs-panel { border-right: 0; }
.cs-layout.is-view-grid .cs-results { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.cs-layout.is-view-grid .cs-card { margin-bottom: 0; }
@media (max-width: 991px) {
  .cs-layout.is-view-grid .cs-results { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .cs-layout.is-view-grid .cs-results { grid-template-columns: 1fr; }
}

.cs-filter-drawer { z-index: 1060 !important; }
/* Pin the drawer to the right edge of the viewport with anchored top/right/bottom,
 * bypassing Bootstrap's `.modal-dialog` margin/positioning. Selector is chained
 * (`.cs-filter-drawer .cs-filter-drawer__dialog`) to outrank Bootstrap's
 * same-specificity `.modal-dialog` rule. The dialog is also the flex column so
 * the inner overflow chain doesn't depend on `.modal-content { height: 100% }`
 * resolving against an unconstrained Bootstrap `.modal`. */
.cs-filter-drawer .cs-filter-drawer__dialog { width: 100%; max-width: 420px; margin: 0; position: fixed; top: 0; right: 0; bottom: 0; z-index: 1; display: flex; flex-direction: column; }
.cs-filter-drawer .modal-content { border-radius: 0; border: 0; flex: 1 1 auto; min-height: 0; }
.cs-filter-drawer__header { flex: 0 0 auto; padding: 16px 20px; border-bottom: 1px solid #C3CED5; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cs-filter-drawer__header .modal-title { font-size: 1.8rem; font-family: "Nunito Sans Bold", sans-serif; color: var(--fac-text-primary, #184681); margin: 0; flex: 1; }
/* Override Bootstrap's `.close` defaults — float-right positioning, small font-size, and the legacy theme treatment elsewhere on the site. We want a flat, larger glyph on the same row as the title. */
.cs-filter-drawer__header .close { float: none; margin: 0; padding: 0 4px; font-size: 3.2rem; font-weight: 400; line-height: 1; color: var(--fac-text-primary, #184681); opacity: 0.85; background: transparent; border: 0; cursor: pointer; transition: opacity 120ms ease; }
.cs-filter-drawer__header .close:hover, .cs-filter-drawer__header .close:focus-visible { opacity: 1; outline: none; }
.cs-filter-drawer__header .close:focus-visible { outline: 2px solid var(--fac-primary, #184681); outline-offset: 2px; border-radius: 4px; }
/* `min-height: 0` is critical: without it a flex column child defaults to
 * `min-height: auto` (= intrinsic content height) and refuses to shrink, so
 * `overflow-y: auto` never triggers and the whole drawer grows to fit content
 * instead of scrolling internally. With it set, the body shrinks to fill
 * remaining space and scrolls — keeping header and footer always in view. */
.cs-filter-drawer__body { padding: 16px 20px; overflow-y: auto; flex: 1 1 auto; min-height: 0; }
/* Drawer becomes a flex column so the body scrolls but the footer always
 * stays in view. Header and footer are flex-fixed (set above / below) so
 * only the body flexes and absorbs leftover height. */
.cs-filter-drawer .modal-content { display: flex; flex-direction: column; }
.cs-filter-drawer__footer { flex: 0 0 auto; display: flex; gap: 12px; padding: 12px 20px; border-top: 1px solid #C3CED5; background: #fff; }
.cs-filter-drawer__footer button { flex: 1 1 0; padding: 11px 16px; border-radius: 6px; font-family: "Nunito Sans Bold", sans-serif; font-size: 1.4rem; line-height: 1.2; cursor: pointer; transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease; }
.cs-filter-drawer__clear { background: #fff; color: var(--fac-text-primary, #184681); border: 1px solid var(--fac-primary, #184681); }
.cs-filter-drawer__clear:hover, .cs-filter-drawer__clear:focus-visible { background: #EEF2F6; outline: none; }
.cs-filter-drawer__apply { background: var(--fac-primary, #184681); color: #fff; border: 1px solid var(--fac-primary, #184681); }
.cs-filter-drawer__apply:hover, .cs-filter-drawer__apply:focus-visible { background: #0f3261; outline: none; }
.cs-filter-drawer__footer button:focus-visible { outline: 2px solid var(--fac-primary, #184681); outline-offset: 2px; }
.cs-filter-drawer__body fieldset { border: 0; padding: 0; margin: 0 0 20px; }
/* Reset the legacy `forms.css` rule (`fieldset legend { border:1px solid #eaeaea; display:inline-block; padding:5px; text-transform:uppercase; margin-left:10px; }`) which leaks through here. Applies to every legend in the drawer so visually-hidden category legends stay invisible. */
.cs-filter-drawer__body fieldset > legend { border: 0; display: block; width: auto; text-transform: none; margin-left: 0; padding: 0; }
/* Section titles: the rating legend (visible) and the "Services Offered" h3. Scoped explicitly so we don't paint a divider on the services-category legends, which Drupal renders as a visible <legend> wrapping a visually-hidden <span>. The wrapping legend has no text but would still show its border-bottom — that was the phantom second divider. */
/* `text-transform: none` and `letter-spacing: normal` are needed because the site root carries `.headings-wide-spacing-enabled`, which applies `text-transform: uppercase; letter-spacing: 0.2em` to every h3 in `base/elements.css`. Without these resets, "Services Offered" renders as "SERVICES OFFERED". */
.cs-filter-drawer__body fieldset.cs-rating-filter > legend, .cs-filter-drawer__body .cs-filter-section-title { font-size: 1.5rem; font-family: "Nunito Sans Bold", sans-serif; color: var(--fac-text-primary, #184681); padding: 0 0 8px; margin: 0 0 12px; border-bottom: 1px solid #C3CED5; display: block; width: 100%; text-transform: none; letter-spacing: normal; }
/* Drupal renders each #type=checkboxes group as a fieldset.form-item, and each option as a .form-item div. Global `forms.css` sets `.form-item { margin: 20px 0 }`, which stacks twice and produces the dead space below the "Services Offered" heading. Collapse that within the services filter and tighten the per-checkbox rhythm. */
.cs-filter-drawer__body .cs-services-filter, .cs-filter-drawer__body .cs-services-filter .form-item, .cs-filter-drawer__body .cs-services-filter .form-checkboxes, .cs-filter-drawer__body .cs-services-filter .fieldset-wrapper { margin: 0; }
.cs-filter-drawer__body .cs-services-filter .form-type-checkbox { margin: 6px 0; }
.cs-filter-drawer.in .modal-dialog, .cs-filter-drawer.show .modal-dialog { transform: none; }

/* Min-rating chip group inside the filter drawer.
 * Drupal renders #type=radios as a <fieldset> with a <legend> + per-option
 * <div class="form-item form-type-radio">. We hide the native radio,
 * paint the <label> as a chip, and reuse the .cs-card__stars mask so
 * filled / hover state mirror the card-level star block. The mask pulls
 * its fill percentage from the inline custom property `--cs-star-pct`
 * applied by fac_findacontractor_search.js when a chip is selected. */
.cs-filter-drawer__body fieldset.cs-rating-filter > legend { margin-bottom: 8px; }
.cs-filter-drawer__body .cs-rating-filter .form-item { display: inline-block; margin: 0 8px 8px 0; }
.cs-filter-drawer__body .cs-rating-filter .form-item input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.cs-filter-drawer__body .cs-rating-filter .form-item label { display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border: 1px solid #C3CED5; border-radius: 999px; cursor: pointer; font-family: "Nunito Sans Medium", sans-serif; font-size: 1.4rem; color: #4f5263; line-height: 1.2; background: #fff; transition: border-color 120ms ease, background-color 120ms ease, color 120ms ease; }
/* Gold-star glyph appended to every rating chip except "All". Reuses the same star polygon as `.cs-card__stars` so the rating chips and the per-card rating block read as the same icon family. The mask + background-color trick lets the star track the label color (gold by default, white when the chip is selected). */
.cs-filter-drawer__body .cs-rating-filter .form-item label::after { content: ""; display: inline-block; width: 16px; height: 16px; background: #F4B400; -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'><polygon points='7,0 9,5 14,5 10,8 11,13 7,10 3,13 4,8 0,5 5,5'/></svg>") no-repeat center / contain; mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'><polygon points='7,0 9,5 14,5 10,8 11,13 7,10 3,13 4,8 0,5 5,5'/></svg>") no-repeat center / contain; }
.cs-filter-drawer__body .cs-rating-filter .form-item input[value="0"] + label::after { content: none; }
.cs-filter-drawer__body .cs-rating-filter .form-item label:hover, .cs-filter-drawer__body .cs-rating-filter .form-item label:focus-within { border-color: var(--fac-primary, #184681); }
.cs-filter-drawer__body .cs-rating-filter .form-item input[type="radio"]:checked + label { background: var(--fac-primary, #184681); border-color: var(--fac-primary, #184681); color: #fff; }
.cs-filter-drawer__body .cs-rating-filter .form-item input[type="radio"]:checked + label::after { background: #fff; }
.cs-filter-drawer__body .cs-rating-filter .form-item input[type="radio"]:focus-visible + label { outline: 2px solid var(--fac-primary, #184681); outline-offset: 2px; }
@media (max-width: 767px) {
  .cs-filter-drawer .modal-dialog { transform: translateX(100%); transition: transform 220ms ease; }
  .cs-filter-drawer.in .modal-dialog, .cs-filter-drawer.show .modal-dialog { transform: translateX(0); }
}

/* Step 61: infinite-scroll replaces Load More. The wrapper stays in the DOM (Drupal's AJAX framework still owns the request — JS clicks the link programmatically when scroll progress passes 80%) but is hidden. Small ring spinner is anchored to .cs-panel's bottom edge during the fetch. */
.path-homeequipment:has(.cs-layout) #load-more-wrap, .path-homeequipment:has(.cs-layout) .load_more { display: none !important; }
.cs-loading-spinner { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); width: 20px; height: 20px; border: 2px solid rgba(24, 70, 129, 0.2); border-top-color: var(--fac-primary, #184681); border-radius: 50%; pointer-events: none; opacity: 0; transition: opacity 150ms ease-out; animation: cs-spin 0.8s linear infinite; z-index: 6; }
.cs-loading-spinner.is-active { opacity: 1; }
@keyframes cs-spin { to { transform: translateX(-50%) rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .cs-loading-spinner { animation: none; opacity: 0; }
  .cs-loading-spinner.is-active { opacity: 0.6; }
}

/* Tag chip — used for every multi-value block on the card and inside
 * the InfoWindow: services provided, counties served, and the custom
 * filter category assignments. Each value renders as one chip, wrapped
 * by `.cs-card__tags` so the chip group can flow inline next to its
 * label and wrap onto multiple lines when needed.
 *
 * Visual spec mirrors the design reference: rounded rectangle, thin
 * neutral border, light fill, regular weight body type. No
 * background-image or icon — these are read-only display tags, not
 * interactive remove-chips. */
.cs-tag { display: inline-block; padding: 3px 10px; margin: 2px 0; border: 1px solid #C3CED5; border-radius: 6px; background: #fff; font-family: "Nunito Sans Medium", sans-serif; font-size: 1.2rem; color: #4f5263; line-height: 1.4; white-space: nowrap; }
.cs-card__tags { display: inline-flex; flex-wrap: wrap; gap: 4px; vertical-align: top; }

/* Custom filter category assignments rendered inside `cs-card__more`
 * (collapsed by default, surfaced when the card is expanded). Each
 * category block is a single line: bold blue label + comma-joined
 * values. Rhythm matches `.cs-card__counties` so consecutive blocks
 * read as a single metadata stack. */
.cs-card__categories { margin-top: 8px; font-size: 1.3rem; font-family: "Nunito Sans Medium", sans-serif; color: #4f5263; line-height: 1.4; }
.cs-card__category + .cs-card__category { margin-top: 4px; }
.cs-card__category-label { font-family: "Nunito Sans Bold", sans-serif; color: var(--fac-text-primary, #184681); margin-right: 4px; }
.cs-card__category-value { word-break: normal; overflow-wrap: anywhere; }

/* Google Maps InfoWindow body (Path B — compact card preview).
 *
 * The popup body is cloned from the list card, so most styling cascades
 * for free (rating mask, contact rows, category block). We only need to
 * tighten layout for the smaller container and override Maps' default
 * `.gm-style-iw` padding so the content reaches the close-X edge cleanly.
 *
 * Width is capped to 280px — wider than that and Maps' viewport-collision
 * logic starts dragging the popup tail off the marker on dense pin
 * clusters. Vertical scroll is allowed so a contractor with a long
 * services + categories tail still fits without flexing the popup. */
.cs-iw { font-family: "Nunito Sans Medium", sans-serif; color: #4f5263; max-width: 280px; padding: 0; }
.cs-iw__name { margin: 0 36px 8px 0; font-family: "Nunito Sans Bold", sans-serif; font-size: 1.5rem; color: var(--fac-text-primary, #184681); line-height: 1.2; text-transform: none; letter-spacing: normal; }
.cs-iw .cs-card__rating { margin: 0 0 8px; }
/* `<dd>` carries a UA-default `margin-inline-start: 40px` because the
 * card's outer `<dl>` was not cloned. Force-reset the inline margins
 * so the address/phone/email/web rows align flush with the title. */
.cs-iw .cs-card__row { margin: 4px 0; padding: 0; font-size: 1.3rem; }
.cs-iw .cs-card__services { padding: 6px 0 0; margin: 8px 0 0; font-size: 1.3rem; line-height: 1.4; border-top: 1px solid #C3CED5; }
.cs-iw .cs-card__service { margin: 2px 0; }
.cs-iw .cs-card__service-name { font-family: "Nunito Sans Bold", sans-serif; color: var(--fac-text-primary, #184681); margin-right: 4px; }
.cs-iw .cs-card__counties { margin-top: 8px; padding-top: 6px; border-top: 1px solid #C3CED5; }
.cs-iw .cs-card__categories { margin-top: 8px; padding-top: 6px; border-top: 1px solid #C3CED5; }

/* Tighten Google Maps' default InfoWindow chrome.
 *
 * Maps renders the popup as two stacked siblings inside `.gm-style-iw-c`:
 *   .gm-style-iw-chr  → close-button row (a 48×48 button = 48px tall)
 *   .gm-style-iw-d    → body / scroll wrapper
 * Out of the box that close-button row pushes the body 48px down, which
 * reads as awkward dead space above the contractor name.
 *
 * Critical: leave `.gm-style-iw-c`'s own `position` alone. Maps sets
 * it to `absolute` to anchor the popup to the marker, and any override
 * (including `position: relative`) untethers the popup from its pin
 * and floats it to the top of the page.
 *
 * Approach: `display: contents` on `.gm-style-iw-chr` removes the
 * close-button row from flow without affecting `.gm-style-iw-c`'s
 * positioning. The button itself becomes an absolute child of
 * `.gm-style-iw-c` (which is already a containing block via its
 * Maps-applied `position: absolute`), pinned to the top-right corner.
 * Body content now starts flush with the top of the popup; the title's
 * `margin-right: 36px` keeps long names clear of the close-X.
 *
 * `:has()` scopes every override to popups whose body is `.cs-iw`, so
 * any other Maps overlays (Street View, etc.) keep their stock chrome.
 * Modern Chrome / Safari / Firefox all support `:has()`. */
.gm-style-iw-c:has(.cs-iw) { padding: 12px !important; }
.gm-style-iw-c:has(.cs-iw) .gm-style-iw-chr { display: contents; }
.gm-style-iw-c:has(.cs-iw) .gm-ui-hover-effect { position: absolute !important; top: 4px !important; right: 4px !important; width: 28px !important; height: 28px !important; z-index: 1 !important; }
.gm-style-iw-c:has(.cs-iw) .gm-ui-hover-effect > span { width: 16px !important; height: 16px !important; margin: 6px !important; }
.gm-style-iw-d:has(.cs-iw) { overflow: auto !important; padding: 0 !important; }
