#race-map {
	border: 1px solid #ccc;
	margin: 10px 0;
	display: block !important;
	visibility: visible !important;
	opacity: 1 !important;
	position: relative !important;
	min-height: 800px;
}

.race-map-controls,
.race-map-poi-legend {
	background: white;
	padding: 10px;
	border: 1px solid #ccc;
	border-radius: 3px;
	box-shadow: 0 2px 6px rgba(0,0,0,0.3);
	font-family: Arial, sans-serif;
	font-size: 14px;
}

.race-map-controls label {
	display: flex;
	align-items: center;
	margin: 5px 0;
	cursor: pointer;
	user-select: none;
}

.race-map-controls input[type="checkbox"] {
	margin-right: 8px;
	cursor: pointer;
}

.race-map-poi-legend {
	max-width: 200px;
}

.race-map-poi-legend div {
	line-height: 1.4;
}

/* Ensure map container is visible even if theme has conflicting styles */
#race-map * {
	box-sizing: border-box;
}

/* Loading state */
#race-map:empty::before {
	content: "Loading map...";
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	color: #666;
	font-size: 16px;
}

/* Station icon images sizing - Target only custom marker icons, NOT map tiles */
/* Exclude map tiles by targeting only images that are NOT from Google's tile servers */
#race-map .gm-style img:not([src*="maps.gstatic.com"]):not([src*="maps.googleapis.com"]):not([src*="khms"]):not([src*="khm"]) {
	width: 35px !important;
	height: 35px !important;
	max-width: 35px !important;
	max-height: 35px !important;
}

/* More specific targeting for custom marker icons by file type */
#race-map img[src*="icon"]:not([src*="maps.gstatic.com"]),
#race-map img[src*="marker"]:not([src*="maps.gstatic.com"]),
#race-map img[src*="station"]:not([src*="maps.gstatic.com"]) {
	width: 35px !important;
	height: 35px !important;
	max-width: 35px !important;
	max-height: 35px !important;
}

/* POI Legend Below Map - Three Column Layout */
.race-map-poi-legend-below {
	background: white;
	padding: 20px;
	margin: 20px 0;
	border: 1px solid #ccc;
	border-radius: 5px;
	box-shadow: 0 2px 6px rgba(0,0,0,0.1);
	font-family: Arial, sans-serif;
}

.poi-legend-header {
	font-size: 20px;
	font-weight: bold;
	margin-bottom: 20px;
	text-align: center;
	color: #333;
	border-bottom: 2px solid #007bff;
	padding-bottom: 10px;
}

.poi-legend-columns {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 30px;
}

.poi-column {
	background: #f9f9f9;
	padding: 15px;
	border-radius: 5px;
	border: 1px solid #e0e0e0;
}

.poi-column-title {
	font-size: 16px;
	font-weight: bold;
	margin: 0 0 15px 0;
	color: #007bff;
	border-bottom: 2px solid #007bff;
	padding-bottom: 8px;
}

.poi-item {
	display: flex;
	align-items: center;
	margin: 8px 0;
	padding: 8px;
	background: white;
	border-radius: 3px;
	transition: background-color 0.2s;
	cursor: pointer;
}

.poi-item:hover {
	background-color: #e8f4ff;
	box-shadow: 0 2px 4px rgba(0,0,0,0.1);
	transform: translateX(2px);
}

.poi-item:active {
	background-color: #d4edff;
}

.poi-icon {
	font-size: 18px;
	margin-right: 10px;
	flex-shrink: 0;
}

.poi-icon-img {
	width: 24px;
	height: 24px;
	margin-right: 10px;
	flex-shrink: 0;
	object-fit: contain;
}

.poi-title {
	font-size: 14px;
	color: #333;
	line-height: 1.4;
}

.poi-empty {
	font-size: 14px;
	color: #999;
	font-style: italic;
	padding: 10px;
	text-align: center;
}

/* Responsive design for smaller screens */
@media (max-width: 768px) {
	.poi-legend-columns {
		grid-template-columns: 1fr;
		gap: 15px;
	}
}
