/* === Custom Block Styling === */
.locationsMap{
    padding: var(--CB-padding-top) var(--CB-padding-right) var(--CB-padding-bottom) var(--CB-padding-left);
    margin-top: var(--CB-margin-top);
    margin-bottom: var(--CB-margin-bottom);
    background-color: var(--CB-background-color);
    background-image: var(--CB-background-image);
    background-position: var(--CB-background-position);
    background-size: cover;
}


.locationsMap section{
    z-index: none;
}


.locationsMap__outerMapWrapper {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    aspect-ratio: 960 / 624; /* matches the SVG's viewBox, so the width follows the height */
    z-index: 11;
}

.locationsMap__mapInner {
    position: relative;
    width: 100%;
    height: 100%;
    container-type: inline-size; /* pins size themselves from the map's width */
}

.locationsMap__svg {
    display: block;
    width: 100%;
    height: 100%;
}

.locationsMap__land {
    fill: #3d3d3f; /* Canada and Mexico */
}

.locationsMap__state {
    fill: #b3b5b5;
    stroke: #fff;
    stroke-width: 0.75;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
}

.locationsMap__pinLayer {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

/* Layout */
.locationsMap__mapPin {
    position: absolute;
    translate: -50% -100%; /* anchors the pin tip to its coordinate */
    z-index: 1;
    opacity: 0;
    transform: translateY(-25px);
}

.locationsMap__mapPin.fadeTrigger.active {
    transform: translateY(0);
    opacity: 1;
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.locationsMap__mapPin--j2,
.locationsMap__mapPin--featured {
    cursor: pointer;
    pointer-events: auto;
}

.locationsMap__mapPin--j2 { z-index: 2; }
.locationsMap__mapPin--featured { z-index: 3; }
.locationsMap__mapPin--open { z-index: 10; }

.locationsMap__mapPin__img {
    display: block;
    width: 30px; /* fallback for older browsers */
    width: clamp(16px, 3.1cqw, 30px);
    height: auto;
}

.locationsMap__mapPin--featured .locationsMap__mapPin__img,
.locationsMap__mapPin--j2 .locationsMap__mapPin__img {
    width: 38px; /* fallback */
    width: clamp(20px, 3.9cqw, 38px);
}

.locationsMap__mapPopup {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 180px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 10px 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10;
    pointer-events: none;
}

.locationsMap__mapPopup.active {
    display: block;
    pointer-events: auto;
}

/* Modules */
.locationsMap__mapPopup__name {
    font-weight: 600;
    margin: 0 0 4px;
}

.locationsMap__mapPopup__address,
.locationsMap__mapPopup__link {
    margin: 0;
    font-size: 0.875rem;
    color: #555;
}




@media screen and (max-width: 1399.98px) {
    .locationsMap__outerMapWrapper {
        /* keeps the 960:624 shape: width ends up as 85vw. 0.65 = 624 / 960 */
        max-height: calc(60vw * 0.65);
		top: 50%;
		transform: translateY(-50%);
    }
	.locationsMap__land {
        display: none;
    }
}

@media screen and (max-width: 1199.98px) {
    .locationsMap__outerMapWrapper {
        position: relative;
        width: 100%;
        height: auto;
        max-height: none;
		opacity: 1;
		top: 0;
		transform: none;
    }
	.locationsMap section{
		text-shadow: none;
	}
    .locationsMap__mapInner,
    .locationsMap__svg {
        height: auto;
    }
	.locationsMap{
		padding-top: 64px !important;
		padding-bottom: 64px !important;
	}
}