/* Contact Map block */

.wdm-contact-map {
	width: 100%;
	margin-top: 0 !important;
	margin-bottom: 0;
	--wdm-contact-map-card-offset: calc((100vw - 1260px) / 2 + 15px);
}

.is-layout-flow > .wdm-contact-map {
	margin-block-start: 0 !important;
}

.wdm-contact-map.alignfull {
	box-sizing: border-box;
	display: block;
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(-50vw + 50%) !important;
	margin-right: calc(-50vw + 50%) !important;
}

.wdm-contact-map__inner {
	position: relative;
	overflow: hidden;
	border: 1px solid #e1e1e1;
	background: #f2f3f4;
}

.wdm-contact-map__iframe {
	display: block;
	width: 100%;
	height: 100%;
	min-height: inherit;
	border: 0;
}

/* ── Image mode: full-width static map (max 500px tall) + clickable pins ───── */
.wdm-contact-map--image .wdm-contact-map__inner {
	border: 0;
	background: transparent;
	overflow: visible;
}

.wdm-contact-map__scroll {
	width: 100%;
}

.wdm-contact-map__stage {
	position: relative;
	width: 100%;
	line-height: 0;
}

/* The box ratio is locked to the 1920x500 layout the pin coordinates were
   calibrated on: object-fit cover then always shows the SAME crop of the
   image at any viewport width, so %-positioned pins never drift. */
.wdm-contact-map__image {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1920 / 500;
	object-fit: cover;
	object-position: center;
}

@media (max-width: 781px) {
	/* Same crop geometry at a usable height: fixed 320px-tall map that
	   scrolls horizontally instead of re-cropping (which would move pins). */
	.wdm-contact-map__scroll {
		overflow-x: auto;
	}

	.wdm-contact-map__stage {
		width: calc(320px * 1920 / 500);
	}
}

/* Scroll nav: chevron buttons over the map edges while it can be panned that
   way; tapping pans the map. Buttons + .has-scroll / .is-scroll-* classes are
   managed by store-locations.js. */
.wdm-contact-map__nav {
	display: none;
	position: absolute;
	top: 133px; /* 44px tap target centred on the 320px mobile map strip */
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	background: transparent;
	z-index: 3;
	transition: opacity 0.2s ease;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}

/* No focus ring on tap/click; keyboard focus (:focus-visible) keeps it. */
.wdm-contact-map__nav:focus:not(:focus-visible) {
	outline: none;
}

.wdm-contact-map--image.has-scroll .wdm-contact-map__nav {
	display: block;
}

.wdm-contact-map__nav::before {
	content: "";
	position: absolute;
	top: 15px;
	width: 14px;
	height: 14px;
	border: solid #005CA9;
	border-width: 0 4px 4px 0;
	border-radius: 2px;
	filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.9));
	opacity: 0.85;
}

.wdm-contact-map__nav--left {
	left: 0;
}

.wdm-contact-map__nav--left::before {
	left: 10px;
	transform: rotate(135deg);
}

.wdm-contact-map__nav--right {
	right: 0;
}

.wdm-contact-map__nav--right::before {
	right: 10px;
	transform: rotate(-45deg);
}

.wdm-contact-map--image.is-scroll-start .wdm-contact-map__nav--left,
.wdm-contact-map--image.is-scroll-end .wdm-contact-map__nav--right {
	opacity: 0;
	pointer-events: none;
}

.wdm-contact-map__pins {
	position: absolute;
	inset: 0;
	pointer-events: none;
}

.wdm-contact-map__pin {
	position: absolute;
	width: 40px;
	height: 40px;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
	pointer-events: auto;
	transform: translate(-50%, -100%);
	transform-origin: center bottom;
	transition: transform 0.15s ease;
	z-index: 3;
}

.wdm-contact-map__pin img {
	display: block;
	width: 100%;
	height: 100%;
	pointer-events: none;
	filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.wdm-contact-map__pin:hover,
.wdm-contact-map__pin:focus-visible {
	outline: none;
	transform: translate(-50%, -100%) scale(1.12);
}

.wdm-contact-map__pin.is-active {
	transform: translate(-50%, -100%) scale(1.18);
	z-index: 4;
}

.wdm-contact-map__address-link {
	cursor: pointer;
}

.wdm-contact-map__card {
	position: absolute;
	top: 50%;
	left: var(--wdm-contact-map-card-offset);
	width: 318px;
	min-height: 328px;
	max-width: calc(100% - (var(--wdm-contact-map-card-offset) * 2));
	padding: 24px;
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.16);
	color: #333;
	z-index: 2;
	transform: translateY(-50%);
}

