/* ─── Find a Dealer page ─────────────────────────────────────────────────────
 * /find-a-dealer/ (blocks/dealers/render.php). Headers reuse
 * .liv-archive__header / .liv-section__*, the FAQ + closing CTA reuse the
 * collection-page classes, so only the map, the dealer cards and the
 * "three ways" explainer need bespoke rules here. Titles set explicit sizes
 * (not the 5xl preset var) so they render the same everywhere.
 *
 * Also: the small "find a dealer" links placed on the contact page, model
 * pages and homepage build teaser (bottom of file). */

.liv-dealers__intro {
	padding-block-end: clamp(1.5rem, 3vw, 2.5rem);
}
.liv-dealers__head {
	max-width: 52rem;
	margin-block-end: clamp(1.25rem, 3vw, 2rem);
}
.liv-dealers__title {
	font-size: clamp(2.5rem, 5.5vw, 4.25rem);
	margin-block: 0.35rem 0.9rem;
}
.liv-dealers__intro .liv-section__lead {
	font-size: clamp(1.02rem, 1.4vw, 1.15rem);
	line-height: 1.6;
	margin: 0;
}
.liv-dealers__h2 {
	margin: 0.35rem 0 0;
	font-family: var(--wp--preset--font-family--display);
	font-size: clamp(1.75rem, 3.4vw, 2.5rem);
	letter-spacing: -0.02em;
	line-height: 1.05;
	color: var(--liv-paper);
}

/* Jump chips (one per location) */
.liv-dealers__jump ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}
.liv-dealers__jump a {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	min-height: 40px;
	padding: 0.45rem 0.95rem 0.45rem 0.75rem;
	border: 1px solid var(--liv-ink-500);
	border-radius: var(--r-pill);
	color: var(--liv-paper);
	font-size: 0.875rem;
	font-weight: 500;
	text-decoration: none;
	transition: border-color var(--liv-transition), background-color var(--liv-transition);
}
.liv-dealers__jump a:hover,
.liv-dealers__jump a:focus-visible {
	border-color: var(--liv-leaf-500);
	background: rgba(91, 160, 46, 0.08);
}
.liv-dealers__jump svg {
	width: 0.95rem;
	height: 0.95rem;
	color: var(--liv-leaf-300);
}

/* ─── Map + cards layout ───────────────────────────────────────────────── */

.liv-dealers__layout {
	display: grid;
	gap: clamp(1.5rem, 4vw, 3.5rem);
	align-items: start;
}
@media (min-width: 1024px) {
	.liv-dealers__layout {
		grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
		max-width: 1440px;
	}
	.liv-dealers__map {
		position: sticky;
		top: calc(var(--liv-header-h, 126px) + 1.5rem);
	}
}

/* Map card */
.liv-dealers__map {
	margin: 0;
	padding: clamp(0.75rem, 2.5vw, 2rem);
	overflow: hidden;
	border: 1px solid var(--liv-ink-700);
	border-radius: 0.75rem;
	background:
		radial-gradient(ellipse 60% 55% at 72% 62%, rgba(91, 160, 46, 0.12), transparent 70%),
		var(--liv-ink-900);
}
.liv-usmap {
	display: block;
	width: 100%;
	height: auto;
	overflow: visible;
}
/* Phones: zoom the map ~1.6× and crop the far West (no dealers there) so the
   pins and labels stay readable; fade the cropped edge. */
