/*
 * =========================================================
 * ECHO GLOBE MAP
 * =========================================================
 */


/*
 * ---------------------------------------------------------
 * VARIABLES
 * ---------------------------------------------------------
 */

.echo-globe-map-shortcode {
	--echo-green: #8de969;
	--echo-green-hover: #9bef7b;
	--echo-blue: #0a3eac;

	--echo-dark: #11181d;
	--echo-text: #ffffff;

	--echo-state-border-color: #79b66a;
	--echo-country-border-color: #9bd580;

	--echo-facility-color: #3eb489;


	--echo-lane-casing: #415656;
	--echo-lane-line: #3eb489;
	--echo-lane-flow: #8de969;


	--echo-rail-flow: #8ffffe;
	--echo-rail-color: #55b8b7;
	--echo-terminal-color: #4eaeb5;
	--echo-strategic-hub-color: #6cc99a;

	--echo-distribution-1day: #c9dc6d;
	--echo-distribution-2day: #9fae56;
	--echo-distribution-3day: #7d8944;
	
	--echo-marker-default: var(--echo-green);

	--echo-transition: 180ms ease;
	position: relative;
	width: 100%;
}


/*
 * ---------------------------------------------------------
 * SHARED GLOBE WRAPPER
 * ---------------------------------------------------------
 */

.custom-globe-wrapper {
	position: relative;
	width: 100%;
	overflow: hidden;
}


/*
 * ---------------------------------------------------------
 * MAPTILER LAYER
 * ---------------------------------------------------------
 */

.custom-globe-wrapper .maptiler-globe {
	position: absolute;
	inset: 0;

	width: 100% !important;
	height: 100% !important;

	z-index: 1;
}


.maptiler-globe .maplibregl-canvas,
.maptiler-globe .maptilersdk-canvas {
	outline: none;
}


/*
 * ---------------------------------------------------------
 * WP GO MAPS UI LAYER
 * ---------------------------------------------------------
 *
 * WP Go Maps remains active so we can continue using:
 *
 * - category filters
 * - marker listing
 * - native interface controls
 *
 * Only the original map renderer is hidden.
 * ---------------------------------------------------------
 */

.custom-globe-wrapper .custom-globe-wpgmza-ui {
	position: absolute !important;
	inset: 0;

	width: 100% !important;
	height: 100% !important;

	z-index: 2;

	background: transparent !important;
	pointer-events: none;
}


/*
 * Re-enable interaction for native
 * WP Go Maps interface elements.
 */

.custom-globe-wpgmza-ui input,
.custom-globe-wpgmza-ui select,
.custom-globe-wpgmza-ui textarea,
.custom-globe-wpgmza-ui button,
.custom-globe-wpgmza-ui a,
.custom-globe-wpgmza-ui label,
.custom-globe-wpgmza-ui .wpgmza-marker-listing,
.custom-globe-wpgmza-ui .wpgmza_marker_list_class,
.custom-globe-wpgmza-ui .wpgmza-category-filter {
	pointer-events: auto;
}


/*
 * Hide native WP Go Maps renderers.
 *
 * JavaScript also hides these, but keeping
 * this here prevents flashes while loading.
 */

.custom-globe-wpgmza-ui .ol-viewport,
.custom-globe-wpgmza-ui .leaflet-container,
.custom-globe-wpgmza-ui .gm-style {
	display: none !important;
}


/*
 * ---------------------------------------------------------
 * MAPTILER CONTROLS
 * ---------------------------------------------------------
 */

.custom-globe-wrapper .maplibregl-control-container {
	z-index: 5;
}


.custom-globe-wrapper .maplibregl-ctrl-top-right {
	right: auto;
	left: 0;
}


.custom-globe-wrapper
.maplibregl-ctrl-top-right
.maplibregl-ctrl {
	margin: 10px 0 0 10px;
}


/*
 * ---------------------------------------------------------
 * LOCATION MARKERS
 * ---------------------------------------------------------
 *
 * IMPORTANT:
 * Do not add position, transform, or opacity
 * to .custom-map-marker itself.
 *
 * MapTiler / MapLibre controls those properties
 * directly on the marker root.
 *
 * Our zoom fade is applied to the SVG inside
 * the marker instead.
 * ---------------------------------------------------------
 */

