/**
 * Events Map Widget Styles
 *
 * Marker accent is driven by a CSS variable on each marker element:
 *   --ecom-map-marker (default red, set via Elementor Marker Color control)
 */

 .ecom-events-map-widget {
	--_ecom-border: #e5e7eb;
	--_ecom-muted: #64748b;
	--_ecom-text: #0f172a;
	--_ecom-subtle-bg: #f8fafc;
	font-family: inherit;
	color: var(--_ecom-text);
}

/* ═══════════════════════════════════════════════════════════════════════
   TOOLBAR
   ═══════════════════════════════════════════════════════════════════════ */

.ecom-map-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	flex-wrap: wrap;
	padding: 16px 4px;
	margin-bottom: 12px;
}

.ecom-map-toolbar.ecom-el-toolbar {
	margin-bottom: 12px;
}

.ecom-map-filters {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

.ecom-el-dropdown-wrap { position: relative; }
.ecom-el-dropdown-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 10px 20px;
	border: 1px solid #d5d7da;
	border-radius: 9999px;
	background: #fff;
	font-size: 14px;
	color: #414651;
	cursor: pointer;
	touch-action: manipulation;
	box-shadow: 0px 1px 0.5px 0.05px rgba(24, 24, 27, 0.04);
	transition: border-color .15s, box-shadow .15s;
	white-space: nowrap;
}
.ecom-el-dropdown-btn:hover { border-color: #bbbfc7; box-shadow: 0 1px 3px rgba(24, 24, 27, 0.08); }
.ecom-el-dropdown-btn .ecom-chevron { width: 20px; height: 20px; flex-shrink: 0; color: #667085; transition: transform .15s; }
.ecom-el-dropdown-btn[aria-expanded="true"] .ecom-chevron { transform: rotate(180deg); }

.ecom-el-dropdown-list {
	position: absolute;
	top: calc(100% + 4px);
	right: 0;
	min-width: 200px;
	max-height: 320px;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	background: #fff;
	border: 1px solid var(--_ecom-border);
	border-radius: 10px;
	box-shadow: 0 10px 32px rgba(15, 23, 42, .08);
	list-style: none;
	margin: 0;
	padding: 6px;
	display: none;
	z-index: 20;
}
.ecom-el-dropdown-list.is-open { display: block; }
.ecom-el-dropdown-item {
	padding: 10px 12px;
	border-radius: 6px;
	font-size: 14px;
	cursor: pointer;
	color: var(--_ecom-text);
}
.ecom-el-dropdown-item:hover { background: var(--_ecom-subtle-bg); }
.ecom-el-dropdown-item.is-selected {
	background: #eef2ff;
	color: #6366f1;
	font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════════════════
   MAP CONTAINER
   ═══════════════════════════════════════════════════════════════════════ */

.ecom-map-wrap {
	position: relative;
	border-radius: 16px;
	overflow: hidden;
	border: 1px solid #eef0f3;
	box-shadow: 0 1px 2px rgba(15, 23, 42, .02), 0 8px 24px rgba(15, 23, 42, .04);
}

.ecom-map-canvas {
	width: 100%;
	height: 600px;
	min-height: 400px;
	background: var(--_ecom-subtle-bg);
	display: block;
}

/* Loading / empty / error overlay */
.ecom-map-status {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(255, 255, 255, .85);
	color: var(--_ecom-muted);
	font-size: 14px;
	z-index: 10;
	pointer-events: none;
}
.ecom-map-status--error {
	background: rgba(254, 242, 242, .95);
	color: #991b1b;
}
.ecom-map-status--empty {
	background: rgba(255, 255, 255, .9);
}

/* ═══════════════════════════════════════════════════════════════════════
   MARKER (red pin with glyph, matches the screenshot)
   ═══════════════════════════════════════════════════════════════════════ */

.ecom-map-marker {
	--ecom-map-marker: #ef4444;
	position: relative;
	width: 32px;
	height: 32px;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	transform: translateY(0);
	cursor: pointer;
	transition: transform .15s;
}
.ecom-map-marker:hover,
.ecom-map-marker.is-active {
	transform: translateY(-4px);
}
/* Pin shape — SVG-like teardrop via CSS */
.ecom-map-marker::before {
	content: '';
	position: absolute;
	inset: 0;
	background: var(--ecom-map-marker);
	border-radius: 50% 50% 50% 0;
	transform: rotate(-45deg);
	box-shadow: 0 2px 6px rgba(0, 0, 0, .25);
	border: 2px solid #fff;
}
/* Glyph (icon) sits on top, counter-rotated to stay upright */
.ecom-map-marker-glyph {
	position: relative;
	z-index: 1;
	margin-top: 6px;
	color: #fff;
	font-size: 14px;
	width: 14px;
	height: 14px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.ecom-map-marker-glyph svg,
.ecom-map-marker-glyph i {
	width: 14px;
	height: 14px;
	font-size: 14px;
	color: #fff;
}

/* ═══════════════════════════════════════════════════════════════════════
   POPUP — wraps the shared event card
   ═══════════════════════════════════════════════════════════════════════ */

.ecom-map-popup {
	position: relative;
	width: min( 592px, calc( 100vw - 32px ) );
	transform: translate( -50%, calc( -100% - 40px ) );
	background: transparent;
	box-shadow: none;
	padding: 0;
	pointer-events: auto;
}

.ecom-map-popup::after {
	content: '';
	position: absolute;
	bottom: -8px;
	left: 50%;
	transform: translateX( -50% );
	width: 0;
	height: 0;
	border-left: 8px solid transparent;
	border-right: 8px solid transparent;
	border-top: 8px solid #fff;
	filter: drop-shadow( 0 2px 2px rgba( 15, 23, 42, 0.08 ) );
}

.ecom-map-popup-close {
	position: absolute;
	z-index: 2;
	background: rgba( 255, 255, 255, 0.92 ) !important;
	border: 0;
	font-size: 18px !important;
	line-height: 1;
	color: var( --_ecom-muted );
	cursor: pointer;
	padding: 4px 8px;
	border-radius: 999px;
	box-shadow: 0 2px 8px rgba( 15, 23, 42, 0.12 );
	padding: 0px !important;
    font-size: 27px !important;
    line-height: normal !important;
    top: -20px;
    right: -20px;
	width: 38px !important;
	height: 38px !important;
	display: flex;
    align-items: center;
    justify-content: center;
}

.ecom-map-popup-close:hover {
	background: #fff;
	color: var( --_ecom-text );
}

.ecom-map-popup-card {
	position: relative;
	line-height: 0;
}

.ecom-map-popup-card .ecom-el-card {
	margin: 0;
	line-height: normal;
	box-shadow: 0 16px 48px rgba( 15, 23, 42, 0.18 );
}

.ecom-map-popup-card .ecom-el-meta-icon {
	font-size: 14px !important;
	width: 14px !important;
	height: 14px !important;
}

.ecom-map-popup-card .ecom-el-meta-icon--el svg {
	width: 14px !important;
	height: 14px !important;
}

/* ═══════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
	.ecom-map-toolbar { gap: 12px; }
	.ecom-map-canvas { height: 480px; }
	.ecom-map-popup {
		width: min( 343px, calc( 100vw - 24px ) );
	}

	.ecom-map-popup-card .ecom-el-card {
		box-shadow: 0 0 60px rgba( 0, 0, 0, 0.08 );
	}

	.ecom-map-popup-card .ecom-el-meta-icon {
		font-size: 16px !important;
		width: 16px !important;
		height: 16px !important;
	}

	.ecom-map-popup-card .ecom-el-meta-icon--el svg {
		width: 16px !important;
		height: 16px !important;
	}
}