@media (max-width: 767px) {
	.liv-usmap {
		width: 160%;
		max-width: none;
		margin-inline-start: -55%;
	}
	.liv-dealers__map {
		-webkit-mask-image: linear-gradient(to right, transparent 0, #000 14%);
		        mask-image: linear-gradient(to right, transparent 0, #000 14%);
	}
}
.liv-usmap__states path {
	fill: #161616;
	stroke: #303030;
	stroke-width: 0.8;
	stroke-linejoin: round;
}
.liv-usmap__states path.is-dealer-state {
	fill: rgba(91, 160, 46, 0.2);
	stroke: rgba(151, 196, 89, 0.5);
}

/* Pins: leaf = LiV Factory Store, white = authorized dealer. Scale is driven
   by --pin-scale (hovering a card enlarges its pin — rule emitted inline by
   the block, since it's keyed by the registry). */
.liv-usmap__pin { cursor: pointer; }
.liv-usmap__dot,
.liv-usmap__pulse {
	transform-box: fill-box;
	transform-origin: center;
}
.liv-usmap__dot {
	fill: var(--liv-leaf-500);
	stroke: var(--liv-ink-900);
	stroke-width: 3;
	transform: scale(var(--pin-scale, 1));
	transition: transform var(--liv-transition);
}
.liv-usmap__pin--authorized .liv-usmap__dot { fill: var(--liv-paper); }
.liv-usmap__pulse {
	fill: none;
	stroke: var(--liv-leaf-300);
	stroke-width: 2;
	opacity: 0;
	animation: liv-usmap-pulse 2.8s ease-out infinite;
}
.liv-usmap__pin--authorized .liv-usmap__pulse { stroke: var(--liv-paper); }
.liv-usmap__pin:nth-child(2) .liv-usmap__pulse { animation-delay: 0.7s; }
.liv-usmap__pin:nth-child(3) .liv-usmap__pulse { animation-delay: 1.4s; }
.liv-usmap__pin:nth-child(4) .liv-usmap__pulse { animation-delay: 2.1s; }
@keyframes liv-usmap-pulse {
	0%   { transform: scale(0.7); opacity: 0.85; }
	100% { transform: scale(2.6); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
	.liv-usmap__pulse { animation: none; }
}
.liv-usmap__label {
	fill: var(--liv-paper);
	font-family: var(--wp--preset--font-family--body);
	font-size: 25px;
	font-weight: 600;
	letter-spacing: 0.01em;
	paint-order: stroke;
	stroke: var(--liv-ink-900);
	stroke-width: 6px;
	stroke-linejoin: round;
	pointer-events: none;
}
.liv-usmap__pin:hover .liv-usmap__label { fill: var(--liv-leaf-300); }

.liv-dealers__map-caption {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.5rem 1.5rem;
	margin-top: 0.75rem;
	font-size: 0.8rem;
	color: var(--liv-ink-300);
}
.liv-dealers__legend {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
}
.liv-dealers__legend::before {
	content: "";
	width: 0.6rem;
	height: 0.6rem;
	border-radius: 50%;
	background: var(--liv-leaf-500);
}
.liv-dealers__legend--authorized::before { background: var(--liv-paper); }

/* ─── Dealer cards ─────────────────────────────────────────────────────── */

.liv-dealers__cards-head { margin-block-end: 1.25rem; }

.liv-dealers__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 1rem;
}
.liv-dealer-card {
	margin: 0;
	padding: clamp(1.25rem, 2.6vw, 1.85rem);
	border: 1px solid var(--liv-ink-700);
	border-radius: 0.75rem;
	background: var(--liv-ink-900);
	scroll-margin-top: calc(var(--liv-header-h, 126px) + 1.5rem);
	transition: border-color var(--liv-transition), box-shadow var(--liv-transition);
}
.liv-dealer-card:hover,
.liv-dealer-card:focus-within {
	border-color: var(--liv-ink-500);
}
.liv-dealer-card:target {
	border-color: var(--liv-leaf-500);
	box-shadow: 0 0 0 1px var(--liv-leaf-500), 0 0 40px rgba(91, 160, 46, 0.12);
}

.liv-dealer-card__badge {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35rem 0.75rem;
	margin: 0;
}
.liv-dealer-card__badge-label {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	font-size: 0.6875rem;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--liv-leaf-300);
}
.liv-dealer-card__badge-label::before {
	content: "";
	width: 0.5rem;
	height: 0.5rem;
	border-radius: 50%;
	background: var(--liv-leaf-500);
}
.liv-dealer-card--authorized .liv-dealer-card__badge-label { color: var(--liv-paper); }
.liv-dealer-card--authorized .liv-dealer-card__badge-label::before { background: var(--liv-paper); }
.liv-dealer-card__badge-note {
	font-size: 0.8rem;
	color: var(--liv-ink-300);
}

.liv-dealer-card__place {
	margin: 0.7rem 0 0.15rem;
	font-family: var(--wp--preset--font-family--display);
	font-size: clamp(1.5rem, 2.6vw, 2rem);
	letter-spacing: -0.015em;
	line-height: 1.1;
	color: var(--liv-paper);
}
.liv-dealer-card__name {
	margin: 0;
	font-weight: 500;
	color: var(--liv-ink-200);
}
.liv-dealer-card__blurb {
	margin: 0.6rem 0 0;
	font-size: 0.95rem;
	line-height: 1.55;
	color: var(--liv-ink-300);
}

.liv-dealer-card__facts {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 12.5rem), 1fr));
	gap: 1.1rem 1.5rem;
	margin: 1.25rem 0 0;
	padding-top: 1.25rem;
	border-top: 1px solid var(--liv-ink-700);
}
.liv-dealer-card__fact {
	display: grid;
	grid-template-columns: 1.05rem minmax(0, 1fr);
	gap: 0.65rem;
	align-items: start;
}
.liv-dealer-card__fact dt {
	margin: 0;
	padding-top: 0.2rem;
	color: var(--liv-leaf-300);
}
.liv-dealer-card__fact dt svg { display: block; width: 1.05rem; height: 1.05rem; }
.liv-dealer-card__fact dd {
	margin: 0;
	font-size: 0.95rem;
	line-height: 1.5;
	color: var(--liv-paper);
}
.liv-dealer-card address { font-style: normal; }
.liv-dealer-card__tel {
	color: var(--liv-paper);
	font-weight: 600;
	text-decoration: none;
	border-bottom: 1px solid rgba(255, 255, 255, 0.25);
	white-space: nowrap;
}
.liv-dealer-card__tel:hover,
.liv-dealer-card__tel:focus-visible {
	color: var(--liv-leaf-300);
	border-bottom-color: var(--liv-leaf-300);
}
.liv-dealer-card__alt {
	display: block;
	margin-top: 0.2rem;
	font-size: 0.85rem;
	color: var(--liv-ink-300);
}
.liv-dealer-card__alt a {
	color: var(--liv-ink-200);
	white-space: nowrap;
}
.liv-dealer-card__hours {
	border-collapse: collapse;
	font-size: 0.92rem;
}
.liv-dealer-card__hours th,
.liv-dealer-card__hours td {
	padding: 0 0 0.15rem;
	vertical-align: top;
	text-align: left;
	white-space: nowrap;
}
.liv-dealer-card__hours th {
	padding-right: 0.9rem;
	font-weight: 500;
	color: var(--liv-ink-300);
}
.liv-dealer-card__tz {
	display: block;
	margin-top: 0.15rem;
	font-size: 0.6875rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--liv-ink-400);
}

