/**
 * Repex Dealer Locator — front-end styles.
 *
 * One stylesheet serves the search page, the dealer pages and the archive.
 * A visitor almost always travels search -> dealer, so a single cached file
 * beats several smaller ones and the design tokens stay shared.
 *
 * Sections:
 *   1.  Design tokens
 *   2.  Base, utilities, motion primitives
 *   3.  Shared components
 *   4.  Search locator
 *   5.  Search results
 *   6.  Dealer page
 *   7.  Sticky mobile action bar
 *   8.  Dealer archive
 *   9.  Responsive
 *   10. Print
 *   11. Reduced motion
 *
 * @package Repex\Dealer_Locator
 * @since   1.0.0
 */

/* =========================================================================
 * 1. Design tokens
 *
 * Every value the plugin draws with lives here. Retuning the whole look —
 * or matching a future Repex brand colour — is a matter of overriding these
 * few variables, with no need to touch a single rule below.
 * ====================================================================== */

:root {
	/* Colour */
	--rdl-surface: #ffffff;
	--rdl-surface-alt: #f5f5f7;
	--rdl-surface-sunken: #ececf0;
	--rdl-text: #1d1d1f;
	--rdl-text-muted: #5c5c63;
	--rdl-border: rgba(0, 0, 0, 0.07);
	--rdl-border-strong: rgba(0, 0, 0, 0.13);
	--rdl-accent: #1d1d1f;
	--rdl-accent-hover: #000000;
	--rdl-accent-contrast: #ffffff;
	--rdl-focus: #0071e3;
	--rdl-hover: #f5f5f7;
	--rdl-whatsapp: #25d366;
	--rdl-whatsapp-hover: #1fb955;
	--rdl-verified: #0071e3;

	/* Shape */
	--rdl-radius: 16px;
	--rdl-radius-sm: 10px;
	--rdl-radius-lg: 22px;
	--rdl-radius-pill: 999px;

	/*
	 * Elevation. Two stacked shadows read far softer than one — a tight
	 * contact shadow plus a wide ambient shadow, the way real light works.
	 */
	--rdl-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
	--rdl-shadow: 0 2px 8px rgba(0, 0, 0, 0.04), 0 12px 32px rgba(0, 0, 0, 0.07);
	--rdl-shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.05), 0 24px 56px rgba(0, 0, 0, 0.11);
	--rdl-ring: 0 0 0 3px rgba(0, 113, 227, 0.35);

	/* Rhythm — a 4px scale, so nothing ever lands on a half pixel. */
	--rdl-space-1: 4px;
	--rdl-space-2: 8px;
	--rdl-space-3: 12px;
	--rdl-space-4: 16px;
	--rdl-space-5: 24px;
	--rdl-space-6: 32px;
	--rdl-space-7: 48px;
	--rdl-space-8: 64px;

	/*
	 * Motion. 200ms is right for a response to a tap or hover — anything
	 * slower feels laggy. Entrance animations need a little longer or they
	 * read as a flicker rather than a movement.
	 */
	--rdl-duration: 200ms;
	--rdl-duration-enter: 420ms;
	--rdl-ease: cubic-bezier(0.4, 0, 0.2, 1);
	--rdl-ease-out: cubic-bezier(0.16, 1, 0.3, 1);

	/* Type */
	--rdl-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
		Roboto, "Helvetica Neue", Arial, sans-serif;

	/* Layout */
	--rdl-container: 1080px;
	--rdl-bar-height: 64px;
}

/* =========================================================================
 * 2. Base, utilities, motion primitives
 * ====================================================================== */

