/**
 * Business Directory - Map Popup Styles
 * Premium wine country design - single source of truth
 *
 * @package BusinessDirectory
 * @since 1.0.0
 */

/* ==========================================================================
	BASE POPUP STYLES
	========================================================================== */

.leaflet-popup-content-wrapper {
	padding: 0 !important;
	border-radius: 12px !important;
	box-shadow: 0 4px 20px rgba(15, 42, 67, 0.15) !important;
	overflow: hidden !important;
	background: white !important;
	border: none !important;
}

.leaflet-popup-content {
	margin: 0 !important;
	width: auto !important;
}

.leaflet-popup-tip {
	background: white !important;
	box-shadow: none !important;
}

.leaflet-popup-close-button {
	color: #94a3b8 !important;
	font-size: 20px !important;
	font-weight: 400 !important;
	width: 28px !important;
	height: 28px !important;
	line-height: 26px !important;
	right: 8px !important;
	top: 8px !important;
	z-index: 10 !important;
	transition: color 0.2s ease !important;
}

.leaflet-popup-close-button:hover {
	color: #0F2A43 !important;
	background: transparent !important;
}

/* ==========================================================================
	PREMIUM MINIMAL POPUP
	========================================================================== */

a.bd-popup {
	display: block;
	text-decoration: none !important;
	color: inherit !important;
	min-width: 220px;
	max-width: 280px;
	transition: all 0.2s ease;
	cursor: pointer;
	position: relative;
}