.wdm-contact-map--right .wdm-contact-map__card {
	left: auto;
	right: var(--wdm-contact-map-card-offset);
}

@media (max-width: 1350px) {
	.wdm-contact-map {
		--wdm-contact-map-card-offset: 50px;
	}
}

.wdm-contact-map__company {
	margin: 0 0 10px;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.4;
	color: #262626;
	text-transform: uppercase;
}

.wdm-contact-map__line {
	margin: 0 0 8px;
	display: flex;
	align-items: flex-start;
	gap: 8px;
	font-size: 16px;
	line-height: 1.5;
	color: #323232;
}

.wdm-contact-map__line-icon {
	width: 24px;
	height: 24px;
	margin-top: 0;
	object-fit: contain;
	flex-shrink: 0;
}

.wdm-contact-map__line-text {
	line-height: 1.5;
	color: #323232;
}

.wdm-contact-map__line a {
	display: inline-flex;
	align-items: flex-start;
	color: #323232;
}

.wdm-contact-map__line--address .wdm-contact-map__line-text {
	white-space: normal;
	overflow-wrap: break-word;
	min-width: 0;
}

.wdm-contact-map__line--phone .wdm-contact-map__line-text,
.wdm-contact-map__line--email .wdm-contact-map__line-text:not(.wdm-contact-map__line-value) {
	flex-shrink: 0;
	white-space: nowrap;
}

.wdm-contact-map__line--email {
	flex-wrap: wrap;
}

.wdm-contact-map__line--email a {
	min-width: 0;
}

.wdm-contact-map__line-value {
	overflow-wrap: break-word;
}

.wdm-contact-map__line a {
	color: inherit;
	text-decoration: none;
}

/* Underline the linked value only — prefixes ("Tālr.:", "E-pasts:") stay plain.
   The address selector must out-rank ".wdm-contact-map__line a" above. */
.wdm-contact-map__line-value,
.wdm-contact-map__line a.wdm-contact-map__address-link {
	text-decoration: underline;
}

.wdm-contact-map__hours {
	margin-top: 14px;
	padding-top: 12px;
	border-top: 1px solid #e8e8e8;
}

.wdm-contact-map__hours-title {
	margin: 0 0 8px;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.25;
	text-transform: uppercase;
	color: #20201f;
}

.wdm-contact-map__hours-row {
	margin: 0 0 12px;
	display: grid;
	grid-template-columns: max-content max-content;
	column-gap: 8px;
	align-items: baseline;
	justify-content: start;
	font-size: 14px;
	line-height: 1.5;
	color: #20201f;
}

.wdm-contact-map__hours-row:last-child {
	margin-bottom: 0;
}

.wdm-contact-map__hours-label,
.wdm-contact-map__hours-value {
	font-weight: 400;
	color: #20201f;
}

.wdm-contact-map__hours-value {
	text-align: left;
}

.wdm-contact-map__hours-value.is-closed {
	color: #d40329;
}

@media (max-width: 991px) {
	.wdm-contact-map {
		--wdm-contact-map-card-offset: 30px;
	}

	.wdm-contact-map__card {
		top: 50%;
		left: var(--wdm-contact-map-card-offset);
		max-width: calc(100% - (var(--wdm-contact-map-card-offset) * 2));
	}

	.wdm-contact-map--right .wdm-contact-map__card {
		right: var(--wdm-contact-map-card-offset);
	}
}

@media (max-width: 781px) {
	.wdm-contact-map {
		--wdm-contact-map-card-offset: 20px;
	}

	.wdm-contact-map__inner {
		min-height: 420px !important;
	}

	.wdm-contact-map__card,
	.wdm-contact-map--right .wdm-contact-map__card {
		position: static;
		width: auto;
		min-height: 0;
		margin: 14px;
		transform: none;
	}
}
