/**
 * POI Styles — Airbnb-Style Icon Markers + Popup Cards
 *
 * Covers:
 *   1. DivIcon markers (white circle with category SVG icon)
 *   2. Popup card (name, type, distance)
 *
 * All rules scoped under plugin-specific class prefixes to avoid
 * theme conflicts. Uses !important where needed to override
 * Leaflet defaults and theme resets.
 *
 * @since 1.6.0
 */

/* =====================================================================
 * 1. DivIcon Markers — White circle with SVG icon
 * =================================================================== */

/* Reset the Leaflet DivIcon wrapper (Leaflet adds .leaflet-div-icon) */
.cwp-poi-icon-marker {
	background: none !important;
	border: none !important;
}

/* The inner icon circle */
.cwp-poi-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 2px 6px rgba( 0, 0, 0, 0.25 );
	transition: transform 0.15s ease, box-shadow 0.15s ease;
	cursor: pointer;
}

.cwp-poi-icon svg {
	width: 16px;
	height: 16px;
	flex-shrink: 0;
}

/* Hover: lift + grow */
.cwp-poi-icon:hover {
	transform: scale( 1.15 );
	box-shadow: 0 4px 12px rgba( 0, 0, 0, 0.3 );
}

/* =====================================================================
 * 2. Popup Card — Shown on marker click
 * =================================================================== */

/* Override Leaflet popup wrapper */
.cwp-poi-popup .leaflet-popup-content-wrapper {
	padding: 0 !important;
	border-radius: 12px !important;
	box-shadow: 0 4px 16px rgba( 0, 0, 0, 0.16 ) !important;
	overflow: hidden !important;
}

.cwp-poi-popup .leaflet-popup-content {
	margin: 0 !important;
	line-height: 1.4 !important;
	font-family: var(--cwp-font-body, sans-serif) !important;
}

.cwp-poi-popup .leaflet-popup-tip {
	box-shadow: 0 4px 16px rgba( 0, 0, 0, 0.16 ) !important;
}

/* Close button */
.cwp-poi-popup .leaflet-popup-close-button {
	top: 6px !important;
	right: 6px !important;
	width: 22px !important;
	height: 22px !important;
	font-size: 16px !important;
	line-height: 22px !important;
	color: #717171 !important;
	text-align: center !important;
	padding: 0 !important;
}

.cwp-poi-popup .leaflet-popup-close-button:hover {
	color: #222 !important;
}

/* Card layout */
.cwp-poi-card {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 14px;
	min-width: 0;
}

/* Category icon circle inside the card */
.cwp-poi-card__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	min-width: 36px;
	border-radius: 50%;
	color: #fff;
}

.cwp-poi-card__icon svg {
	width: 16px;
	height: 16px;
	stroke: #fff;
}

/* Card body */
.cwp-poi-card__body {
	flex: 1;
	min-width: 0;
}

/* POI name */
.cwp-poi-card__name {
	font-size: 14px;
	font-weight: 600;
	color: #222;
	line-height: 1.3;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	padding-right: 12px; /* Space for close button */
}

/* Meta line: type + distance */
.cwp-poi-card__meta {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-top: 2px;
	font-size: 12.5px;
	color: #717171;
	line-height: 1.4;
}

.cwp-poi-card__type {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	min-width: 0;
}

.cwp-poi-card__sep {
	flex-shrink: 0;
	color: #b0b0b0;
}

.cwp-poi-card__distance {
	flex-shrink: 0;
	white-space: nowrap;
}
