/* =============================================================================
   Association Map Widget — blaek-am
   ============================================================================= */

/* ── Wrapper ─────────────────────────────────────────────────────────────── */
.blaek-am {
	font-size: 1rem;
	line-height: 1.5;
	position: relative;
	z-index: 1;
}

/* Allow the map wrapper to visually break out of the Elementor column */
.elementor-widget-blaek_association_map,
.elementor-widget-blaek_association_map > .elementor-widget-container {
	overflow: visible !important;
}

/* Clip at the Elementor section/container level so the breakout doesn't
   cause a horizontal scrollbar on the page */
.elementor-element.e-parent:has(.elementor-widget-blaek_association_map) {
	overflow: hidden !important;
}

/* ── Search area ─────────────────────────────────────────────────────────── */
.blaek-am__search {
	margin-bottom: 2rem;
}

/* Text input row */
.blaek-am__input-row {
	display: flex;
	align-items: stretch;
	box-shadow: 0 0 25px 0 rgba(0, 0, 0, 0.1);
}

.blaek-am__text-input {
	flex: 1 1 auto;
	height: 68px;
	padding: 0.65rem 20px;
	font-size: 1rem;
	border: 1px solid rgba(110, 120, 130, 1);
	border-right: none;
	border-radius: 0;
	outline: none;
	background: #fff;
	color: inherit;
	transition: border-color 0.15s;
}