/* Separate service location (Americus) */
.liv-dealer-card__service {
	margin-top: 1.1rem;
	padding: 0.9rem 1rem;
	border: 1px solid var(--liv-ink-700);
	border-radius: 0.5rem;
	background: rgba(255, 255, 255, 0.02);
	font-size: 0.92rem;
	color: var(--liv-ink-200);
}
.liv-dealer-card__service-title {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin: 0 0 0.3rem;
	font-weight: 600;
	color: var(--liv-paper);
}
.liv-dealer-card__service-title svg { width: 1rem; height: 1rem; color: var(--liv-leaf-300); }
.liv-dealer-card__mini-link {
	display: inline-block;
	margin-top: 0.35rem;
	font-size: 0.85rem;
	color: var(--liv-leaf-300);
}

.liv-dealer-card__tags {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin: 1.1rem 0 0;
	padding: 0;
}
.liv-dealer-card__tags li {
	margin: 0;
	padding: 0.3rem 0.7rem;
	border: 1px solid rgba(151, 196, 89, 0.22);
	border-radius: var(--r-pill);
	background: rgba(151, 196, 89, 0.07);
	font-size: 0.75rem;
	color: var(--liv-leaf-300);
}

.liv-dealer-card__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	margin-top: 1.35rem;
}
.liv-dealer-card__btn { flex: 1 1 10rem; justify-content: center; }
.liv-dealer-card__links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.4rem;
	margin: 0.9rem 0 0;
	font-size: 0.875rem;
}
.liv-dealer-card__links a {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	color: var(--liv-ink-200);
	text-decoration: none;
	border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}