.custom-map-marker {
	width: 52.8px;
	height: 52.8px;

	z-index: 20;

	cursor: pointer;
	pointer-events: auto;
}


.custom-map-marker svg {
	display: block;

	width: 100%;
	height: 100%;

	overflow: visible;

	opacity:
		var(
			--echo-detail-zoom-opacity,
			1
		);

	transition:
		opacity 250ms ease;
}


/*
 * Marker core.
 */

.custom-map-marker .marker-core {
	fill:
		var(
			--marker-color,
			var(--echo-green)
		);

	transform-box: fill-box;
	transform-origin: center;

	transition:
		transform var(--echo-transition),
		opacity var(--echo-transition);
}


/*
 * Marker ring.
 */

.custom-map-marker .marker-ring {
	fill: none;

	stroke:
		var(
			--marker-color,
			var(--echo-green)
		);
	/* Keep the animated ring at least 2 screen pixels wide. */
	stroke-width: 2px;
	vector-effect: non-scaling-stroke;

	opacity: 0;

	/* Animate the vector radius instead of scaling the rasterized SVG.
	 * At r=129.6px the ring covers the same area as r=16 at 8.1x.
	 * Stroke thickness stays consistent for the whole pulse. */
	r: 10.4px;

	pointer-events: none;
}


/*
 * Hover.
 */

.custom-map-marker.is-hovered .marker-core,
.custom-map-marker:hover .marker-core {
	transform: scale(1.2);
}


/*
 * Active marker.
 */

.custom-map-marker.is-active .marker-core {
	transform: scale(1.25);
}


/*
 * One-time pulse.
 */

.custom-map-marker.ring-once .marker-ring {
	animation:
		echo-globe-marker-pulse
		var(--echo-random-ping-duration, 3.6s)
		cubic-bezier(0.12, 0.78, 0.18, 1)
		1;
}


/*
 * Continuous category pulse.
 */
.custom-map-marker.ring-category-continuous .marker-ring,
.custom-map-marker.ring-continuous .marker-ring {
	animation:
		echo-globe-marker-pulse
		7.5s
		cubic-bezier(0.12, 0.78, 0.18, 1)
		infinite;
}

/*
 * ---------------------------------------------------------
 * MARKER CATEGORY COLORS
 * ---------------------------------------------------------
 */


/* Temp-Controlled Cross-Dock Terminal*/
.echo-map-legend__marker.marker-type-temp-cross-dock,
.custom-map-marker.marker-type-temp-cross-dock {
	--marker-color: #9ec9c3;
}

/* Temp-Controlled Full-Service Warehouse */
.echo-map-legend__marker.marker-type-temp-full-service,
.custom-map-marker.marker-type-temp-full-service {
	--marker-color: #3eb489;
}

/* Echo Corporate HQ */
.echo-map-legend__marker.marker-type-corporate-hq,
.custom-map-marker.marker-type-corporate-hq {
	--marker-color: #8de969;
}

/*
 * Keep the continuously pulsing HQ above every other marker.
 * Override the inline WP Go Maps stacking priority on marker roots.
 */
.maptiler-globe .custom-map-marker.marker-type-corporate-hq {
	z-index: 2147483646 !important;
}

/* Echo Office */
.echo-map-legend__marker.marker-type-office,
.custom-map-marker.marker-type-office {
	--marker-color: #8de969;
}

/* v1.1.27: Strategic port and international hub markers. */
.echo-map-legend__marker.marker-type-strategic-hub,
.custom-map-marker.marker-type-strategic-hub {
    /* Distinct lighter green for strategic hubs, shared by pins and legend. */
    --marker-color: var(--echo-strategic-hub-color);
}

/*
 * Strategic hubs sit beneath all other HTML markers, regardless of
 * inline priorities, and do not intercept clicks or hover. Their SVG
 * pulse animation continues running normally.
 */
.maptiler-globe .custom-map-marker.marker-type-strategic-hub {
    z-index: 0 !important;
    pointer-events: none;
    cursor: default;
}

