/**
 * Locations-by-state shortcode layout (Figma service areas lists).
 * County headings + responsive city grids with even spacing.
 * Specificity is intentionally high to beat Oxygen / theme list styles.
 */

.lhd-locations-by-state {
	--lhd-loc-blue: var(--lhd-primary, #014f83);
	--lhd-loc-gold: var(--lhd-yellow, #daa520);
	--lhd-loc-gap-section: 32px;
	--lhd-loc-gap-county: 16px;
	--lhd-loc-gap-col: clamp(24px, 4vw, 56px);
	--lhd-loc-pad-y-start: 12px;
	--lhd-loc-pad-y-end: 16px;
	--lhd-loc-pad-x: 10px;
	width: 100%;
	display: flex;
	flex-direction: column;
	gap: var(--lhd-loc-gap-section);
	box-sizing: border-box;
}

.lhd-locations-by-state *,
.lhd-locations-by-state *::before,
.lhd-locations-by-state *::after {
	box-sizing: border-box;
}

.lhd-locations-by-state .lhd-locations-by-state__state {
	display: flex;
	flex-direction: column;
	gap: var(--lhd-loc-gap-section);
	width: 100%;
}

.lhd-locations-by-state .lhd-locations-by-state__state-title {
	margin: 0;
	color: var(--lhd-loc-blue);
	font-family: var(--lhd-font-heading, Anton, sans-serif);
	font-size: 32px;
	font-weight: 400;
	line-height: 1.3;
	text-transform: uppercase;
}

.lhd-locations-by-state .lhd-locations-by-state__state-title:not(.lhd-locations-by-state__state-title--show) {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	clip-path: inset(50%) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

.lhd-locations-by-state .lhd-locations-by-state__counties {
	display: flex;
	flex-direction: column;
	gap: var(--lhd-loc-gap-section);
	width: 100%;
}

.lhd-locations-by-state .lhd-locations-by-state__county {
	display: flex;
	flex-direction: column;
	gap: var(--lhd-loc-gap-county);
	width: 100%;
}

.lhd-locations-by-state .lhd-locations-by-state__county-title,
.lhd-locations-by-state h2.lhd-locations-by-state__county-title,
.lhd-locations-by-state h3.lhd-locations-by-state__county-title,
.lhd-locations-by-state h4.lhd-locations-by-state__county-title {
	margin: 0 !important;
	padding: var(--lhd-loc-pad-y-start) var(--lhd-loc-pad-x) var(--lhd-loc-pad-y-end) !important;
	color: var(--lhd-loc-gold) !important;
	font-family: var(--lhd-font-heading, Anton, sans-serif) !important;
	font-size: 32px !important;
	font-weight: 400 !important;
	line-height: 1.3 !important;
	text-transform: none;
}

.lhd-locations-by-state .lhd-locations-by-state__county-title a,
.lhd-locations-by-state .lhd-locations-by-state__city a,
.lhd-locations-by-state .lhd-locations-by-state__city-label a {
	color: inherit !important;
	text-decoration: none !important;
}

.lhd-locations-by-state ul.lhd-locations-by-state__cities {
	list-style: none !important;
	list-style-type: none !important;
	margin: 0 !important;
	padding: 0 !important;
	display: grid !important;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	column-gap: var(--lhd-loc-gap-col);
	row-gap: 0;
	width: 100%;
}

.lhd-locations-by-state ul.lhd-locations-by-state__cities > li.lhd-locations-by-state__city {
	display: flex !important;
	align-items: center !important;
	float: none !important;
	width: auto !important;
	max-width: none !important;
	margin: 0 !important;
	padding: var(--lhd-loc-pad-y-start) var(--lhd-loc-pad-x) var(--lhd-loc-pad-y-end) !important;
	border: 0 !important;
	border-bottom: 1px solid var(--lhd-loc-blue) !important;
	border-radius: 0 !important;
	background: transparent !important;
	color: var(--lhd-loc-blue) !important;
	font-family: var(--lhd-font-body, Inter, sans-serif) !important;
	font-size: 20px !important;
	font-weight: 700 !important;
	line-height: 1.35 !important;
	list-style: none !important;
	list-style-type: none !important;
	min-width: 0;
}

.lhd-locations-by-state ul.lhd-locations-by-state__cities > li.lhd-locations-by-state__city::marker {
	content: '' !important;
	display: none !important;
}

.lhd-locations-by-state ul.lhd-locations-by-state__cities > li.lhd-locations-by-state__city::before {
	content: '' !important;
	flex: 0 0 6px !important;
	display: block !important;
	width: 6px !important;
	height: 6px !important;
	margin: 0 14px 0 0 !important;
	border-radius: 50% !important;
	background: var(--lhd-loc-blue) !important;
}

.lhd-locations-by-state .lhd-locations-by-state__city-label {
	min-width: 0;
	overflow-wrap: anywhere;
}

/* A–Z letter filter (letter_filter="1") */
.lhd-locations-filter-wrap {
	display: flex;
	flex-direction: column;
	width: 100%;
}

.lhd-locations-filter {
	--lhd-loc-blue: var(--lhd-primary, #014f83);
	--lhd-loc-gold: var(--lhd-yellow, #daa520);
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	width: 100%;
	margin: 0 0 40px;
}

.lhd-locations-filter .lhd-locations-filter__btn {
	min-width: 44px;
	height: 44px;
	margin: 0;
	padding: 0 10px;
	border: 1px solid var(--lhd-loc-blue);
	border-radius: 0;
	background: #fff;
	color: var(--lhd-loc-blue);
	font-family: var(--lhd-font-heading, Anton, sans-serif);
	font-size: 22px;
	font-weight: 400;
	line-height: 1;
	text-transform: uppercase;
	cursor: pointer;
	transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.lhd-locations-filter .lhd-locations-filter__btn--all {
	padding: 0 18px;
}

@media (hover: hover) {
	.lhd-locations-filter .lhd-locations-filter__btn:hover {
		border-color: var(--lhd-loc-gold);
		color: var(--lhd-loc-gold);
	}

	.lhd-locations-filter .lhd-locations-filter__btn.is-active:hover {
		border-color: var(--lhd-loc-gold);
		background: var(--lhd-loc-gold);
		color: #fff;
	}
}

.lhd-locations-filter .lhd-locations-filter__btn:focus-visible {
	outline: 2px solid var(--lhd-loc-gold);
	outline-offset: 2px;
}

.lhd-locations-filter .lhd-locations-filter__btn.is-active {
	border-color: var(--lhd-loc-blue);
	background: var(--lhd-loc-blue);
	color: #fff;
}

.lhd-locations-by-state .lhd-locations-by-state__county[hidden] {
	display: none !important;
}

/* Tablet: 2 columns, desktop fonts */
@media (max-width: 1023px) {
	.lhd-locations-by-state {
		--lhd-loc-gap-section: 28px;
		--lhd-loc-gap-col: 28px;
	}

	.lhd-locations-by-state ul.lhd-locations-by-state__cities {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* Mobile: 1 column, mobile fonts */
@media (max-width: 767px) {
	.lhd-locations-by-state {
		--lhd-loc-gap-section: 24px;
		--lhd-loc-gap-county: 12px;
		--lhd-loc-gap-col: 0;
		--lhd-loc-pad-y-start: 10px;
		--lhd-loc-pad-y-end: 12px;
		--lhd-loc-pad-x: 8px;
	}

	.lhd-locations-by-state ul.lhd-locations-by-state__cities {
		grid-template-columns: 1fr;
	}

	.lhd-locations-by-state .lhd-locations-by-state__county-title,
	.lhd-locations-by-state h3.lhd-locations-by-state__county-title {
		font-size: 24px !important;
	}

	.lhd-locations-by-state ul.lhd-locations-by-state__cities > li.lhd-locations-by-state__city {
		font-size: 16px !important;
	}

	.lhd-locations-by-state ul.lhd-locations-by-state__cities > li.lhd-locations-by-state__city::before {
		margin-right: 12px !important;
	}

	.lhd-locations-filter {
		gap: 6px;
		margin-bottom: 28px;
	}

	.lhd-locations-filter .lhd-locations-filter__btn {
		min-width: 38px;
		height: 38px;
		font-size: 18px;
	}
}