.rdl-locator,
.rdl-dealer,
.rdl-archive,
.rdl-stickybar {
	box-sizing: border-box;
	font-family: var(--rdl-font);
	color: var(--rdl-text);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

.rdl-locator *,
.rdl-locator *::before,
.rdl-locator *::after,
.rdl-dealer *,
.rdl-dealer *::before,
.rdl-dealer *::after,
.rdl-archive *,
.rdl-archive *::before,
.rdl-archive *::after,
.rdl-stickybar *,
.rdl-stickybar *::before,
.rdl-stickybar *::after {
	box-sizing: border-box;
}

.rdl-sr-only {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Icons ----------------------------------------------------------------- */

/*
 * A safety net. An inline SVG with only a viewBox stretches to fill its
 * container, so one missing rule would blow every icon up to full width.
 * This gives them all a sane default that the specific rules still
 * override, and neutralises theme rules such as `svg { width: 100% }`.
 */
.rdl-locator svg,
.rdl-dealer svg,
.rdl-archive svg,
.rdl-stickybar svg {
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
	max-width: 100%;
	vertical-align: middle;
}

/* Entrance animation ---------------------------------------------------- */

/*
 * The reveal class is added by JavaScript, never by the markup. If the
 * script fails or is blocked, the content is simply visible — it can never
 * be left hidden by a stylesheet waiting for a class that never arrives.
 */
.rdl-reveal {
	opacity: 0;
	transform: translateY(14px);
	transition: opacity var(--rdl-duration-enter) var(--rdl-ease-out),
		transform var(--rdl-duration-enter) var(--rdl-ease-out);
	will-change: opacity, transform;
}

.rdl-reveal.is-visible {
	opacity: 1;
	transform: none;
	will-change: auto;
}

@keyframes rdl-fade-up {
	from {
		opacity: 0;
		transform: translateY(8px);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

@keyframes rdl-spin {
	to {
		transform: rotate(360deg);
	}
}

@keyframes rdl-shimmer {
	from {
		background-position: -320px 0;
	}

	to {
		background-position: 320px 0;
	}
}

@keyframes rdl-slide-up {
	from {
		opacity: 0;
		transform: translateY(100%);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

/* =========================================================================
 * 3. Shared components
 * ====================================================================== */

/* Badges ---------------------------------------------------------------- */

.rdl-badge {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 4px 10px;
	border-radius: var(--rdl-radius-pill);
	font-size: 0.75rem;
	font-weight: 600;
	line-height: 1.4;
	letter-spacing: 0.005em;
	white-space: nowrap;
}

.rdl-badge svg {
	width: 14px;
	height: 14px;
	fill: currentColor;
}

.rdl-badge--verified {
	background: rgba(0, 113, 227, 0.1);
	color: var(--rdl-verified);
}

.rdl-badge--featured {
	background: var(--rdl-accent);
	color: var(--rdl-accent-contrast);
}

/* Panels ---------------------------------------------------------------- */

.rdl-panel {
	max-width: 100%;
	min-width: 0;
	padding: var(--rdl-space-5);
	background: var(--rdl-surface);
	border: 1px solid var(--rdl-border);
	border-radius: var(--rdl-radius);
	box-shadow: var(--rdl-shadow-sm);
	overflow-wrap: break-word;
}

/*
 * Embedded media must never outgrow the card holding it. Google's map
 * iframe carries its own default dimensions, so this is the guard that
 * keeps it inside the panel on narrow screens.
 */
.rdl-panel img,
.rdl-panel iframe,
.rdl-panel embed,
.rdl-panel object {
	max-width: 100%;
}

.rdl-panel__title {
	display: flex;
	align-items: center;
	gap: var(--rdl-space-2);
	margin: 0 0 var(--rdl-space-4);
	font-size: 1.125rem;
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: -0.012em;
	color: var(--rdl-text);
}

.rdl-panel__icon {
	width: 18px;
	height: 18px;
	fill: var(--rdl-text-muted);
}

.rdl-panel__body {
	min-width: 0;
	max-width: 100%;
	font-size: 0.9375rem;
	line-height: 1.6;
	color: var(--rdl-text);
}

.rdl-panel__note {
	margin: var(--rdl-space-4) 0 0;
	padding-top: var(--rdl-space-3);
	border-top: 1px solid var(--rdl-border);
	font-size: 0.8125rem;
	line-height: 1.5;
	color: var(--rdl-text-muted);
}

.rdl-prose p {
	margin: 0 0 var(--rdl-space-3);
}

.rdl-prose p:last-child {
	margin-bottom: 0;
}

/* Text link ------------------------------------------------------------- */

.rdl-textlink {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	margin-top: var(--rdl-space-3);
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--rdl-focus);
	text-decoration: none;
	transition: opacity var(--rdl-duration) var(--rdl-ease);
}

.rdl-textlink svg {
	width: 14px;
	height: 14px;
	fill: currentColor;
}

.rdl-textlink:hover {
	opacity: 0.7;
	text-decoration: underline;
}

.rdl-textlink:focus-visible {
	outline: 2px solid var(--rdl-focus);
	outline-offset: 3px;
	border-radius: 3px;
}

/* =========================================================================
 * 4. Search locator
 * ====================================================================== */

.rdl-locator {
	position: relative;
	width: 100%;
	max-width: 680px;
	margin-inline: auto;
	padding: var(--rdl-space-6) var(--rdl-space-4);
}

.rdl-locator__heading {
	margin: 0 0 var(--rdl-space-5);
	font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.75rem);
	font-weight: 700;
	line-height: 1.08;
	letter-spacing: -0.024em;
	text-align: center;
	text-wrap: balance;
	color: var(--rdl-text);
}

.rdl-search {
	position: relative;
}

.rdl-search__field {
	position: relative;
	display: flex;
	align-items: center;
	gap: var(--rdl-space-3);
	min-height: 64px;
	padding: 0 var(--rdl-space-5);
	background: var(--rdl-surface);
	border: 1px solid var(--rdl-border);
	border-radius: var(--rdl-radius);
	box-shadow: var(--rdl-shadow);
	transition: box-shadow var(--rdl-duration) var(--rdl-ease),
		border-color var(--rdl-duration) var(--rdl-ease);
}

.rdl-search__field:hover {
	box-shadow: var(--rdl-shadow-lg);
}

/* The focus ring sits on the wrapper so the whole control reads as one. */
.rdl-search__field:focus-within {
	border-color: transparent;
	box-shadow: var(--rdl-shadow-lg), var(--rdl-ring);
}

.rdl-search__icon {
	flex: 0 0 auto;
	width: 22px;
	height: 22px;
	fill: var(--rdl-text-muted);
	transition: fill var(--rdl-duration) var(--rdl-ease);
}

.rdl-search__field:focus-within .rdl-search__icon {
	fill: var(--rdl-text);
}

.rdl-search__input {
	flex: 1 1 auto;
	width: 100%;
	min-width: 0;
	height: 62px;
	margin: 0;
	padding: 0;
	background: transparent;
	border: 0;
	border-radius: 0;
	outline: none;
	box-shadow: none;
	font-family: inherit;
	font-size: 1.0625rem;
	font-weight: 400;
	letter-spacing: -0.011em;
	color: var(--rdl-text);
	appearance: none;
	-webkit-appearance: none;
}

.rdl-search__input::placeholder {
	color: var(--rdl-text-muted);
	opacity: 1;
}

.rdl-search__input::-webkit-search-decoration,
.rdl-search__input::-webkit-search-cancel-button,
.rdl-search__input::-webkit-search-results-button,
.rdl-search__input::-webkit-search-results-decoration {
	-webkit-appearance: none;
	appearance: none;
}

.rdl-search__clear {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	margin: 0;
	padding: 0;
	background: transparent;
	border: 0;
	border-radius: var(--rdl-radius-pill);
	cursor: pointer;
	transition: background-color var(--rdl-duration) var(--rdl-ease),
		transform var(--rdl-duration) var(--rdl-ease);
}

.rdl-search__clear svg {
	width: 20px;
	height: 20px;
	fill: var(--rdl-text-muted);
	transition: fill var(--rdl-duration) var(--rdl-ease);
}

.rdl-search__clear:hover {
	background: var(--rdl-hover);
}

.rdl-search__clear:hover svg {
	fill: var(--rdl-text);
}

.rdl-search__clear:active {
	transform: scale(0.92);
}

.rdl-search__clear:focus-visible {
	outline: 2px solid var(--rdl-focus);
	outline-offset: 2px;
}

.rdl-search__clear[hidden] {
	display: none;
}

.rdl-search__spinner {
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	border: 2px solid var(--rdl-border);
	border-top-color: var(--rdl-text-muted);
	border-radius: var(--rdl-radius-pill);
	animation: rdl-spin 600ms linear infinite;
}

.rdl-search__spinner[hidden] {
	display: none;
}

/* =========================================================================
 * 5. Search results
 * ====================================================================== */

.rdl-results {
	position: absolute;
	z-index: 60;
	top: calc(100% + var(--rdl-space-2));
	left: 0;
	right: 0;
	max-height: min(60vh, 460px);
	overflow-y: auto;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
	background: var(--rdl-surface);
	border: 1px solid var(--rdl-border);
	border-radius: var(--rdl-radius);
	box-shadow: var(--rdl-shadow-lg);
	opacity: 0;
	transform: translateY(-6px) scale(0.99);
	transform-origin: top center;
	transition: opacity var(--rdl-duration) var(--rdl-ease-out),
		transform var(--rdl-duration) var(--rdl-ease-out);
}

.rdl-results[hidden] {
	display: none;
}

.rdl-results.is-open {
	opacity: 1;
	transform: none;
}

.rdl-results__list {
	margin: 0;
	padding: var(--rdl-space-2);
	list-style: none;
}

.rdl-results__list li {
	margin: 0;
	padding: 0;
	list-style: none;
}

.rdl-result {
	display: flex;
	align-items: center;
	gap: var(--rdl-space-4);
	min-height: 72px;
	padding: var(--rdl-space-3);
	border-radius: var(--rdl-radius-sm);
	text-decoration: none;
	color: inherit;
	transition: background-color var(--rdl-duration) var(--rdl-ease);
	animation: rdl-fade-up var(--rdl-duration) var(--rdl-ease-out) both;
}

/*
 * A short stagger down the list. Ten steps is plenty — the results limit
 * rarely goes higher, and anything after simply arrives with the tenth.
 */
.rdl-results__list li:nth-child(1) .rdl-result { animation-delay: 0ms; }
.rdl-results__list li:nth-child(2) .rdl-result { animation-delay: 25ms; }
.rdl-results__list li:nth-child(3) .rdl-result { animation-delay: 50ms; }
.rdl-results__list li:nth-child(4) .rdl-result { animation-delay: 75ms; }
.rdl-results__list li:nth-child(5) .rdl-result { animation-delay: 100ms; }
.rdl-results__list li:nth-child(6) .rdl-result { animation-delay: 125ms; }
.rdl-results__list li:nth-child(7) .rdl-result { animation-delay: 150ms; }
.rdl-results__list li:nth-child(8) .rdl-result { animation-delay: 175ms; }
.rdl-results__list li:nth-child(n + 9) .rdl-result { animation-delay: 200ms; }

.rdl-result:hover,
.rdl-result.is-active {
	background: var(--rdl-hover);
}

.rdl-result:focus-visible {
	outline: 2px solid var(--rdl-focus);
	outline-offset: -2px;
}

.rdl-result__media {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	overflow: hidden;
	background: var(--rdl-surface-alt);
	border-radius: var(--rdl-radius-sm);
}

.rdl-result__logo {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.rdl-result__initials {
	font-size: 1rem;
	font-weight: 600;
	color: var(--rdl-text-muted);
}

.rdl-result__body {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-width: 0;
}

.rdl-result__title {
	display: flex;
	align-items: center;
	gap: var(--rdl-space-2);
	min-width: 0;
}

.rdl-result__name {
	overflow: hidden;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: -0.011em;
	color: var(--rdl-text);
	text-overflow: ellipsis;
	white-space: nowrap;
}

.rdl-result__badge {
	flex: 0 0 auto;
	padding: 2px 8px;
	background: var(--rdl-accent);
	color: var(--rdl-accent-contrast);
	border-radius: var(--rdl-radius-pill);
	font-size: 0.6875rem;
	font-weight: 600;
	line-height: 1.5;
	white-space: nowrap;
}

.rdl-result__location {
	overflow: hidden;
	font-size: 0.875rem;
	line-height: 1.4;
	color: var(--rdl-text-muted);
	text-overflow: ellipsis;
	white-space: nowrap;
}

.rdl-result__products {
	display: flex;
	flex-wrap: wrap;
	gap: var(--rdl-space-1);
	margin-top: 2px;
}

.rdl-result__product {
	padding: 2px 8px;
	background: var(--rdl-surface-alt);
	border-radius: var(--rdl-radius-pill);
	font-size: 0.6875rem;
	font-weight: 500;
	line-height: 1.5;
	color: var(--rdl-text-muted);
	white-space: nowrap;
}

.rdl-result__product--more {
	padding-inline: 2px;
	background: transparent;
}

.rdl-result__arrow {
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
	fill: var(--rdl-text-muted);
	opacity: 0.45;
	transition: transform var(--rdl-duration) var(--rdl-ease),
		opacity var(--rdl-duration) var(--rdl-ease);
}

.rdl-result:hover .rdl-result__arrow,
.rdl-result.is-active .rdl-result__arrow {
	opacity: 1;
	transform: translateX(3px);
}

/* Loading skeleton ------------------------------------------------------ */

/*
 * Shown while the first search is in flight. A shape that matches the real
 * result rows reads as "loading" far better than a spinner alone, and stops
 * the panel jumping in height when the answers arrive.
 */
.rdl-skeleton {
	padding: var(--rdl-space-2);
}

.rdl-skeleton__row {
	display: flex;
	align-items: center;
	gap: var(--rdl-space-4);
	min-height: 72px;
	padding: var(--rdl-space-3);
}

.rdl-skeleton__block,
.rdl-skeleton__line {
	background: linear-gradient(
		90deg,
		var(--rdl-surface-alt) 0%,
		var(--rdl-surface-sunken) 50%,
		var(--rdl-surface-alt) 100%
	);
	background-size: 640px 100%;
	animation: rdl-shimmer 1.4s linear infinite;
}

.rdl-skeleton__block {
	flex: 0 0 auto;
	width: 56px;
	height: 56px;
	border-radius: var(--rdl-radius-sm);
}

.rdl-skeleton__lines {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	gap: var(--rdl-space-2);
	min-width: 0;
}

.rdl-skeleton__line {
	height: 12px;
	border-radius: var(--rdl-radius-pill);
}

.rdl-skeleton__line--short {
	width: 45%;
}

/* Empty state ----------------------------------------------------------- */

.rdl-results__empty {
	padding: var(--rdl-space-6) var(--rdl-space-5);
	text-align: center;
	animation: rdl-fade-up var(--rdl-duration) var(--rdl-ease-out) both;
}

.rdl-results__empty-icon {
	width: 36px;
	height: 36px;
	margin-bottom: var(--rdl-space-3);
	fill: var(--rdl-text-muted);
	opacity: 0.4;
}

.rdl-results__empty-title {
	margin: 0 0 var(--rdl-space-1);
	font-size: 1rem;
	font-weight: 600;
	color: var(--rdl-text);
}

.rdl-results__empty-text {
	margin: 0;
	font-size: 0.875rem;
	line-height: 1.5;
	color: var(--rdl-text-muted);
}

/* =========================================================================
 * 6. Dealer page
 * ====================================================================== */

.rdl-dealer {
	width: 100%;
	max-width: var(--rdl-container);
	margin-inline: auto;
	padding: 0 var(--rdl-space-4) var(--rdl-space-8);
}

/* Hero ------------------------------------------------------------------ */

.rdl-hero {
	position: relative;
	margin-bottom: var(--rdl-space-5);
}

.rdl-hero__banner {
	position: relative;
	aspect-ratio: 3 / 1;
	overflow: hidden;
	background: var(--rdl-surface-alt);
	border-radius: 0 0 var(--rdl-radius-lg) var(--rdl-radius-lg);
}

/* Without a banner image there is nothing to look at, so use less space. */
.rdl-hero:not(.rdl-hero--has-banner) .rdl-hero__banner {
	aspect-ratio: auto;
	height: 150px;
	background: linear-gradient(150deg, #f5f5f7 0%, #e9e9ee 100%);
}

.rdl-hero__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Gradient keeps the logo readable over any banner. */
.rdl-hero__scrim {
	position: absolute;
	inset: 0;
	background: linear-gradient(
		to bottom,
		rgba(0, 0, 0, 0) 40%,
		rgba(0, 0, 0, 0.18) 100%
	);
	pointer-events: none;
}

/*
 * z-index matters here. The scrim above is absolutely positioned, which
 * paints it over any later sibling that is not itself positioned. Without
 * this the store name and badges render behind the banner.
 *
 * Only the logo overlaps the banner; the text always starts below it, so
 * nothing can be clipped no matter how long the store name is.
 */
.rdl-hero__inner {
	position: relative;
	z-index: 2;
	display: flex;
	align-items: flex-start;
	gap: var(--rdl-space-5);
	padding: var(--rdl-space-3) var(--rdl-space-5) 0;
}

.rdl-hero__logo {
	position: relative;
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 120px;
	height: 120px;
	margin-top: -72px;
	overflow: hidden;
	background: var(--rdl-surface);
	border: 4px solid var(--rdl-surface);
	border-radius: var(--rdl-radius-lg);
	box-shadow: var(--rdl-shadow);
}

.rdl-hero__logo img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: calc(var(--rdl-radius-lg) - 6px);
}

.rdl-hero__initials {
	font-size: 2rem;
	font-weight: 700;
	letter-spacing: -0.02em;
	color: var(--rdl-text-muted);
}

.rdl-hero__text {
	flex: 1 1 auto;
	min-width: 0;
	padding-top: var(--rdl-space-1);
}

.rdl-hero__badges {
	display: flex;
	flex-wrap: wrap;
	gap: var(--rdl-space-2);
	margin-bottom: var(--rdl-space-2);
}

.rdl-hero__name {
	margin: 0 0 var(--rdl-space-2);
	font-size: clamp(1.6rem, 1.1rem + 2vw, 2.5rem);
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: -0.024em;
	text-wrap: balance;
	color: var(--rdl-text);
}

.rdl-hero__meta {
	display: flex;
	flex-wrap: wrap;
	gap: var(--rdl-space-2) var(--rdl-space-5);
	margin: 0;
	font-size: 0.9375rem;
	color: var(--rdl-text-muted);
}

.rdl-hero__meta-item {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.rdl-hero__meta-item svg {
	width: 16px;
	height: 16px;
	fill: currentColor;
	opacity: 0.7;
}

/* Action buttons -------------------------------------------------------- */

.rdl-actions {
	margin-bottom: var(--rdl-space-6);
	padding: 0 var(--rdl-space-5);
}

.rdl-actions__inner {
	display: flex;
	flex-wrap: wrap;
	gap: var(--rdl-space-3);
}

.rdl-action {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--rdl-space-2);
	min-height: 48px;
	padding: 0 var(--rdl-space-5);
	background: var(--rdl-surface);
	border: 1px solid var(--rdl-border-strong);
	border-radius: var(--rdl-radius-pill);
	font-size: 0.9375rem;
	font-weight: 600;
	letter-spacing: -0.011em;
	color: var(--rdl-text);
	text-decoration: none;
	cursor: pointer;
	transition: background-color var(--rdl-duration) var(--rdl-ease),
		border-color var(--rdl-duration) var(--rdl-ease),
		transform var(--rdl-duration) var(--rdl-ease),
		box-shadow var(--rdl-duration) var(--rdl-ease);
}

.rdl-action svg {
	width: 18px;
	height: 18px;
	fill: currentColor;
}

.rdl-action:hover {
	background: var(--rdl-hover);
	transform: translateY(-1px);
	box-shadow: var(--rdl-shadow-sm);
}

/* A small press-down gives the button a physical feel on tap. */
.rdl-action:active {
	transform: translateY(0) scale(0.98);
	box-shadow: none;
}

.rdl-action:focus-visible {
	outline: 2px solid var(--rdl-focus);
	outline-offset: 3px;
}

.rdl-action--primary {
	background: var(--rdl-accent);
	border-color: var(--rdl-accent);
	color: var(--rdl-accent-contrast);
}

.rdl-action--primary:hover {
	background: var(--rdl-accent-hover);
	border-color: var(--rdl-accent-hover);
}

.rdl-action--whatsapp {
	background: var(--rdl-whatsapp);
	border-color: var(--rdl-whatsapp);
	color: #ffffff;
}

.rdl-action--whatsapp:hover {
	background: var(--rdl-whatsapp-hover);
	border-color: var(--rdl-whatsapp-hover);
}

/* Body layout ----------------------------------------------------------- */

.rdl-dealer__body {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px;
	gap: var(--rdl-space-5);
	padding: 0 var(--rdl-space-5);
	align-items: start;
}

.rdl-dealer__main,
.rdl-dealer__aside {
	min-width: 0;
}

/* The sidebar follows the reader down on tall pages. */
.rdl-dealer__aside {
	position: sticky;
	top: var(--rdl-space-5);
}

.rdl-dealer__main .rdl-panel + .rdl-panel,
.rdl-dealer__aside .rdl-panel + .rdl-panel {
	margin-top: var(--rdl-space-4);
}

/* Products -------------------------------------------------------------- */

.rdl-products {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: var(--rdl-space-2) var(--rdl-space-4);
	margin: 0;
	padding: 0;
	list-style: none;
}

.rdl-products__item {
	display: flex;
	align-items: center;
	gap: var(--rdl-space-2);
	margin: 0;
	padding: var(--rdl-space-2) 0;
	font-size: 0.9375rem;
	line-height: 1.4;
}

.rdl-products__tick {
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	fill: var(--rdl-verified);
}

/* Address and map ------------------------------------------------------- */

.rdl-address {
	margin: 0;
	font-size: 0.9375rem;
	font-style: normal;
	line-height: 1.6;
	color: var(--rdl-text);
}

.rdl-map {
	position: relative;
	width: 100%;
	max-width: 100%;
	margin-top: var(--rdl-space-4);
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: var(--rdl-surface-alt);
	border-radius: var(--rdl-radius-sm);
}

.rdl-map__load {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: var(--rdl-space-1);
	width: 100%;
	height: 100%;
	padding: var(--rdl-space-4);
	background: var(--rdl-surface-alt);
	border: 1px dashed var(--rdl-border-strong);
	border-radius: var(--rdl-radius-sm);
	font-family: inherit;
	cursor: pointer;
	transition: background-color var(--rdl-duration) var(--rdl-ease);
}

.rdl-map__load:hover {
	background: var(--rdl-surface-sunken);
}

.rdl-map__load:focus-visible {
	outline: 2px solid var(--rdl-focus);
	outline-offset: -2px;
}

.rdl-map__pin svg {
	width: 32px;
	height: 32px;
	fill: var(--rdl-text-muted);
	opacity: 0.6;
	transition: transform var(--rdl-duration) var(--rdl-ease);
}

.rdl-map__load:hover .rdl-map__pin svg {
	transform: translateY(-2px);
}

.rdl-map__label {
	font-size: 0.9375rem;
	font-weight: 600;
	color: var(--rdl-text);
}

.rdl-map__hint {
	font-size: 0.75rem;
	color: var(--rdl-text-muted);
}

.rdl-map__frame {
	display: block;
	width: 100%;
	max-width: 100%;
	height: 100%;
	border: 0;
	animation: rdl-fade-up var(--rdl-duration) var(--rdl-ease-out) both;
}

/* Opening hours --------------------------------------------------------- */

.rdl-hours {
	margin: 0;
}

.rdl-hours__row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: var(--rdl-space-4);
	padding: var(--rdl-space-2) 0;
	border-bottom: 1px solid var(--rdl-border);
}

.rdl-hours__row:last-child {
	padding-bottom: 0;
	border-bottom: 0;
}

.rdl-hours__day {
	margin: 0;
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--rdl-text);
}

.rdl-hours__time {
	margin: 0;
	font-size: 0.875rem;
	color: var(--rdl-text-muted);
	text-align: right;
	/* Tabular figures keep the times in a straight column. */
	font-variant-numeric: tabular-nums;
}

.rdl-hours__time--full {
	text-align: left;
}

/* Contact --------------------------------------------------------------- */

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

.rdl-contact__item {
	display: flex;
	flex-direction: column;
	gap: 2px;
	margin: 0;
	padding: var(--rdl-space-2) 0;
	border-bottom: 1px solid var(--rdl-border);
}

.rdl-contact__item:last-child {
	padding-bottom: 0;
	border-bottom: 0;
}

.rdl-contact__label {
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--rdl-text-muted);
}

.rdl-contact__value {
	font-size: 0.9375rem;
	color: var(--rdl-text);
	text-decoration: none;
	word-break: break-word;
}

a.rdl-contact__value:hover {
	color: var(--rdl-focus);
	text-decoration: underline;
}

/* Gallery --------------------------------------------------------------- */

.rdl-gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: var(--rdl-space-3);
	margin: 0;
	padding: 0;
	list-style: none;
}

.rdl-gallery__item {
	margin: 0;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	border-radius: var(--rdl-radius-sm);
}

.rdl-gallery__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform var(--rdl-duration) var(--rdl-ease);
}