/* Trailer yards: separate from existing facility and distribution colors. */
.echo-map-legend__marker.marker-type-trailer-yard,
.custom-map-marker.marker-type-trailer-yard {
    --marker-color: #b887cc;
}

/* Dry Full-Service Center */
.echo-map-legend__marker.marker-type-dry-full-service,
.custom-map-marker.marker-type-dry-full-service {
	--marker-color: #db9a37;
}



/*
 * Marker visibility states.
 *
 * Category matching controls visibility only.
 * Zoom-based opacity is handled by the SVG.
 */

.custom-map-marker.is-category-match {
	visibility: visible;
}


.custom-map-marker.is-category-hidden,
.custom-map-marker.is-map-hidden,
.custom-map-marker.is-control-hidden {
	visibility: hidden;
	opacity: 0;

	pointer-events: none;
}


/*
 * When the globe is zoomed out far enough,
 * markers are fully transparent.
 *
 * Disable pointer interaction as well so
 * invisible markers cannot intercept clicks.
 */

.is-detail-zoom-hidden .custom-map-marker {
	pointer-events: none;
}


.is-lane-facility-zoom-hidden .echo-facility-marker,
.is-lane-facility-zoom-hidden .echo-terminal-marker {
	pointer-events: none;
}


/*
 * Marker pulse animation.
 * The ring is now 50% larger than v1.1.11 (6× its original diameter).
 * Pings expand rapidly at first, then ease progressively into their full diameter.
 * No invisible 30% hold: the ring fades and scales through the full duration.
 */

@keyframes echo-globe-marker-pulse {

	0% {
		r: 10.4px;
		opacity: 1;
	}

	100% {
		r: 129.6px;
		opacity: 0;
	}

}


/*
 * ---------------------------------------------------------
 * FACILITY MARKERS
 * ---------------------------------------------------------
 *
 * As with office markers, MapLibre owns the
 * root marker's inline opacity.
 *
 * Our zoom fade is applied to the child SVG.
 * ---------------------------------------------------------
 */

.echo-facility-marker {
	width: 50.4px;
	height: 50.4px;

	z-index: 10;

	cursor: pointer;
	pointer-events: auto;
}


.echo-facility-marker svg {
	display: block;
	width: 100%;
	height: 100%;
	overflow: visible;

	opacity:
		var(
			--echo-lane-facility-zoom-opacity,
			1
		);

	transition:
		opacity 250ms ease;
}


/*
 * Facility core.
 */

.echo-facility-marker .facility-marker-core {
	fill: var(--echo-facility-color);

	transform-box: fill-box;
	transform-origin: center;

	transition:
		transform var(--echo-transition, 180ms ease),
		opacity var(--echo-transition, 180ms ease);
}


/*
 * Facility ring.
 *
 * Hidden for now, but retained so we can
 * animate or enable it later.
 */

.echo-facility-marker .facility-marker-ring {
	fill: none;

	stroke: var(--echo-facility-color);
	stroke-width: 3;

	opacity: 0;

	transform: scale(0.65);
	transform-box: fill-box;
	transform-origin: center;

	pointer-events: none;
}


/*
 * Facility hover.
 */

.echo-facility-marker:hover .facility-marker-core,
.echo-facility-marker.is-hovered .facility-marker-core {
	transform: scale(1.2);
}


/*
 * Facility active state.
 */

.echo-facility-marker.is-active .facility-marker-core {
	transform: scale(1.25);
}



/*
 * ---------------------------------------------------------
 * TERMINAL MARKERS
 * ---------------------------------------------------------
 *
 * As with office markers, MapLibre owns the
 * root marker's inline opacity.
 *
 * Our zoom fade is applied to the child SVG.
 * ---------------------------------------------------------
 */


.echo-terminal-marker {
	width: 38.4px;
	height: 38.4px;

	z-index: 10;

	cursor: pointer;
	pointer-events: auto;
}


.echo-terminal-marker svg {
	display: block;
	width: 100%;
	height: 100%;
	overflow: visible;

	opacity:
		var(
			--echo-terminal-zoom-opacity,
			1
		);

	transition:
		opacity 250ms ease;
}


/*
 * terminal core.
 */