/* Teal accent bar */
.bd-popup-accent {
	height: 4px;
	background: linear-gradient(90deg, #2CB1BC 0%, #239AA3 50%, #2CB1BC 100%);
}

/* Content wrapper */
.bd-popup-inner {
	padding: 14px 16px 16px;
}

/* Hover state - teal glow */
a.bd-popup:hover {
	box-shadow: 0 0 0 3px rgba(44, 177, 188, 0.15);
}

a.bd-popup:hover .bd-popup-accent {
	background: linear-gradient(90deg, #239AA3 0%, #2CB1BC 50%, #239AA3 100%);
}

a.bd-popup:hover .bd-popup-arrow {
	color: #2CB1BC;
	transform: translateX(3px);
}

/* Row 1: Header - Title + Arrow */
.bd-popup-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 12px;
	margin-bottom: 8px;
}

.bd-popup .bd-popup-title {
	font-size: 15px !important;
	font-weight: 700 !important;
	color: #0F2A43 !important;
	line-height: 1.35 !important;
	flex: 1;
	margin: 0 !important;
	padding: 0 !important;
	border: none !important;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
}

.bd-popup-arrow {
	color: #c9d6df;
	font-size: 12px;
	flex-shrink: 0;
	margin-top: 3px;
	transition: all 0.2s ease;
}

/* Row 2: Stars + Reviews + Price */
.bd-popup-ratings {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-bottom: 10px;
	flex-wrap: wrap;
}

.bd-popup-stars {
	display: inline-flex;
	align-items: center;
	gap: 2px;
}

.bd-popup-stars i {
	font-size: 12px;
	color: #f59e0b;
}

.bd-popup-stars i.far {
	color: #e2e8f0;
}

.bd-popup-rating-num {
	font-size: 13px;
	font-weight: 600;
	color: #0F2A43;
	margin-left: 4px;
}

.bd-popup-reviews {
	font-size: 12px;
	color: #64748b;
	font-weight: 500;
}

.bd-popup-first-review {
	font-size: 12px;
	color: #2CB1BC;
	font-weight: 600;
	display: inline-flex;
	align-items: center;
	gap: 5px;
}

.bd-popup-first-review i {
	font-size: 11px;
	color: #f59e0b;
}

.bd-popup-price {
	font-size: 13px;
	font-weight: 700;
	color: #059669;
	margin-left: auto;
	letter-spacing: -0.5px;
}

/* Row 3: Category + Tag/Distance */
.bd-popup-tags {
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: 12px;
	color: #64748b;
}

.bd-popup-cat,
.bd-popup-tag,
.bd-popup-dist {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	white-space: nowrap;
}

.bd-popup-cat i {
	color: #0F2A43;
	font-size: 10px;
}

.bd-popup-tag i {
	color: #2CB1BC;
	font-size: 10px;
}

.bd-popup-dist i {
	color: #829AB1;
	font-size: 10px;
}

.bd-popup-cat {
	font-weight: 600;
	color: #0F2A43;
}

.bd-popup-tag {
	color: #2CB1BC;
	font-weight: 500;
}

/* ==========================================================================
	DETAILED POPUP (Optional - add .bd-popup-detailed to body)
	========================================================================== */

.bd-popup-detailed .leaflet-popup-content-wrapper {
	min-width: 280px !important;
	max-width: 340px !important;
	border-radius: 16px !important;
	box-shadow: 0 12px 40px rgba(15, 42, 67, 0.2) !important;
}

.bd-popup-detailed .leaflet-popup-content-wrapper::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 4px;
	background: linear-gradient(90deg, #2CB1BC 0%, #829AB1 50%, #2CB1BC 100%);
	z-index: 1;
}

.bd-popup-detailed .leaflet-popup-content {
	padding: 20px !important;
}

.bd-popup-detailed .bd-popup-content {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.bd-popup-detailed .bd-popup-title {
	font-size: 18px !important;
	font-weight: 700 !important;
	color: #0F2A43 !important;
	margin: 0 0 8px 0 !important;
	padding-bottom: 10px !important;
	border-bottom: 2px solid rgba(44, 177, 188, 0.2) !important;
	line-height: 1.3 !important;
}

.bd-popup-detailed .bd-popup-title a {
	color: #0F2A43 !important;
	text-decoration: none !important;
}

.bd-popup-detailed .bd-popup-title a:hover {
	color: #133453 !important;
}

.bd-popup-detailed .bd-popup-meta {
	display: flex;
	gap: 16px;
	align-items: center;
	padding: 8px 0;
}

.bd-popup-detailed .bd-popup-rating {
	display: flex !important;
	align-items: center !important;
	gap: 6px !important;
	font-size: 15px !important;
	font-weight: 600 !important;
	color: #2CB1BC !important;
}

.bd-popup-detailed .bd-popup-categories {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 14px;
	background: rgba(15, 42, 67, 0.05);
	border-radius: 8px;
	font-size: 13px;
	color: #0F2A43;
	font-weight: 500;
}

.bd-popup-detailed .bd-popup-distance {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	color: #64748b;
}

.bd-popup-detailed .bd-popup-cta {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 8px !important;
	padding: 12px 20px !important;
	background: linear-gradient(135deg, #0F2A43 0%, #133453 100%) !important;
	color: white !important;
	text-decoration: none !important;
	border-radius: 8px !important;
	font-weight: 600 !important;
	font-size: 14px !important;
	border: 2px solid #2CB1BC !important;
	transition: all 0.2s ease !important;
	margin-top: 4px !important;
}

.bd-popup-detailed .bd-popup-cta:hover {
	background: linear-gradient(135deg, #133453 0%, #0F2A43 100%) !important;
	transform: translateY(-1px) !important;
	box-shadow: 0 4px 12px rgba(44, 177, 188, 0.3) !important;
}

.bd-popup-detailed .leaflet-popup-close-button {
	font-size: 24px !important;
	width: 32px !important;
	height: 32px !important;
	right: 10px !important;
	top: 10px !important;
}

/* ==========================================================================
	RESPONSIVE
	========================================================================== */

@media (max-width: 480px) {
	a.bd-popup {
		min-width: 200px;
		max-width: 260px;
	}

	.bd-popup .bd-popup-title {
		font-size: 14px !important;
	}

	.bd-popup-inner {
		padding: 12px 14px 14px;
	}

	.bd-popup-detailed .leaflet-popup-content-wrapper {
		min-width: 260px !important;
		max-width: 300px !important;
	}

	.bd-popup-detailed .bd-popup-title {
		font-size: 16px !important;
	}
}
