/* ============================================================
   Wilder Map Element — widget styles
   ============================================================ */

.wme-wrapper {
	width: 100%;
	height: 450px; /* default; overridden by Elementor responsive control */
	position: relative;
	border: 1px solid #000;
	border-radius: 20px;
	overflow: hidden;
	display: flex;
	align-items: stretch;
	isolation: isolate;
}

.wme-map {
	flex: 1;
	min-width: 0;
	height: 100%;
	display: block;
}

/* ---- Interaction overlay ----------------------------------- */

.wme-interaction-overlay {
	position: absolute;
	inset: 0;
	z-index: 5; /* below drawer (z-index: 10) but above map canvas */
	display: flex;
	align-items: flex-end;
	justify-content: center;
	padding-bottom: 15px;
	cursor: pointer;
	/* Transparent — just captures the click; label provides the visual cue. */
}

.wme-interaction-overlay--hidden {
	display: none;
}

.wme-interaction-overlay__label {
	background: rgba( 0, 0, 0, 0.1 );
	color: #fff;
	padding: 10px 20px;
	border-radius: 9999px;
	font-size: 10px;
	text-transform: uppercase;
	font-weight: 800;
	letter-spacing: 0.05em;
	pointer-events: none;
	user-select: none;
	white-space: nowrap;
	backdrop-filter: blur( 2px );
	-webkit-backdrop-filter: blur( 2px );
}

/* ---- Custom marker icon ------------------------------------ */

.wme-marker-custom {
	display: block;
	cursor: pointer;
}

/* ---- Popup ------------------------------------------------- */

.maplibregl-popup-content {
	padding: 0;
	border-radius: 6px;
	overflow: hidden;
	box-shadow: 0 4px 16px rgba( 0, 0, 0, 0.15 );
}

.wme-popup {
	padding: 14px 32px 14px 16px;
	font-size: 14px;
	line-height: 1.5;
}

.wme-popup__title {
	margin: 0 0 8px;
	font-size: 15px;
	font-weight: 600;
	color: #111;
	line-height: 1.3;
}

.wme-popup__body {
	color: #444;
}

.wme-popup__body > *:last-child {
	margin-bottom: 0;
}

.wme-popup__body a:focus,
.wme-popup__body a:focus-visible {
	outline: none;
}

.wme-popup__body img {
	max-width: 100%;
	height: auto;
	display: block;
	border-radius: 3px;
}

/* Popup close button */
.maplibregl-popup-close-button {
	position: absolute !important;
	top: 6px !important;
	right: 6px !important;
	width: 18px !important;
	height: 18px !important;
	min-width: 0 !important;
	padding: 0 !important;
	border: none !important;
	border-radius: 50% !important;
	background-color: #142E26 !important;
	color: #fff !important;
	font-size: 11px !important;
	line-height: 18px !important;
	text-align: center !important;
	display: block !important;
	box-sizing: border-box !important;
	cursor: pointer !important;
}

.maplibregl-popup-close-button:hover {
	background-color: #0d1f1a !important;
}

/* ---- Drawer ------------------------------------------------- */

.wme-drawer {
	position: relative;
	flex-shrink: 0;
	width: 360px;
	display: flex;
	flex-direction: column;
	background: #E5EAD2;
	border-left: 1px solid rgba( 0, 0, 0, 0.08 );
	z-index: 10;
	overflow: hidden;
}

.wme-drawer--hidden {
	display: none;
}

.wme-drawer__header {
	padding: 14px 16px 10px;
	flex-shrink: 0;
}

.wme-drawer__header-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.wme-drawer__counts {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	color: #456B61;
	flex-wrap: nowrap;
}

.wme-drawer__sep {
	color: #bbb;
}

.wme-drawer__filter-btn {
	background: none;
	border: none;
	cursor: pointer;
	font-family: inherit !important;
	font-size: 13px !important;
	font-weight: 700;
	text-transform: uppercase;
	color: #456B61;
	padding: 0;
	white-space: nowrap;
	transition: opacity 0.15s, color 0.15s;
}

.wme-drawer__filter-btn:hover {
	color: #142E26 !important;
	background: transparent !important;
}

.wme-drawer__filter-btn--active {
	color: #142E26 !important;
	text-decoration: underline;
	text-underline-offset: 2px;
	background: transparent !important;
}

.wme-drawer__filter-btn--dim {
	opacity: 0.3;
}