.echo-terminal-marker .terminal-marker-core {
	fill: var(--echo-terminal-color);

	transform-box: fill-box;
	transform-origin: center;

	transition:
		transform var(--echo-transition, 180ms ease),
		opacity var(--echo-transition, 180ms ease);
}


/*
 * terminal ring.
 *
 * Hidden for now, but retained so we can
 * animate or enable it later.
 */

.echo-terminal-marker .terminal-marker-ring {
	fill: none;

	stroke: var(--echo-terminal-color);
	stroke-width: 3;

	opacity: 0;

	transform: scale(0.65);
	transform-box: fill-box;
	transform-origin: center;

	pointer-events: none;
}


/*
 * terminal hover.
 */

.echo-terminal-marker:hover .terminal-marker-core,
.echo-terminal-marker.is-hovered .terminal-marker-core {
	transform: scale(1.2);
}


/*
 * terminal active state.
 */

.echo-terminal-marker.is-active .terminal-marker-core {
	transform: scale(1.25);
}





/*
 * ---------------------------------------------------------
 * POPUPS
 * ---------------------------------------------------------
 */

/* Popups sit above the featured HQ marker and its animated ring. */
.maptiler-globe .maplibregl-popup {
	max-width: 340px;
	z-index: 2147483647 !important;
}


.maptiler-globe .maplibregl-popup-tip {
	z-index: 101;
}


.maptiler-globe .maplibregl-popup-content {
	position: relative;
	z-index: 100;

	padding: 18px 22px 20px;

	border: 2px solid var(--echo-green);
	border-radius: 12px;

	background: #ffffff;
	color: #222222;

	box-shadow:
		0 12px 30px
		rgba(0, 0, 0, 0.18);
}


/*
 * Popup pointer.
 */

.maptiler-globe
.maplibregl-popup-anchor-bottom
.maplibregl-popup-tip {
	border-top-color: var(--echo-green);
}


.maptiler-globe
.maplibregl-popup-anchor-top
.maplibregl-popup-tip {
	border-bottom-color: var(--echo-green);
}


.maptiler-globe
.maplibregl-popup-anchor-left
.maplibregl-popup-tip {
	border-right-color: var(--echo-green);
}


.maptiler-globe
.maplibregl-popup-anchor-right
.maplibregl-popup-tip {
	border-left-color: var(--echo-green);
}


/*
 * Popup close button.
 */

.maptiler-globe .maplibregl-popup-close-button {
	top: 6px;
	right: 8px;

	width: 28px;
	height: 28px;

	padding: 0;

	border: 0;

	background: transparent;

	color: var(--echo-blue);

	font-size: 26px;
	line-height: 26px;

	cursor: pointer;
	outline: none;
}


.maptiler-globe .maplibregl-popup-close-button:hover {
	background: transparent;
	color: #000000;
}


/*
 * Custom popup content.
 */

/*
 * Set text directly on popup content, including description HTML,
 * so theme rules on paragraphs, headings, and links cannot make it pale.
 */
.maptiler-globe .maplibregl-popup-content .custom-globe-popup,
.maptiler-globe .maplibregl-popup-content .custom-globe-popup * {
	color: #222222 !important;
}


.custom-globe-popup {
	min-width: 220px;
}


.custom-globe-popup__title {
	margin: 20px 28px 8px 0 !important;
	padding: 0;

	color: #000000;

	font-size: 20px;
	font-weight: 700;
	line-height: 1.2;
}


.custom-globe-popup__address {
	margin-bottom: 8px;

	color: #666666;

	font-size: 13px;
	line-height: 1.4;
}


.custom-globe-popup__description {
	color: #555555;

	font-size: 14px;
	line-height: 1.55;
	
	overflow-y: scroll;
	max-width: 220px;
}


.custom-globe-popup__description p:first-child {
	margin-top: 0;
}


.custom-globe-popup__description p:last-child {
	margin-bottom: 0;
}


.custom-globe-popup__link {
	display: inline-block;

	margin-top: 14px;

	color: #000000;

	font-size: 14px;
	font-weight: 700;

	text-decoration: underline;
	text-decoration-color: var(--echo-green);
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
}


/*
 * ---------------------------------------------------------
 * WP GO MAPS FILTER / LISTING
 * ---------------------------------------------------------
 */

