/* Wall Steel Locations Map - v1.0.0
 * All rules are scoped to .wsl so the theme cannot break the layout
 * and this component cannot affect the rest of the site.
 * Adjust the colours in the custom properties below.
 */

.wsl {
	--wsl-accent: #009fda;
	--wsl-text: #ffffff;
	--wsl-muted: #c3c8d0;
	--wsl-row-bg: rgba(255, 255, 255, 0.06);
	--wsl-row-bg-hover: rgba(255, 255, 255, 0.1);
	--wsl-row-bg-active: rgba(0, 159, 218, 0.14);
	--wsl-radius: 10px;
	--wsl-gap: 32px;

	width: 100%;
	color: var(--wsl-text);
	font-family: inherit;
	line-height: 1.45;
	text-align: left;
}

.wsl *,
.wsl *::before,
.wsl *::after {
	box-sizing: border-box;
}

/* Header ------------------------------------------------------------ */

.wsl .wsl__header {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 28px;
	margin: 0 0 20px;
}

.wsl .wsl__title {
	margin: 0;
	padding: 0;
	font-size: 20px;
	font-weight: 600;
	line-height: 1.2;
	color: var(--wsl-text);
}

.wsl .wsl__phone {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-size: 18px;
	font-weight: 600;
	color: var(--wsl-text);
	text-decoration: none;
}

.wsl .wsl__phone svg {
	width: 18px;
	height: 18px;
	color: var(--wsl-accent);
}

.wsl .wsl__phone:hover span {
	text-decoration: underline;
}

/* Layout ------------------------------------------------------------ */

.wsl .wsl__body {
	display: grid;
	grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
	gap: var(--wsl-gap);
	align-items: stretch;
}

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

.wsl .wsl__map {
	position: relative;
	z-index: 0;
	isolation: isolate; /* keeps Leaflet's layers below sticky headers and menus */
	min-height: 420px;
	height: 100%;
	border-radius: var(--wsl-radius);
	overflow: hidden;
	background: #e9eaec;
}

/* Grey map style, similar to the original design. */
.wsl .wsl__map .leaflet-tile-pane {
	filter: grayscale(1) brightness(1.05) contrast(0.9);
}

.wsl .wsl__map .leaflet-popup-content {
	margin: 10px 14px;
	font-size: 13px;
	line-height: 1.4;
	color: #1f2933;
}

.wsl .wsl__map img {
	max-width: none !important; /* themes often set img { max-width:100% } which breaks map tiles */
}

.wsl-pin {
	background: none;
	border: 0;
	color: var(--wsl-accent, #009fda);
}

.wsl-pin svg {
	display: block;
	filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.3));
	transform-origin: 50% 100%;
	transition: transform 0.2s ease;
}

.wsl-pin--active svg {
	transform: scale(1.25);
}

/* Office list ------------------------------------------------------- */

.wsl .wsl__list {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.wsl .wsl__item {
	display: grid;
	grid-template-columns: 105px minmax(0, 1.4fr) minmax(0, 1fr);
	align-items: center;
	gap: 8px 16px;
	margin: 0;
	padding: 14px 18px;
	list-style: none;
	background: var(--wsl-row-bg);
	border: 1px solid transparent;
	border-radius: var(--wsl-radius);
	cursor: pointer;
	transition: background-color 0.2s ease, border-color 0.2s ease;
}

.wsl .wsl__item::before,
.wsl .wsl__item::marker {
	content: none;
	display: none;
}

.wsl .wsl__item:hover {
	background: var(--wsl-row-bg-hover);
}

.wsl .wsl__item.is-active {
	background: var(--wsl-row-bg-active);
	border-color: var(--wsl-accent);
}

.wsl .wsl__country {
	all: unset;
	cursor: pointer;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.3;
	color: var(--wsl-accent);
}

.wsl .wsl__country:focus-visible {
	outline: 2px solid var(--wsl-accent);
	outline-offset: 3px;
	border-radius: 3px;
}

.wsl .wsl__line {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	margin: 0;
	font-size: 13px;
	line-height: 1.45;
	color: var(--wsl-muted);
}

.wsl .wsl__line svg {
	flex: 0 0 14px;
	width: 14px;
	height: 14px;
	margin-top: 2px;
	color: var(--wsl-accent);
}

.wsl .wsl__line a {
	color: inherit;
	text-decoration: none;
	transition: color 0.2s ease;
}

.wsl .wsl__line a:hover,
.wsl .wsl__line a:focus-visible {
	color: var(--wsl-text);
	text-decoration: underline;
}

.wsl .wsl__email a {
	color: var(--wsl-accent);
	overflow-wrap: anywhere;
}

/* Responsive -------------------------------------------------------- */

@media (max-width: 1024px) {
	.wsl .wsl__body {
		grid-template-columns: 1fr;
		gap: 24px;
	}

	.wsl .wsl__map {
		min-height: 0;
		height: 340px;
	}
}

@media (max-width: 600px) {
	.wsl .wsl__map {
		height: 280px;
	}

	.wsl .wsl__item {
		grid-template-columns: 1fr;
		gap: 6px;
		padding: 14px 16px;
	}
}