.liv-dealer-card__links a:hover,
.liv-dealer-card__links a:focus-visible {
	color: var(--liv-leaf-300);
	border-bottom-color: var(--liv-leaf-300);
}
.liv-dealer-card__links svg { width: 0.8rem; height: 0.8rem; }

/* ─── Three ways to buy ────────────────────────────────────────────────── */

.liv-dealers__ways {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 1rem;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
}
.liv-dealers__way {
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
	margin: 0;
	padding: clamp(1.25rem, 2.5vw, 1.75rem);
	border: 1px solid var(--liv-ink-700);
	border-radius: 0.75rem;
	background: var(--liv-ink-800);
}
.liv-dealers__way-n {
	font-family: var(--wp--preset--font-family--display);
	font-size: 2rem;
	line-height: 1;
	color: transparent;
	-webkit-text-stroke: 1px var(--liv-leaf-500);
}
.liv-dealers__way h3 {
	margin: 0.25rem 0 0;
	font-size: 1.15rem;
	line-height: 1.3;
	color: var(--liv-paper);
}
.liv-dealers__way p {
	margin: 0;
	font-size: 0.95rem;
	line-height: 1.6;
	color: var(--liv-ink-200);
}
.liv-dealers__way .liv-btn--link {
	align-self: flex-start;
	margin-top: auto;
	font-size: 0.6875rem;
	text-transform: uppercase;
}

/* FAQ sits on the --dark band here, so lift the items off it. */
.liv-dealers__faq .liv-collection__faq-item { background: var(--liv-ink-900); }

/* Closing CTA */
.liv-dealers__cta-title {
	margin: 0;
	font-size: clamp(2.25rem, 5vw, 3.5rem);
}
.liv-dealers__cta .liv-collection__cta-inner p {
	margin: 0;
	color: var(--liv-ink-200);
}
.liv-dealers__fineprint {
	max-width: 60rem;
	margin: clamp(2.5rem, 5vw, 4rem) auto 0;
	font-size: 0.8rem;
	line-height: 1.6;
	text-align: center;
	color: var(--liv-ink-400);
}
.liv-dealers__fineprint a { color: var(--liv-ink-300); }

/* ─── "Find a dealer" links elsewhere on the site ──────────────────────── */

/* Model pages — under the closing CTA buttons. */
.liv-rig-cta__dealer {
	margin: 1rem 0 0;
	font-size: 0.95rem;
	color: var(--liv-ink-300);
}
.liv-rig-cta__dealer a {
	color: var(--liv-paper);
	text-decoration: none;
	border-bottom: 1px solid rgba(255, 255, 255, 0.35);
}
.liv-rig-cta__dealer a:hover,
.liv-rig-cta__dealer a:focus-visible {
	color: var(--liv-leaf-300);
	border-bottom-color: var(--liv-leaf-300);
}

/* Homepage build teaser — secondary line under "Start your build". */
.liv-build-teaser__dealer {
	margin: 1.25rem 0 0;
	font-size: 0.95rem;
	color: var(--liv-ink-300);
}
.liv-build-teaser__dealer a {
	color: var(--liv-paper);
	text-decoration: none;
	border-bottom: 1px solid rgba(255, 255, 255, 0.35);
}
.liv-build-teaser__dealer a:hover,
.liv-build-teaser__dealer a:focus-visible {
	color: var(--liv-leaf-300);
	border-bottom-color: var(--liv-leaf-300);
}

/* Contact page — next to "Replies within 24 hours". */
.liv-contact__dealer-link {
	color: var(--liv-paper);
	font-size: 0.8125rem;
	text-decoration: none;
	border-bottom: 1px solid rgba(255, 255, 255, 0.35);
}
.liv-contact__dealer-link:hover,
.liv-contact__dealer-link:focus-visible {
	color: var(--liv-leaf-300);
	border-bottom-color: var(--liv-leaf-300);
}