.rdl-gallery__item:hover .rdl-gallery__image {
	transform: scale(1.03);
}

/* Footer link ----------------------------------------------------------- */

.rdl-dealer__footer {
	margin-top: var(--rdl-space-6);
	padding: 0 var(--rdl-space-5);
}

.rdl-backlink {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	min-height: 44px;
	font-size: 0.9375rem;
	font-weight: 500;
	color: var(--rdl-text-muted);
	text-decoration: none;
	transition: color var(--rdl-duration) var(--rdl-ease);
}

.rdl-backlink svg {
	width: 18px;
	height: 18px;
	fill: currentColor;
	transition: transform var(--rdl-duration) var(--rdl-ease);
}

.rdl-backlink:hover {
	color: var(--rdl-text);
}

.rdl-backlink:hover svg {
	transform: translateX(-3px);
}

.rdl-backlink:focus-visible {
	outline: 2px solid var(--rdl-focus);
	outline-offset: 3px;
	border-radius: 3px;
}

/* =========================================================================
 * 7. Sticky mobile action bar
 * ====================================================================== */

.rdl-stickybar {
	position: fixed;
	z-index: 90;
	bottom: 0;
	left: 0;
	right: 0;
	display: none;
	/* Clears the iPhone home indicator. */
	padding: var(--rdl-space-2) var(--rdl-space-3)
		calc(var(--rdl-space-2) + env(safe-area-inset-bottom, 0px));
	background: rgba(255, 255, 255, 0.86);
	backdrop-filter: saturate(180%) blur(18px);
	-webkit-backdrop-filter: saturate(180%) blur(18px);
	border-top: 1px solid var(--rdl-border);
	opacity: 0;
	transform: translateY(100%);
	transition: opacity var(--rdl-duration) var(--rdl-ease-out),
		transform var(--rdl-duration) var(--rdl-ease-out);
	pointer-events: none;
}