.custom-globe-wpgmza-ui .wpgmza-category-filter,
.custom-globe-wpgmza-ui .wpgmza-marker-listing,
.custom-globe-wpgmza-ui .wpgmza_marker_list_class {
	position: relative;
	z-index: 10;
}


/*
 * ---------------------------------------------------------
 * HTML OVERLAY
 * ---------------------------------------------------------
 */

.echo-globe-overlay {
	position: absolute;
	inset: 0;

	z-index: 8;

	pointer-events: none;
}


/*
 * ---------------------------------------------------------
 * CONTENT PANEL
 * ---------------------------------------------------------
 */

.echo-globe-panel {
	position: absolute;

	top: 74px;
	left: 64px;

	width: min(35%, 520px);
	height: calc(100% - 120px);

	pointer-events: none;
}


.echo-globe-panel__inner {
	width: 100%;
	height: 100%;

	padding: 32px;

	box-sizing: border-box;

	pointer-events: none;
}


.echo-globe-panel__content {
	width: 100%;
	height: 100%;

	color: var(--echo-text);

	pointer-events: auto;
}


.echo-globe-panel__content p {
	color: var(--echo-text);
	line-height: 1;
}


/*
 * ---------------------------------------------------------
 * MAP OVERLAY CONTROLS
 * ---------------------------------------------------------
 */

/* The two network controls are visible again in v1.1.24. */


.echo-globe-mode-controls {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}


/*
 * Bootstrap .btn-sm equivalent sizing:
 *
 * padding: .25rem .5rem
 * font-size: .875rem
 * line-height: 1.5
 *
 * Keeping the pill appearance while matching
 * Bootstrap's small button dimensions.
 */

.echo-globe-mode-button {
	display: inline-flex;
	align-items: center;

	appearance: none;

	padding: 0.25rem 0.5rem;

	border:
		1px solid
		rgba(255, 255, 255, 0.25);

	border-radius: 999px;

	background:
		rgba(17, 24, 29, 0.72);

	color: #ffffff;

	font-family: inherit;
	font-size: 0.675rem;
	font-weight: 600;
	line-height: 1.5;

	text-align: left;
	vertical-align: middle;

	cursor: pointer;
	user-select: none;

	transition:
		background-color var(--echo-transition),
		border-color var(--echo-transition),
		color var(--echo-transition),
		box-shadow var(--echo-transition);
}


.echo-globe-mode-button:hover {
	border-color:
		rgba(141, 233, 105, 0.65);

	background:
		rgba(17, 24, 29, 0.9);

	color: #ffffff;
}


.echo-globe-mode-button:focus-visible {
	outline:
		2px solid
		var(--echo-green);

	outline-offset: 3px;
}


/*
 * Active toggle.
 */

.echo-globe-mode-button.is-active {
	border-color:
		var(--echo-green);

	background:
		var(--echo-green);

	color:
		var(--echo-dark);

	box-shadow:
		0 0 0 1px
		rgba(141, 233, 105, 0.2),
		0 0 18px
		rgba(141, 233, 105, 0.22);
}


.echo-globe-mode-button.is-active:hover {
	border-color:
		var(--echo-green-hover);

	background:
		var(--echo-green-hover);

	color:
		var(--echo-dark);
}


/*
 * Status dot.
 */

.echo-globe-mode-button::before {
	content: '';

	display: inline-block;
	flex: 0 0 auto;

	width: 6px;
	height: 6px;

	margin-right: 0.4rem;

	border-radius: 50%;

	background:
		rgba(255, 255, 255, 0.35);

	transition:
		background-color var(--echo-transition),
		box-shadow var(--echo-transition);
}


.echo-globe-mode-button.is-active::before {
	background:
		var(--echo-dark);

	box-shadow:
		0 0 0 2px
		rgba(17, 24, 29, 0.12);
}


/*
 * ---------------------------------------------------------
 * MOBILE
 * ---------------------------------------------------------
 */