.wme-drawer__filter-btn--solo {
	cursor: default;
	pointer-events: none;
}

.wme-drawer__reset {
	display: block;
	background: none !important;
	border: none;
	cursor: pointer;
	font-family: inherit !important;
	font-size: 12px !important;
	color: #456B61;
	text-decoration: underline;
	text-underline-offset: 2px;
	padding: 4px 0 0;
}

.wme-drawer__reset:hover {
	color: #142E26 !important;
}

.wme-drawer__close {
	background: none;
	border: none;
	cursor: pointer;
	font-size: 20px;
	line-height: 1;
	color: #666;
	padding: 2px 4px;
	flex-shrink: 0;
}

.wme-drawer__close:hover {
	color: #111;
}

.wme-drawer__list {
	flex: 1 1 auto;
	overflow-y: auto;
	min-height: 0; /* required: allows flex child to shrink and scroll */
	padding: 8px 16px;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.wme-drawer__item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 5px 5px;
	background: #fff;
	border-radius: 8px;
	color: inherit;
	position: relative;
	transition: background 0.15s ease;
	flex-shrink: 0;
	cursor: pointer;
}

.wme-drawer__item:hover {
	background: rgba(255,255,255,0.5);
}

.wme-drawer__item-thumb {
	width: 58px;
	height: 58px;
	flex-shrink: 0;
	border-radius: 4px;
	overflow: hidden;
	background: #ddd;
}

.wme-drawer__item-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.wme-drawer__item-thumb-placeholder {
	width: 100%;
	height: 100%;
	background: #ccc;
}

.wme-drawer__item-body {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding-right: 40px;
}

.wme-drawer__item-title {
	font-size: 14px;
	font-weight: 600;
	color: #1a1a1a;
	line-height: 1.3;
	display: block;
}

.wme-drawer__item-cta {
	font-size: 12px;
	color: #5C6735 !important;
	text-decoration: none;
	display: inline-block;
	font-family: 'Bitter', serif !important;
	font-weight: 700 !important;
}

.wme-drawer__item-cta:hover {
	text-decoration: underline;
}

.wme-drawer__item-icon {
	position: absolute;
	top: 10px;
	right: 14px;
	width: 14px;
	height: 14px;
	background-color: var( --wme-icon-color, #333 );
	-webkit-mask-image: var( --wme-icon-url );
	mask-image: var( --wme-icon-url );
	-webkit-mask-size: contain;
	mask-size: contain;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-position: center;
	mask-position: center;
}

/* Reopen toggle ---- */

.wme-drawer-toggle {
	display: none;
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 20;
	background: #fff;
	border: 1px solid rgba( 0, 0, 0, 0.15 );
	border-radius: 4px;
	width: 34px;
	height: 34px;
	cursor: pointer;
	font-size: 16px;
	line-height: 1;
	box-shadow: 0 2px 6px rgba( 0, 0, 0, 0.15 );
}

.wme-drawer-toggle--visible {
	display: flex;
	align-items: center;
	justify-content: center;
}

/* ---- Mobile drawer (< 1024px) ------------------------------ */

@media ( max-width: 1023px ) {
	.wme-drawer {
		position: absolute;
		top: 0;
		right: 0;
		bottom: 0;
		width: min( 360px, 85vw );
		z-index: 20;
		box-shadow: -4px 0 16px rgba( 0, 0, 0, 0.18 );
	}
}

/* ---- Legend ------------------------------------------------- */

.wme-legend {
	position: absolute;
	bottom: 12px;
	left: 12px;
	z-index: 10;
	background: #fff;
	border: 1px solid #000;
	border-radius: 6px;
	padding: 10px 14px;
	box-shadow: 0 2px 8px rgba( 0, 0, 0, 0.12 );
	pointer-events: none;
}

.wme-legend__title {
	display: block;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #333;
	margin-bottom: 8px;
}

.wme-legend__item {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 6px;
}

.wme-legend__icon {
	width: 20px;
	height: 20px;
	flex-shrink: 0;
	background-color: var( --wme-icon-color, #333 );
	-webkit-mask-image: var( --wme-icon-url );
	mask-image: var( --wme-icon-url );
	-webkit-mask-size: contain;
	mask-size: contain;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-position: center;
	mask-position: center;
}

.wme-legend__label {
	font-size: 13px;
	color: #333;
}