.blaek-am__text-input:focus {
	border-color: var(--e-global-color-f733163, #0F7DC8);
}

.blaek-am__search-btn {
	flex: 0 0 68px;
	width: 68px;
	height: 68px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	background: var(--e-global-color-f733163, #0F7DC8);
	color: #fff;
	border: none;
	border-radius: 0;
	cursor: pointer;
	transition: background 0.15s;
}

.blaek-am__search-btn:hover,
.blaek-am__search-btn:focus {
	background: #00508a;
	outline: none;
}

.blaek-am__search-btn svg {
	width: 20px;
	height: 20px;
}

/* "oder" separator */
.blaek-am__or {
	display: block;
	margin: 16px 0;
	color: #666;
	font-size: 0.9rem;
}

/* Dropdowns */
.blaek-am__dropdowns {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.blaek-am__select-wrap {
	position: relative;
}

.blaek-am__select {
	width: 100%;
}

/* ── Select2 overrides ───────────────────────────────────────────────────── */
.blaek-am .select2-container {
	width: 100% !important;
}

.blaek-am .select2-container--default .select2-selection--single {
	min-height: 68px;
	display: flex;
	align-items: center;
	padding: 0.65rem 20px;
	border: 1px solid #d0d0d0;
	border-radius: 0;
	font-size: 1rem;
	line-height: 1.5;
	background: #fff;
	box-shadow: 0 0 25px 0 rgba(0, 0, 0, 0.1);
	transition: border-color 0.15s;
}

.blaek-am .select2-container--default.select2-container--open .select2-selection--single,
.blaek-am .select2-container--default.select2-container--focus .select2-selection--single {
	border-color: var(--e-global-color-f733163, #0F7DC8);
	outline: none;
}

.blaek-am .select2-container--default .select2-selection--single .select2-selection__rendered {
	display: flex;
	align-items: center;
	flex: 1 1 auto;
	min-width: 0;
	padding: 0;
	color: var(--e-global-color-f733163, #0F7DC8);
	line-height: inherit;
	font-weight: 400;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.blaek-am .select2-container--default .select2-selection--single .select2-selection__placeholder {
	color: var(--e-global-color-97e2714, #085A9C);
}

.blaek-am .select2-container--default .select2-selection--single .select2-selection__arrow {
	top: 50%;
	right: 1rem;
	transform: translateY(-50%);
	height: auto;
	width: 16px;
}

.blaek-am .select2-container--default .select2-selection--single .select2-selection__arrow b {
	display: none;
}

.blaek-am .select2-container--default .select2-selection--single .select2-selection__arrow::after {
	content: '';
	display: block;
	width: 10px;
	height: 10px;
	border-right: 2px solid var(--e-global-color-f733163, #0F7DC8);
	border-bottom: 2px solid var(--e-global-color-f733163, #0F7DC8);
	transform: rotate(45deg) translateY(-3px);
}

.blaek-am .select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow::after {
	transform: rotate(-135deg) translateY(-3px);
}

.blaek-am .select2-container--default .select2-selection--single .select2-selection__clear {
	position: static;
	display: inline-flex;
	align-items: center;
	align-self: center;
	flex-shrink: 0;
	order: -1;
	margin-right: 0.5rem;
	color: var(--e-global-color-f733163, #0F7DC8);
	font-size: 1.1rem;
	line-height: 1;
	height: auto;
}

.blaek-am .select2-dropdown {
	border: 1px solid #d0d0d0;
	border-top: none;
	border-radius: 0;
	font-size: 1rem;
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.blaek-am .select2-container--default .select2-search--dropdown .select2-search__field {
	padding: 0.5rem 0.75rem;
	border: 1px solid #d0d0d0;
	border-radius: 0;
	font-size: 0.95rem;
}

.blaek-am .select2-container--default .select2-results__option {
	padding: 0.6rem 1rem;
	color: inherit;
	font-family: inherit;
	font-size: inherit;
	font-weight: inherit;
	line-height: inherit;
}

.blaek-am .select2-container--default .select2-results__option--highlighted[aria-selected] {
	background-color: var(--e-global-color-f733163, #0F7DC8);
	color: #fff;
}

/* Reset row */
.blaek-am__reset-row {
	display: flex;
	justify-content: flex-end;
	margin-top: 16px;
}

.blaek-am__reset {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	font-size: 0.9rem;
	color: var(--e-global-color-f733163, #0F7DC8);
	text-decoration: none;
	cursor: pointer;
}

.blaek-am__reset:hover {
	text-decoration: underline;
}

.blaek-am__reset-icon {
	flex-shrink: 0;
	display: inline-block;
	vertical-align: middle;
}

/* ── Map wrapper (receives full-width breakout from JS) ──────────────────── */
.blaek-am__map-wrapper {
	position: relative;
	overflow: hidden;
	/* width + margin-left set dynamically by JS */
}

/* ── Map container ───────────────────────────────────────────────────────── */
.blaek-am__map-container {
	width: 100%;
	height: 600px;
}

.blaek-am__map-container .leaflet-control-attribution {
	display: none;
}

/* ── Custom marker ───────────────────────────────────────────────────────── */
.blaek-am__marker {
	width: 18px;
	height: 18px;
	background-color: var(--e-global-color-f733163, #0F7DC8);
	border: 2px solid #fff;
	border-radius: 50%;
	cursor: pointer;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
	transition: transform 0.15s ease, background-color 0.15s ease;
}

.blaek-am__marker:hover {
	transform: scale(1.4);
	background-color: #085A9C;
}

.blaek-am__marker--district {
	width: 22px;
	height: 22px;
	background-color: #085A9C;
}

.blaek-am__marker--active {
	background-color: #E87722;
	transform: scale(1.3);
}

.blaek-am__marker--active:hover {
	background-color: #E87722;
	transform: scale(1.4);
}

.blaek-am__marker--hidden {
	display: none !important;
	pointer-events: none;
}

/* ── Side panel ──────────────────────────────────────────────────────────── */
.blaek-am__panel {
	position: absolute;
	top: 0;
	right: 0;
	width: 50%;
	height: 100%;
	background: rgba(255, 255, 255, 0.8);
	backdrop-filter: blur(10px);
	box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12);
	z-index: 1000;
	display: flex;
	flex-direction: column;
	transform: translateX(100%);
	transition: transform 0.3s ease;
	pointer-events: none;
}

.blaek-am__panel.is-open {
	transform: translateX(0);
	pointer-events: auto;
}

.blaek-am__panel-close {
	position: absolute;
	top: 16px;
	right: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: none;
	border: none;
	cursor: pointer;
	color: #666;
	border-radius: 4px;
	transition: color 0.15s, background 0.15s;
	flex-shrink: 0;
	z-index: 1;
}

.blaek-am__panel-close svg{
	width: 24px;
	fill: var(--e-global-color-95595b8, #003F72);
}

.blaek-am__panel-close:hover {
	color: var(--e-global-color-f733163, #0F7DC8);
	background: #f5f5f5;
}

.blaek-am__panel-body {
	flex: 1 1 auto;
	overflow-y: auto;
	padding: 70px 50px 50px;
	scrollbar-width: thin;
	scrollbar-color: #b8c2cc #eef2f5;
}

.blaek-am__panel-body::-webkit-scrollbar {
	width: 8px;
}

.blaek-am__panel-body::-webkit-scrollbar-track {
	background: #eef2f5;
	border-radius: 8px;
}

.blaek-am__panel-body::-webkit-scrollbar-thumb {
	background: #b8c2cc;
	border-radius: 8px;
}

.blaek-am__panel-body::-webkit-scrollbar-thumb:hover {
	background: #aab6c2;
}

/* ── Panel content ───────────────────────────────────────────────────────── */
.blaek-am__panel-name {
	font-size: 1.05rem;
	font-weight: 700;
	color: var(--e-global-color-f733163, #0F7DC8);
	margin: 0 2rem 1rem 0;
	line-height: 1.3;
}

.blaek-am__panel-address {
	font-style: normal;
	color: #444;
	margin-bottom: 0.75rem;
	line-height: 1.6;
}

.blaek-am__panel-field {
	margin: 0 0 0.5rem;
	color: #444;
}

.blaek-am__panel-label {
	font-weight: 600;
	margin-right: 0.25rem;
}

.blaek-am__panel-field a {
	color: var(--e-global-color-f733163, #0F7DC8);
	text-decoration: none;
}

.blaek-am__panel-field a:hover {
	text-decoration: underline;
}

.blaek-am__panel-roles {
	margin-top: 1rem;
	padding-top: 1rem;
	border-top: 1px solid #e5e5e5;
}

.blaek-am__panel-role {
	margin-bottom: 0.6rem;
}

.blaek-am__panel-role-label {
	display: block;
	margin-bottom: 0.15rem;
}

.blaek-am__panel-role-person {
	display: block;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media screen and (max-width: 992px) {
	.blaek-am__panel-body{
		padding: 60px 30px 30px;
	}
}

@media (max-width: 767px) {
	.blaek-am__panel {
		top: auto;
		bottom: 0;
		right: 0;
		left: 0;
		width: 100%;
		height: auto;
		max-height: 50%;
		transform: translateY(100%);
		box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.12);
		overflow-y: auto;
	}

	.blaek-am__panel.is-open {
		transform: translateY(0);
	}

	.blaek-am__panel-body {
		overflow-y: auto;
		padding: 50px 24px 24px;
	}

	.blaek-am__panel::after {
		content: '';
		position: absolute;
		bottom: 0;
		left: 0;
		right: 0;
		height: 60px;
		background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.9));
		pointer-events: none;
		z-index: 1;
	}
}

@media (max-width: 640px) {
	.blaek-am__input-row,
	.blaek-am__dropdowns {
		max-width: 100%;
	}
}