@media (max-width: 767px) {

	.custom-map-marker {
		width: 52.8px;
		height: 52.8px;
	}


	.maptiler-globe .maplibregl-popup {
		max-width: 280px;
	}


	.maptiler-globe .maplibregl-popup-content {
		padding: 16px 18px 18px;
	}


	.custom-globe-popup__title {
		font-size: 18px;
	}


	/*
	 * The JS moves .echo-globe-overlay INTO .custom-globe-wrapper.
	 * The wrapper is given a pixel height by WP Go Maps during initialization;
	 * override that on mobile and reserve a map-sized block above the panel.
	 * Keep the map canvas confined to that block so no overlay intercepts it.
	 */
	.echo-globe-map-shortcode .custom-globe-wrapper {
		height: auto !important;
		min-height: 0 !important;
		padding-top: var(--echo-globe-map-height, 500px);
		overflow: visible;
		box-sizing: border-box;
	}

	.echo-globe-map-shortcode .custom-globe-wrapper > .maptiler-globe {
		top: 0;
		bottom: auto;
		height: var(--echo-globe-map-height, 500px) !important;
	}

	/* Native WP Go Maps UI also stays within the map touch area. */
	.echo-globe-map-shortcode .custom-globe-wrapper > .custom-globe-wpgmza-ui {
		top: 0;
		bottom: auto;
		height: var(--echo-globe-map-height, 500px) !important;
	}

	/* Match the panel both before and after JavaScript reparents it. */
	.echo-globe-map-shortcode .echo-globe-overlay {
		position: relative;
		inset: auto;
		width: 100%;
		height: auto;
		z-index: auto;
		background: #05184D;
		pointer-events: auto;
	}

	.echo-globe-map-shortcode .echo-globe-overlay > .echo-globe-panel {
		position: relative;
		top: auto;
		left: auto;
		width: 100%;
		height: auto;
		margin: 0;
		max-width: none;
		pointer-events: auto;
	}

	.echo-globe-map-shortcode .echo-globe-panel__inner {
		width: 100%;
		height: auto;
		padding: 24px 20px 28px;
		box-sizing: border-box;
		pointer-events: auto;
	}

	.echo-globe-map-shortcode .echo-globe-panel__content {
		height: auto;
		pointer-events: auto;
	}

	/* Let MapLibre receive touches on the full canvas area. */
	.custom-globe-wrapper .maptiler-globe,
	.custom-globe-wrapper .maplibregl-map,
	.custom-globe-wrapper .maplibregl-canvas-container,
	.custom-globe-wrapper .maplibregl-canvas,
	.custom-globe-wrapper .maptilersdk-canvas {
		touch-action: none;
	}

}


/*
 * ---------------------------------------------------------
 * REDUCED MOTION
 * ---------------------------------------------------------
 */

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

	.custom-map-marker.ring-once .marker-ring,
	.custom-map-marker.ring-continuous .marker-ring {
		animation: none;
	}


	.custom-map-marker svg,
	.echo-facility-marker svg,
	.custom-map-marker .marker-core,
	.echo-globe-mode-button,
	.echo-globe-mode-button::before {
		transition: none;
	}

}


/*
 * ---------------------------------------------------------
 * DISABLE MAPTILER TOOL GROUP AND LOGOS
 * ---------------------------------------------------------
 */

.maplibregl-ctrl-group {
	display: none !important;
}


.maplibregl-ctrl {
	display: none !important;
}


.maplibregl-ctrl-attrib-inner {
	display: none !important;
}

/*
 * ---------------------------------------------------------
 * MAP LEGEND
 * ---------------------------------------------------------
 */

.echo-map-legend {
	margin-top: 1rem;

	display: flex;
	flex-direction: column;
	gap: 0.35rem;

	color: var(--echo-text);
}


.echo-map-legend__title,
.echo-distribution-legend__title {
	margin-bottom: 0.25rem;

	font-size: 0.75rem;
	font-weight: 700;
	line-height: 1.2;

	text-transform: uppercase;
	letter-spacing: 0.04em;
}


/*
 * Standard legend row.
 */

.echo-map-legend__item,
.echo-distribution-legend__item {
	display: flex;
	align-items: center;

	gap: 0.5rem;

	min-height: 16px;

	font-size: 0.75rem;
	line-height: 1.3;
}


/*
 * ---------------------------------------------------------
 * LINE SYMBOLS
 * ---------------------------------------------------------
 *
 * All network line icons use one markup primitive. The base
 * line and brighter flow highlight are drawn with pseudo-elements.
 * ---------------------------------------------------------
 */

