/**
 * Camber customer map.
 *
 * Uses the GeneratePress global colors like the Camber Projects plugin:
 * navy #002f67, blue #0f75bc, yellow #ffd400, panel #f7f8f9.
 * Type inherits the site font (Albert Sans).
 */

.ccm {
	--ccm-navy: var(--global-color-8, #002f67);
	--ccm-blue: var(--global-color-9, #0f75bc);
	--ccm-yellow: var(--global-color-11, #ffd400);
	--ccm-bg: var(--base-2, #f7f8f9);
	--ccm-text: var(--contrast, #222222);
	--ccm-muted: var(--contrast-2, #575760);
	--ccm-line: #dfe5ec;
	--ccm-width: var(--gb-container-width, 1200px);

	padding: 80px 0;
	color: var(--ccm-text);
	background: var(--ccm-bg);
}

.ccm__inner {
	position: relative;
	max-width: var(--ccm-width);
	margin: 0 auto;
	padding: 0 30px;
}

/* Heading ----------------------------------------------------------------- */

.ccm__header {
	max-width: 760px;
	margin-bottom: 28px;
}

.ccm__title {
	margin: 0 0 12px;
	font-size: 32px;
	font-weight: 600;
	line-height: 1.2;
	color: var(--ccm-navy);
}

.ccm__intro {
	max-width: 66ch;
	margin: 0;
	font-size: 17px;
	line-height: 1.6;
	color: var(--ccm-muted);
}

/* Segment filters ----------------------------------------------------------- */

.ccm__filters {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 24px;
}

.ccm__filters[hidden] {
	display: none;
}

.ccm__filter {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	padding: 8px 16px;
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	color: var(--ccm-navy);
	background: #fff;
	border: 1px solid #c9d3df;
	border-radius: 0;
	cursor: pointer;
	transition: border-color 0.2s, background-color 0.2s, color 0.2s;
}

.ccm__filter-count {
	font-weight: 500;
	color: var(--ccm-muted);
}

.ccm__filter[aria-pressed="true"] {
	color: #fff;
	background: var(--ccm-navy);
	border-color: var(--ccm-navy);
}

.ccm__filter[aria-pressed="true"] .ccm__filter-count {
	color: rgba(255, 255, 255, 0.8);
}

.ccm__filter:focus-visible {
	outline: 2px solid var(--ccm-navy);
	outline-offset: 2px;
}

@media (hover: hover) {
	.ccm__filter:hover {
		border-color: var(--ccm-blue);
	}
}

/* Map ---------------------------------------------------------------------- */

.ccm__stage {
	position: relative;
}

.ccm__stage[hidden] {
	display: none;
}

.ccm__map {
	position: relative;
	width: 100%;
}

/* Keep the whole map, with its filters, within a desktop screen. */
@media (min-width: 768px) {
	.ccm__map {
		max-width: max(560px, calc((100vh - 200px) * 1000 / 751));
		margin: 0 auto;
	}
}

.ccm__base {
	position: absolute;
	inset: 0;
}

.ccm__inset-label {
	font-size: 15px;
	font-weight: 600;
	fill: var(--ccm-muted);
}

/* Skip link: hidden until focused. */
.ccm__skip {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
}

.ccm__skip:focus {
	position: absolute;
	z-index: 20;
	display: inline-block;
	width: auto;
	height: auto;
	margin-bottom: 12px;
	padding: 8px 14px;
	overflow: visible;
	clip: auto;
	clip-path: none;
	font-size: 15px;
	font-weight: 600;
	color: #fff;
	background: var(--ccm-navy);
	outline: 2px solid var(--ccm-navy);
	outline-offset: 2px;
}

.ccm__skip[hidden] {
	display: none;
}

.ccm__svg {
	display: block;
	width: 100%;
	height: 100%;
}

.ccm__svg path,
.ccm__svg rect {
	vector-effect: non-scaling-stroke;
}

.ccm__other {
	fill: #e8ecf1;
}

.ccm__region {
	fill: #dbe3ec;
	transition: fill 0.2s;
}

.ccm__region.is-served {
	fill: #c7d6e7;
}

/* Light enough that a blue pin on it still has 3:1 contrast. */
.ccm__region.is-active {
	fill: #b8cfe6;
}

.ccm__lakes {
	fill: var(--ccm-bg);
}

.ccm__lines {
	fill: none;
	stroke: #fff;
	stroke-width: 0.8;
}

.ccm__border {
	fill: none;
	stroke: #fff;
	stroke-width: 1.8;
}

.ccm__inset {
	fill: var(--ccm-bg);
	stroke: #c9d3df;
	stroke-width: 1;
}

.ccm__markers {
	position: absolute;
	inset: 0;
}

/* Pins: a 24px target around a 14px dot. */
.ccm__pin,
.ccm__cluster {
	position: absolute;
	padding: 0;
	font-family: inherit;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	transform: translate(-50%, -50%);
}

.ccm__pin {
	width: 24px;
	height: 24px;
	background: transparent;
}

.ccm__pin::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 14px;
	height: 14px;
	background: var(--ccm-blue);
	border: 2px solid #fff;
	border-radius: 50%;
	box-shadow: 0 1px 3px rgba(0, 47, 103, 0.3);
	transform: translate(-50%, -50%);
	transition: background-color 0.2s, box-shadow 0.2s;
}

.ccm__cluster {
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	background: var(--ccm-navy);
	border: 2px solid #fff;
	border-radius: 50%;
	box-shadow: 0 1px 4px rgba(0, 47, 103, 0.35);
	transition: background-color 0.2s, box-shadow 0.2s;
}

.ccm__cluster-count {
	font-size: 13px;
	font-weight: 700;
	line-height: 1;
}

.ccm__pin.is-open,
.ccm__cluster.is-open {
	z-index: 2;
}

.ccm__pin.is-open::before {
	background: var(--ccm-navy);
	box-shadow: 0 0 0 3px var(--ccm-yellow);
}

.ccm__cluster.is-open {
	background: var(--ccm-blue);
	box-shadow: 0 0 0 3px var(--ccm-yellow);
}

.ccm__pin:focus-visible,
.ccm__cluster:focus-visible {
	z-index: 3;
	outline: 2px solid var(--ccm-navy);
	outline-offset: 2px;
}

@media (hover: hover) {
	.ccm__pin:hover {
		z-index: 2;
	}

	.ccm__pin:hover::before {
		background: var(--ccm-navy);
	}

	.ccm__cluster:hover {
		z-index: 2;
		background: var(--ccm-blue);
	}
}

/* GeneratePress greys out every button on hover and focus; keep ours. */
.ccm .ccm__filter:hover,
.ccm .ccm__filter:focus {
	color: var(--ccm-navy);
	background-color: #fff;
}

.ccm .ccm__filter[aria-pressed="true"]:hover,
.ccm .ccm__filter[aria-pressed="true"]:focus {
	color: #fff;
	background-color: var(--ccm-navy);
}

.ccm .ccm__pin:hover,
.ccm .ccm__pin:focus {
	background-color: transparent;
}

.ccm .ccm__cluster:focus {
	color: #fff;
	background-color: var(--ccm-navy);
}

.ccm .ccm__cluster:hover,
.ccm .ccm__cluster.is-open {
	color: #fff;
	background-color: var(--ccm-blue);
}

.ccm .ccm__close:hover,
.ccm .ccm__close:focus {
	color: var(--ccm-navy);
	background-color: transparent;
}

@media (hover: hover) {
	.ccm .ccm__close:hover {
		background-color: var(--ccm-bg);
	}
}

/* Popup -------------------------------------------------------------------- */

.ccm__popover {
	position: absolute;
	z-index: 10;
	width: 300px;
	padding: 20px 20px 18px;
	background: #fff;
	border: 1px solid var(--ccm-line);
	border-top-right-radius: 30px;
	box-shadow: 0 12px 32px rgba(0, 47, 103, 0.16);
}

.ccm__popover[hidden] {
	display: none;
}

.ccm__popover.is-list {
	width: 340px;
}

.ccm__close {
	position: absolute;
	top: 10px;
	right: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	padding: 0;
	color: var(--ccm-navy);
	background: transparent;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
}

.ccm__close:focus-visible {
	outline: 2px solid var(--ccm-navy);
	outline-offset: 0;
}

.ccm__pop-title {
	margin: 0 36px 6px 0;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--ccm-navy);
}

.ccm__pop-title:focus {
	outline: none;
}

.ccm__pop-place {
	margin: 0 0 4px;
	font-size: 15px;
	line-height: 1.5;
	color: var(--ccm-text);
}

.ccm__pop-meta {
	margin: 0;
	font-size: 14px;
	line-height: 1.5;
	color: var(--ccm-muted);
}

.ccm__meta > span + span::before,
.ccm__list-meta > span + span::before {
	content: "\00b7";
	margin: 0 6px;
}

.ccm__link {
	display: inline-flex;
	align-items: center;
	min-height: 40px;
	margin-top: 14px;
	padding: 6px 16px;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.07em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--ccm-navy);
	background-color: #fff;
	background-image: linear-gradient(90deg, var(--ccm-blue) 50%, transparent 50%);
	background-position: bottom right;
	background-size: 200% 200%;
	border: 2px solid var(--ccm-blue);
	border-left-width: 5px;
	transition: background-position 0.7s, color 0.3s;
}

.ccm__link:focus-visible {
	color: #fff;
	background-position: top left;
	outline: 2px solid var(--ccm-navy);
	outline-offset: 2px;
}

@media (hover: hover) {
	.ccm__link:hover {
		color: #fff;
		background-position: top left;
	}
}

.ccm__pop-scroll {
	max-height: 280px;
	margin: 10px -20px 0 0;
	padding: 0 20px 0 0;
	overflow-y: auto;
}

/* More sites below: fade the last row so the list reads as scrollable. */
.ccm__pop-scroll.has-more {
	-webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 48px), transparent);
	mask-image: linear-gradient(to bottom, #000 calc(100% - 48px), transparent);
}

.ccm__pop-scroll:focus-visible {
	outline: 2px solid var(--ccm-navy);
	outline-offset: 2px;
}

.ccm__pop-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.ccm__pop-item {
	margin: 0;
	padding: 10px 0;
	border-top: 1px solid var(--ccm-line);
}

.ccm__pop-name {
	display: block;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.35;
	color: var(--ccm-navy);
}

a.ccm__pop-name {
	text-decoration: underline;
	text-underline-offset: 2px;
}

a.ccm__pop-name:hover,
a.ccm__pop-name:focus-visible {
	color: var(--ccm-blue);
}

.ccm__pop-item .ccm__meta {
	display: block;
	margin-top: 2px;
	font-size: 13px;
	line-height: 1.45;
	color: var(--ccm-muted);
}

/* Button under the map ([camber_customer_map_cta]), matching the site's
   GenerateBlocks buttons; drk-btn (Simple CSS) adds the blue sweep on hover. */

.ccm__cta {
	margin-top: 32px;
	text-align: center;
}

.ccm .ccm__cta-button {
	display: inline-flex;
	align-items: center;
	padding: 12px 35px;
	font-size: 15px;
	font-weight: 600;
	letter-spacing: 0.07em;
	text-transform: uppercase;
	text-align: center;
	text-decoration: none;
	color: var(--global-color-8);
	background-color: var(--base-3);
	border: 2px solid var(--global-color-9);
	border-left-width: 5px;
}

.ccm .ccm__cta-button:hover,
.ccm .ccm__cta-button:focus {
	color: var(--base-3);
	background-color: var(--base-3);
}

.ccm .ccm__cta-button:focus-visible {
	outline: 2px solid var(--ccm-navy);
	outline-offset: 4px;
}

/* Full list ------------------------------------------------------------------ */

.ccm__list {
	margin-top: 32px;
}

.ccm__list-toggle {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 44px;
	font-size: 15px;
	font-weight: 600;
	letter-spacing: 0.07em;
	text-transform: uppercase;
	color: var(--ccm-navy);
	cursor: pointer;
	list-style: none;
}

.ccm__list-toggle::-webkit-details-marker {
	display: none;
}

.ccm__list-toggle::after {
	content: "";
	width: 8px;
	height: 8px;
	margin-top: -4px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
	transition: transform 0.2s;
}

.ccm__list[open] .ccm__list-toggle::after {
	margin-top: 4px;
	transform: rotate(-135deg);
}

.ccm__list-toggle:focus-visible {
	outline: 2px solid var(--ccm-navy);
	outline-offset: 4px;
}

@media (hover: hover) {
	.ccm__list-toggle:hover {
		color: var(--ccm-blue);
	}
}

.ccm__list-groups {
	margin-top: 20px;
	columns: 3 260px;
	column-gap: 40px;
}

.ccm__list-group {
	margin-bottom: 24px;
	break-inside: avoid;
}

.ccm__list-region {
	margin: 0 0 8px;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--ccm-navy);
}

.ccm__list-count {
	font-weight: 500;
	color: var(--ccm-muted);
}

.ccm__list-sites {
	margin: 0;
	padding: 0;
	list-style: none;
}

.ccm__list-site {
	margin: 0 0 8px;
	font-size: 15px;
	line-height: 1.4;
}

.ccm__list-name {
	display: block;
	color: var(--ccm-text);
}

a.ccm__list-name {
	color: var(--ccm-navy);
	text-decoration: underline;
	text-underline-offset: 2px;
}

a.ccm__list-name:hover,
a.ccm__list-name:focus-visible {
	color: var(--ccm-blue);
}

.ccm__list-meta {
	display: block;
	font-size: 13px;
	color: var(--ccm-muted);
}

/* Phones: the popup sits under the map instead of over it. ------------------ */

@media (max-width: 767px) {
	.ccm {
		padding: 56px 0;
	}

	.ccm__inner {
		padding: 0 20px;
	}

	.ccm__title {
		font-size: 26px;
	}

	.ccm__intro {
		font-size: 16px;
	}

	.ccm__filters {
		gap: 6px;
	}

	.ccm__filter {
		padding: 8px 12px;
		font-size: 14px;
	}

	/* Edge to edge for a little more room. */
	.ccm__map {
		width: calc(100% + 40px);
		margin: 0 -20px;
	}

	.ccm__popover,
	.ccm__popover.is-list {
		position: relative;
		width: auto;
		margin-top: 16px;
		box-shadow: none;
	}

	/* Leave room above and below so a swipe on the page still scrolls it. */
	.ccm__pop-scroll {
		max-height: min(280px, 40vh);
	}

	/* Too small to read on a phone; the shape says Alaska. */
	.ccm__inset-label {
		display: none;
	}
}

/* Windows high contrast: colors are replaced, so mark states with borders. */
@media (forced-colors: active) {
	.ccm__filter[aria-pressed="true"] {
		color: HighlightText;
		background: Highlight;
		border: 2px solid Highlight;
	}

	.ccm__filter[aria-pressed="true"] .ccm__filter-count {
		color: HighlightText;
	}

	.ccm__pin::before {
		background: CanvasText;
		border-color: Canvas;
	}

	.ccm__pin.is-open::before,
	.ccm__cluster.is-open {
		outline: 3px solid Highlight;
		outline-offset: 2px;
	}

	.ccm__cluster {
		border-color: CanvasText;
	}

	.ccm__region.is-active {
		fill: Highlight;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ccm *,
	.ccm *::before,
	.ccm *::after {
		transition: none !important;
	}
}