.rdl-stickybar.is-visible {
	opacity: 1;
	transform: none;
	pointer-events: auto;
}

.rdl-stickybar__inner {
	display: flex;
	gap: var(--rdl-space-2);
	max-width: 520px;
	margin-inline: auto;
}

.rdl-stickybar__item {
	flex: 1 1 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	/* 48px minimum keeps every target comfortably tappable. */
	min-height: 48px;
	padding: 0 var(--rdl-space-2);
	background: var(--rdl-surface);
	border: 1px solid var(--rdl-border-strong);
	border-radius: var(--rdl-radius-pill);
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--rdl-text);
	text-decoration: none;
	transition: transform var(--rdl-duration) var(--rdl-ease);
}

.rdl-stickybar__item svg {
	width: 17px;
	height: 17px;
	fill: currentColor;
}

.rdl-stickybar__item:active {
	transform: scale(0.97);
}

.rdl-stickybar__item--primary {
	background: var(--rdl-accent);
	border-color: var(--rdl-accent);
	color: var(--rdl-accent-contrast);
}

.rdl-stickybar__item--whatsapp {
	background: var(--rdl-whatsapp);
	border-color: var(--rdl-whatsapp);
	color: #ffffff;
}

/* =========================================================================
 * 8. Dealer archive
 * ====================================================================== */