.echo-map-legend__line {
	--legend-line-base: var(--echo-country-border-color);
	--legend-line-flow: var(--legend-line-base);
	--legend-line-base-width: 2px;
	--legend-line-flow-width: 2px;

	position: relative;
	display: inline-block;
	width: 28px;
	height: 8px;
	flex: 0 0 28px;
}

.echo-map-legend__line::before,
.echo-map-legend__line::after {
	content: '';
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	border-radius: 999px;
}

.echo-map-legend__line::before {
	left: 0;
	width: 100%;
	height: var(--legend-line-base-width);
	background: var(--legend-line-base);
}

.echo-map-legend__line::after {
	left: 30%;
	width: 40%;
	height: var(--legend-line-flow-width);
	background: var(--legend-line-flow);
}

.echo-map-legend__line--truckload {
	--legend-line-base: var(--echo-lane-line);
	--legend-line-flow: var(--echo-lane-flow);
}

.echo-map-legend__line--rail {
	--legend-line-base: var(--echo-rail-color);
	--legend-line-flow: var(--echo-rail-flow);
}

.echo-map-legend__line--state {
	--legend-line-base: var(--echo-state-border-color);
	--legend-line-base-width: 1px;
}

.echo-map-legend__line--country {
	--legend-line-base: var(--echo-country-border-color);
	--legend-line-base-width: 2px;
}

.echo-map-legend__line--state::after,
.echo-map-legend__line--country::after {
	display: none;
}

/*
 * ---------------------------------------------------------
 * MARKER SYMBOLS
 * ---------------------------------------------------------
 */

.echo-map-legend__marker {
	display: inline-block;
	width: 10px;
	height: 10px;
	flex: 0 0 10px;
	border-radius: 50%;
	background: var(--marker-color, var(--echo-green));
}

.echo-map-legend__marker--facility,
.echo-map-legend__marker--distribution {
	background: var(--echo-facility-color);
}

.echo-map-legend__marker--terminal {
	background: var(--echo-terminal-color);
}

.echo-map-legend__group {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
}

.echo-map-legend__group-title {
	margin-bottom: 0.1rem;
	font-size: 0.75rem;
	font-weight: 700;
	line-height: 1.2;
}


/*
 * ---------------------------------------------------------
 * DISTRIBUTION COVERAGE
 * ---------------------------------------------------------
 */

.echo-distribution-legend {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;

	color: var(--echo-text);
}


.echo-distribution-legend__swatch {
	display: inline-block;

	width: 12px;
	height: 12px;

	flex: 0 0 12px;

	border: 1px solid currentColor;
	border-radius: 2px;
}


.echo-distribution-legend__swatch--1 {
	background:
		var(--echo-distribution-1day);

	color:
		var(--echo-distribution-1day);
}


.echo-distribution-legend__swatch--2 {
	background:
		var(--echo-distribution-2day);

	color:
		var(--echo-distribution-2day);
}


.echo-distribution-legend__swatch--3 {
	background:
		var(--echo-distribution-3day);

	color:
		var(--echo-distribution-3day);
}

/*
 * ---------------------------------------------------------
 * LEGEND ACTIVE / INACTIVE STATE
 * ---------------------------------------------------------
 */

[data-legend-toggle] {
	transition:
		opacity var(--echo-transition);
}


[data-legend-toggle].is-legend-inactive {
	opacity: 0.25;
}
/* Intro description only; leave other site typography unchanged. */
.echo-globe-panel__intro-copy { line-height: 1.7; }

/* v1.1.24 — Fixed Echo Locations control and grouped network legend. */
.echo-globe-mode-button--fixed:disabled {
  opacity: 1;
  cursor: default;
  background: var(--echo-green);
  border-color: var(--echo-green);
  color: var(--echo-dark);
}
.echo-map-legend__main-title { margin-bottom: 0.65rem; }
.echo-map-legend__subgroup { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 0.7rem; }
.echo-map-legend__subgroup-title { font-weight: 700; font-size: 0.75rem; line-height: 1.3; margin-bottom: 0.15rem; }
