/* Branded Map — color tokens from brand guide */
.branded-map-wrapper {
	--bm-pea:      #BAEAA0;
	--bm-stallion: #061D1B;
	--bm-white:    #FFFFFF;
	--bm-black:    #000000;
	--bm-olive:    #6B8D0C;
	--bm-boltgun:  #3A3939;

	height: var(--map-height, 620px);
	border-radius: 18px;
	overflow: hidden;
	background: var(--bm-white);
	font-family: inherit;
	box-shadow: 0 30px 60px -24px rgba(6, 29, 27, 0.35);
}

@media (max-width: 820px) {
	.branded-map-wrapper {
		border-radius: 12px;
	}
}

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

.branded-map {
	height: 100%;
	min-height: 440px;
	background: #FFFFFF;
	position: relative;
}

.branded-map-error {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	max-width: 420px;
	background: #FFFFFF;
	color: var(--bm-stallion);
	border: 1px solid rgba(6, 29, 27, 0.12);
	border-left: 4px solid #b32d2e;
	border-radius: 12px;
	padding: 20px 24px;
	box-shadow: 0 12px 30px -10px rgba(6, 29, 27, 0.25);
	display: flex;
	flex-direction: column;
	gap: 6px;
	font-size: 14px;
	line-height: 1.5;
	z-index: 10;
	text-align: center;
}

.branded-map-error strong {
	font-size: 15px;
}

.branded-map-error__hint {
	font-size: 13px;
	color: var(--bm-boltgun);
	margin-top: 4px;
}


/* Map control overrides to match brand */
.branded-map .maplibregl-ctrl-group,
.branded-map .mapboxgl-ctrl-group {
	border: 0;
	box-shadow: 0 6px 20px -6px rgba(6, 29, 27, 0.35);
	border-radius: 10px;
	overflow: hidden;
}

.branded-map .maplibregl-ctrl-group button,
.branded-map .mapboxgl-ctrl-group button {
	background-color: var(--bm-white);
}

.branded-map .maplibregl-ctrl-group button:hover,
.branded-map .mapboxgl-ctrl-group button:hover {
	background-color: var(--bm-pea);
}

/* --- Marker ---------------------------------------------------------- */

.branded-map-marker {
	--bm-pea:      #BAEAA0;
	--bm-stallion: #061D1B;
	--bm-olive:    #6B8D0C;

	width: 28px;
	height: 36px;
	background: transparent;
	border: 0;
	padding: 0;
	cursor: pointer;
	display: block;
	line-height: 0;
}

.branded-map-marker svg {
	display: block;
	transition: transform 180ms ease;
	transform-origin: center bottom;
	filter: drop-shadow(0 4px 6px rgba(6, 29, 27, 0.35));
	overflow: visible;
}

.branded-map-marker__shape {
	fill: var(--bm-stallion);
	stroke: var(--bm-pea);
	stroke-width: 2;
	transition: fill 180ms ease;
}

.branded-map-marker__core {
	fill: var(--bm-pea);
	transition: fill 180ms ease;
}

.branded-map-marker:hover svg,
.branded-map-marker:focus-visible svg {
	transform: scale(1.15);
}

.branded-map-marker:hover .branded-map-marker__shape,
.branded-map-marker:focus-visible .branded-map-marker__shape {
	fill: var(--bm-olive);
}

.branded-map-marker:focus-visible {
	outline: none;
}

/* --- Popup wrapper (MapLibre) --------------------------------------- */

.branded-map-popup {
	--bm-pea:      #BAEAA0;
	--bm-stallion: #061D1B;
	--bm-white:    #FFFFFF;
	--bm-olive:    #6B8D0C;
	--bm-boltgun:  #3A3939;
	z-index: 9999;
	font-family: inherit;
}

.branded-map-popup .maplibregl-popup-content {
	background: var(--bm-white);
	color: var(--bm-stallion);
	border-radius: 14px;
	box-shadow:
		0 24px 60px -18px rgba(6, 29, 27, 0.45),
		0 6px 18px -6px rgba(6, 29, 27, 0.15);
	padding: 16px;
	line-height: 1.4;
}

.branded-map-popup .maplibregl-popup-close-button {
	font-size: 20px;
	width: 24px;
	height: 24px;
	padding: 0;
	color: var(--bm-boltgun);
	border: 0;
	background: transparent;
	top: 6px;
	right: 6px;
	line-height: 1;
	border-radius: 50%;
	transition: background 160ms ease, color 160ms ease;
	cursor: pointer;
}

.branded-map-popup .maplibregl-popup-close-button:hover {
	background: rgba(6, 29, 27, 0.08);
	color: var(--bm-stallion);
}

.branded-map-popup .maplibregl-popup-tip {
	filter: drop-shadow(0 4px 6px rgba(6, 29, 27, 0.18));
}

/* --- Card content --------------------------------------------------- */

.branded-map-card {
	width: 270px;
	max-width: 100%;
}

.branded-map-card__header {
	display: flex;
	gap: 12px;
	align-items: center;
	margin-bottom: 10px;
}

.branded-map-card__photo {
	width: 54px;
	height: 54px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
	border: 2px solid var(--bm-pea);
	box-shadow: 0 4px 10px -4px rgba(6, 29, 27, 0.25);
}

.branded-map-card__identity {
	min-width: 0;
}

.branded-map-card__location {
	font-size: 10.5px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--bm-olive);
	font-weight: 700;
	margin-bottom: 2px;
}

.branded-map-card__attorney {
	font-size: 16px;
	font-weight: 700;
	color: var(--bm-stallion);
	line-height: 1.2;
}

.branded-map-card__meta {
	font-size: 12.5px;
	color: var(--bm-boltgun);
	padding-top: 10px;
	border-top: 1px solid rgba(6, 29, 27, 0.08);
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.branded-map-card__address,
.branded-map-card__phone {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	line-height: 1.5;
}

.branded-map-card__icon {
	flex-shrink: 0;
	margin-top: 3px;
	color: var(--bm-olive);
}

.branded-map-card__address {
	color: var(--bm-boltgun);
}

.branded-map-card__phone {
	color: var(--bm-stallion);
	text-decoration: none;
	font-weight: 600;
	border-radius: 8px;
	padding: 4px 8px;
	margin: -2px -8px;
	transition: background 160ms ease, color 160ms ease;
}

.branded-map-card__phone:hover {
	background: rgba(186, 234, 160, 0.4);
	color: var(--bm-stallion);
	text-decoration: none;
}

.branded-map-card__phone:focus-visible {
	outline: 2px solid var(--bm-olive);
	outline-offset: 1px;
}

.branded-map-card__link {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	margin-top: 10px;
	font-size: 12.5px;
	font-weight: 600;
	color: var(--bm-olive);
	text-decoration: none;
	letter-spacing: 0.02em;
	padding: 4px 0;
	border-radius: 4px;
	transition: color 160ms ease, transform 160ms ease;
}

.branded-map-card__link:hover {
	color: var(--bm-stallion);
	transform: translateX(2px);
}

.branded-map-card__link:focus-visible {
	outline: 2px solid var(--bm-olive);
	outline-offset: 4px;
}

@media (max-width: 820px) {
	.branded-map-card {
		width: calc(100vw - 32px);
		max-width: 340px;
	}
}
