/**
 * OriMap Map Styles
 *
 * Styles for Leaflet markers, clusters, popups, and search dropdown.
 * Works alongside the child theme's style.css (which handles the
 * page layout, panel, chips, etc.).
 */

/* ==========================================================================
   Custom Pin Markers
   ========================================================================== */

.orimap-pin-container {
	background: transparent !important;
	border: none !important;
}

.orimap-pin {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 50% 50% 50% 0;
	transform: rotate(-45deg);
	font-size: 16px;
	line-height: 1;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
	transition: transform 0.15s ease;
}

.leaflet-marker-icon:hover .orimap-pin {
	transform: rotate(-45deg) scale(1.15);
}

/* ==========================================================================
   Cluster Markers
   ========================================================================== */

.orimap-cluster-container {
	background: transparent !important;
	border: none !important;
}

.orimap-cluster {
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	color: #fff;
	font-family: 'DM Sans', system-ui, sans-serif;
	font-weight: 700;
	font-size: 14px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
	opacity: 0.9;
	transition: transform 0.15s ease, opacity 0.15s ease;
	cursor: pointer;
}

.orimap-cluster:hover {
	transform: scale(1.1);
	opacity: 1;
}

/* ==========================================================================
   Popups
   ========================================================================== */

.orimap-popup .leaflet-popup-content-wrapper {
	border-radius: 14px;
	padding: 0;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.orimap-popup .leaflet-popup-content {
	margin: 0;
	padding: 16px;
	font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
	font-size: 14px;
	line-height: 1.5;
	color: #1C1917;
}

.orimap-popup .leaflet-popup-tip {
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.orimap-popup__content strong {
	font-family: 'DM Sans', system-ui, sans-serif;
	font-size: 15px;
	font-weight: 700;
	color: #1C1917;
}

.orimap-popup__location {
	color: #78716C;
	font-size: 13px;
}

.orimap-popup__link {
	display: inline-block;
	margin-top: 8px;
	color: #7C3AED;
	font-weight: 600;
	font-size: 13px;
	text-decoration: none;
}

.orimap-popup__link:hover {
	color: #5B21B6;
	text-decoration: underline;
}

/* Small badge inside popup */
.orimap-badge--small {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 10px;
	font-size: 11px;
	font-weight: 600;
	background: #EDE9FE;
	color: #5B21B6;
	margin-top: 4px;
}

/* ==========================================================================
   Search Dropdown (autocomplete results)
   ========================================================================== */

.orimap-search-dropdown {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	margin-top: 4px;
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
	z-index: 1001;
	overflow: hidden;
	display: none;
}

.orimap-search-dropdown__item {
	display: block;
	width: 100%;
	padding: 10px 16px;
	border: none;
	background: none;
	text-align: left;
	cursor: pointer;
	font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
	font-size: 14px;
	color: #1C1917;
	transition: background 0.1s ease;
}

.orimap-search-dropdown__item:hover,
.orimap-search-dropdown__item:focus {
	background: #F5F3FF;
}

.orimap-search-dropdown__item strong {
	display: block;
	font-weight: 600;
	font-size: 14px;
}

.orimap-search-dropdown__item span {
	display: block;
	font-size: 12px;
	color: #78716C;
	margin-top: 2px;
}

.orimap-search-dropdown__empty {
	padding: 12px 16px;
	color: #78716C;
	font-size: 13px;
	text-align: center;
}

/* ==========================================================================
   Panel Cards (result detail)
   ========================================================================== */

.orimap-result-card {
	padding: 16px;
	border-radius: 14px;
	border: 1px solid #E7E5E4;
	background: #fff;
}

.orimap-result-card--active {
	border-color: #7C3AED;
	border-width: 3px;
	padding: 10px 14px; /* compensate 2px extra border to avoid layout shift */
	box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}

.orimap-result-card__title {
	font-family: 'DM Sans', system-ui, sans-serif;
	font-size: 16px;
	font-weight: 700;
	color: #1C1917;
	margin: 0 0 8px 0;
}

.orimap-result-card__meta {
	font-size: 13px;
	color: #78716C;
	margin: 0 0 8px 0;
}

.orimap-result-card__stat {
	font-size: 13px;
	font-weight: 600;
	color: #7C3AED;
	margin: 4px 0;
}

.orimap-result-card__stat--accent {
	color: #F97316;
}

.orimap-result-card__excerpt {
	font-size: 13px;
	color: #78716C;
	margin: 8px 0;
	line-height: 1.5;
}

.orimap-btn--sm {
	display: inline-block;
	margin-top: 8px;
	padding: 6px 14px;
	font-size: 13px;
}

/* ==========================================================================
   Panel Loading / Error States
   ========================================================================== */

.orimap-panel__loading {
	padding: 24px;
	text-align: center;
	color: #78716C;
	font-size: 14px;
}

.orimap-panel__error {
	padding: 16px;
	color: #FB7185;
	font-size: 13px;
	text-align: center;
}

.orimap-panel__hint {
	padding: 16px;
	color: #78716C;
	font-size: 13px;
	text-align: center;
	line-height: 1.5;
}

/* Panel card list: clickable, compact, scrollable */
.orimap-result-card {
	padding: 12px 16px;
	border-radius: 10px;
	background: #fff;
	margin-bottom: 12px;
	cursor: pointer;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.orimap-result-card:hover {
	border-color: #D8B4FE;
	box-shadow: 0 2px 8px rgba(124, 58, 237, 0.08);
}

.orimap-result-card__link {
	display: inline-block;
	margin-top: 6px;
	color: #7C3AED;
	font-weight: 600;
	font-size: 13px;
	text-decoration: none;
}

.orimap-result-card__link:hover {
	color: #5B21B6;
	text-decoration: underline;
}

/* ==========================================================================
   Leaflet Overrides
   ========================================================================== */

/* Remove default Leaflet border on markers */
.leaflet-marker-icon {
	border: none !important;
	background: none !important;
}

/* Smoother zoom animation */
.leaflet-zoom-anim .leaflet-zoom-animated {
	transition: transform 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
}