.rdl-archive {
	width: 100%;
	max-width: var(--rdl-container);
	margin-inline: auto;
	padding: 0 var(--rdl-space-4) var(--rdl-space-8);
}

.rdl-archive__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: var(--rdl-space-4);
	margin-top: var(--rdl-space-5);
}

.rdl-card {
	background: var(--rdl-surface);
	border: 1px solid var(--rdl-border);
	border-radius: var(--rdl-radius);
	box-shadow: var(--rdl-shadow-sm);
	transition: transform var(--rdl-duration) var(--rdl-ease),
		box-shadow var(--rdl-duration) var(--rdl-ease);
}

.rdl-card:hover {
	transform: translateY(-2px);
	box-shadow: var(--rdl-shadow);
}

.rdl-card__link {
	display: flex;
	align-items: center;
	gap: var(--rdl-space-4);
	padding: var(--rdl-space-4);
	color: inherit;
	text-decoration: none;
}

.rdl-card__link:focus-visible {
	outline: 2px solid var(--rdl-focus);
	outline-offset: -2px;
	border-radius: var(--rdl-radius);
}

.rdl-card__media {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	overflow: hidden;
	background: var(--rdl-surface-alt);
	border-radius: var(--rdl-radius-sm);
}

.rdl-card__logo {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.rdl-card__initials {
	font-size: 1.125rem;
	font-weight: 600;
	color: var(--rdl-text-muted);
}

.rdl-card__body {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-width: 0;
}

.rdl-card__title {
	display: flex;
	align-items: center;
	gap: var(--rdl-space-2);
	min-width: 0;
}

.rdl-card__name {
	overflow: hidden;
	font-size: 1rem;
	font-weight: 600;
	letter-spacing: -0.011em;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.rdl-card__location {
	font-size: 0.875rem;
	color: var(--rdl-text-muted);
}

.rdl-card__arrow {
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
	fill: var(--rdl-text-muted);
	opacity: 0.45;
	transition: transform var(--rdl-duration) var(--rdl-ease),
		opacity var(--rdl-duration) var(--rdl-ease);
}

.rdl-card:hover .rdl-card__arrow {
	opacity: 1;
	transform: translateX(3px);
}

.rdl-archive__empty {
	padding: var(--rdl-space-7) 0;
	text-align: center;
	color: var(--rdl-text-muted);
}

.rdl-archive__pagination {
	margin-top: var(--rdl-space-6);
}

/* =========================================================================
 * 9. Responsive
 * ====================================================================== */

@media (max-width: 900px) {

	.rdl-dealer__body {
		grid-template-columns: minmax(0, 1fr);
	}

	/* Hours and contact drop below the main content rather than beside it. */
	.rdl-dealer__aside {
		position: static;
		display: contents;
	}

	.rdl-dealer__aside .rdl-panel {
		margin-top: var(--rdl-space-4);
	}
}

@media (max-width: 600px) {

	.rdl-locator {
		padding: var(--rdl-space-5) var(--rdl-space-4);
	}

	.rdl-search__field {
		min-height: 56px;
		padding-inline: var(--rdl-space-4);
		border-radius: var(--rdl-radius-sm);
	}

	.rdl-search__input {
		height: 54px;
		/* 16px minimum stops iOS Safari zooming the page on focus. */
		font-size: 16px;
	}

	.rdl-results {
		max-height: 65vh;
		border-radius: var(--rdl-radius-sm);
	}

	.rdl-result__media,
	.rdl-skeleton__block {
		width: 48px;
		height: 48px;
	}

	.rdl-result__products {
		display: none;
	}

	/* Dealer page */
	.rdl-dealer,
	.rdl-archive {
		padding-inline: 0;
		/* Room for the sticky bar so it never covers the last line. */
		padding-bottom: calc(var(--rdl-bar-height) + var(--rdl-space-6));
	}

	.rdl-hero__banner {
		aspect-ratio: 16 / 9;
		border-radius: 0;
	}

	.rdl-hero:not(.rdl-hero--has-banner) .rdl-hero__banner {
		height: 110px;
	}

	.rdl-hero__inner {
		flex-direction: column;
		align-items: flex-start;
		gap: var(--rdl-space-3);
		padding-inline: var(--rdl-space-4);
	}

	.rdl-hero__logo {
		width: 88px;
		height: 88px;
		margin-top: -52px;
	}

	.rdl-hero__text {
		padding-top: 0;
	}

	.rdl-actions,
	.rdl-dealer__body,
	.rdl-dealer__footer {
		padding-inline: var(--rdl-space-4);
	}

	.rdl-actions__inner {
		display: grid;
		grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
		gap: var(--rdl-space-2);
	}

	.rdl-action {
		padding-inline: var(--rdl-space-3);
		font-size: 0.875rem;
	}

	.rdl-panel {
		padding: var(--rdl-space-4);
		border-radius: var(--rdl-radius-sm);
	}

	.rdl-products {
		grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	}

	.rdl-archive__grid {
		grid-template-columns: minmax(0, 1fr);
	}

	/* The sticky bar exists on phones only. */
	.rdl-stickybar {
		display: block;
	}
}

/* Pointer-coarse devices get roomier targets regardless of width. */
@media (pointer: coarse) {

	.rdl-result {
		min-height: 76px;
	}

	.rdl-action,
	.rdl-textlink {
		min-height: 48px;
	}
}

/* =========================================================================
 * 10. Print
 * ====================================================================== */

@media print {

	.rdl-locator,
	.rdl-stickybar,
	.rdl-actions,
	.rdl-map,
	.rdl-dealer__footer,
	.rdl-archive__pagination {
		display: none !important;
	}

	.rdl-dealer,
	.rdl-archive {
		max-width: none;
		padding: 0;
	}

	.rdl-hero__banner {
		display: none;
	}

	.rdl-hero__inner {
		padding: 0;
	}

	.rdl-hero__logo {
		margin-top: 0;
		box-shadow: none;
	}

	.rdl-panel {
		margin-top: 12pt !important;
		padding: 0;
		border: 0;
		box-shadow: none;
		break-inside: avoid;
	}

	.rdl-reveal {
		opacity: 1 !important;
		transform: none !important;
	}
}

/* =========================================================================
 * 11. High contrast and forced colours
 *
 * Windows High Contrast mode replaces every colour with a system palette
 * and discards background images. Anything whose meaning was carried by
 * colour alone has to be restored with a border instead.
 * ====================================================================== */

@media (prefers-contrast: more) {

	:root {
		--rdl-border: rgba(0, 0, 0, 0.35);
		--rdl-border-strong: rgba(0, 0, 0, 0.6);
		--rdl-text-muted: #45454b;
	}

	.rdl-result.is-active,
	.rdl-result:hover {
		outline: 2px solid var(--rdl-text);
		outline-offset: -2px;
	}

	.rdl-badge--verified {
		background: transparent;
		border: 1px solid currentColor;
	}
}

@media (forced-colors: active) {

	.rdl-search__field,
	.rdl-results,
	.rdl-panel,
	.rdl-card,
	.rdl-stickybar {
		border: 1px solid CanvasText;
	}

	.rdl-action,
	.rdl-stickybar__item {
		border: 1px solid ButtonText;
		/* Colour alone carries no meaning here, so restore the text. */
		forced-color-adjust: none;
		background: ButtonFace;
		color: ButtonText;
	}

	.rdl-result.is-active {
		outline: 2px solid Highlight;
		outline-offset: -2px;
	}

	.rdl-locator svg,
	.rdl-dealer svg,
	.rdl-archive svg,
	.rdl-stickybar svg {
		fill: currentColor;
	}

	/* Shimmer relies on a gradient, which is dropped in forced colours. */
	.rdl-skeleton__block,
	.rdl-skeleton__line {
		background: Canvas;
		border: 1px solid GrayText;
		animation: none;
	}
}

/* =========================================================================
 * 12. Reduced motion
 *
 * Honours the visitor's system setting. Movement is removed rather than
 * merely shortened, and every reveal is forced to its finished state so no
 * content can be left invisible.
 * ====================================================================== */

@media (prefers-reduced-motion: reduce) {

	.rdl-locator *,
	.rdl-locator *::before,
	.rdl-locator *::after,
	.rdl-dealer *,
	.rdl-dealer *::before,
	.rdl-dealer *::after,
	.rdl-archive *,
	.rdl-archive *::before,
	.rdl-archive *::after,
	.rdl-stickybar,
	.rdl-stickybar * {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}

	.rdl-results,
	.rdl-reveal,
	.rdl-reveal.is-visible,
	.rdl-stickybar.is-visible {
		opacity: 1;
		transform: none;
	}

	.rdl-search__spinner {
		animation: none;
		border-top-color: var(--rdl-text);
	}
}
