/**
 * Interactive Geo Map — Frontend Styles
 *
 * @package InteractiveGeoMap
 */

/* ============================================================
   WRAPPER
   ============================================================ */
.igm-wrapper {
	position: relative;
	width: 100%;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* ============================================================
   MAP CONTAINER
   ============================================================ */
.igm-container {
	width: 100%;
	height: 500px;
	position: relative;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

/* ============================================================
   TOP CONTROLS
   ============================================================ */
.igm-top-controls {
	position: absolute;
	top: 10px;
	left: 10px;
	z-index: 1000;
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

/* ============================================================
   CATEGORY FILTER BUTTONS
   ============================================================ */
.igm-category-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.igm-category-btn {
	padding: 7px 14px;
	min-width: 70px;
	border: none;
	border-radius: 4px;
	color: #fff;
	font-weight: 600;
	font-size: 13px;
	cursor: pointer;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
	transition: opacity 0.25s ease, box-shadow 0.25s ease, transform 0.15s ease;
	opacity: 1;
	letter-spacing: 0.2px;
	display: flex;
	align-items: center;
	gap: 5px;
}

.igm-category-btn .igm-btn-icon {
	width: 16px;
	height: 16px;
	object-fit: contain;
	flex-shrink: 0;
}

.igm-category-btn:hover {
	box-shadow: 0 3px 8px rgba(0, 0, 0, 0.28);
	transform: translateY(-1px);
}

.igm-category-btn:focus {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.igm-category-btn.inactive {
	opacity: 0.45;
}

/* ============================================================
   LOCATION DROPDOWN
   ============================================================ */
.igm-location-dropdown select {
	padding: 8px 34px 8px 12px;
	border: 2px solid #ddd;
	border-radius: 6px;
	background: #fff;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
	min-width: 180px;
	appearance: none;
	background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23555' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
	background-repeat: no-repeat;
	background-position: right 9px center;
	background-size: 16px;
	color: #333;
}

.igm-location-dropdown select:focus {
	outline: none;
	border-color: #4A90E2;
}

/* ============================================================
   INFO BOX
   ============================================================ */
.igm-info-box {
	position: absolute;
	bottom: 20px;
	left: 20px;
	z-index: 1000;
	background: #fff;
	border-radius: 10px;
	padding: 0;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
	width: 340px;
	max-width: calc(100% - 40px);
	display: none;
	overflow: hidden;
	border: 1px solid #e0e0e0;
}

.igm-info-box.active {
	display: block;
}

/* Close button */
.igm-info-close {
	position: absolute;
	top: 8px;
	right: 8px;
	z-index: 2;
}

.igm-close-btn {
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.85);
	border: 1px solid rgba(0, 0, 0, 0.15);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	font-size: 12px;
	color: #555;
	transition: background 0.15s ease;
}

.igm-close-btn:hover {
	background: #fff;
	color: #000;
}

/* Title bar — background colour set by JS from category */
.igm-info-title {
	margin: 0;
	font-size: 16px;
	font-weight: 700;
	color: #fff;
	padding: 11px 36px 11px 14px;
	line-height: 1.35;
	background-color: #3388ff; /* default, overridden by JS */
	display: flex;
	align-items: center;
	gap: 8px;
}

.igm-info-title .igm-title-icon {
	width: 22px;
	height: 22px;
	object-fit: contain;
	flex-shrink: 0;
}

/* Body */
.igm-info-body {
	display: flex;
	gap: 12px;
	padding: 14px;
	align-items: flex-start;
}

.igm-info-content {
	flex: 1;
	font-size: 13px;
	line-height: 1.6;
	color: #555;
	min-width: 0;
	white-space: pre-wrap;
	word-break: break-word;
}

.igm-info-image {
	flex-shrink: 0;
	width: 100px;
	height: 80px;
	object-fit: cover;
	border-radius: 5px;
	border: 1px solid #e0e0e0;
}

/* Footer */
.igm-info-footer {
	padding: 0 14px 12px;
}

.igm-info-link {
	display: inline-block;
	color: #4A90E2;
	text-decoration: none;
	font-size: 13px;
	font-weight: 600;
}

.igm-info-link:hover {
	text-decoration: underline;
}

/* ============================================================
   COMPASS
   ============================================================ */
.igm-compass {
	position: absolute;
	bottom: 16px;
	right: 16px;
	z-index: 1000;
	width: 50px;
	height: 50px;
	pointer-events: none;
}

/* ============================================================
   LEAFLET OVERRIDES
   ============================================================ */
.leaflet-control-zoom {
	border-radius: 4px !important;
	overflow: hidden;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18) !important;
	border: none !important;
}

.leaflet-control-zoom a {
	background: #fff !important;
	border: none !important;
	color: #333 !important;
	width: 28px !important;
	height: 28px !important;
	line-height: 28px !important;
	font-size: 16px !important;
}

.leaflet-control-zoom a:hover {
	background: #f5f5f5 !important;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 640px) {
	.igm-top-controls {
		flex-direction: column;
		align-items: flex-start;
		gap: 5px;
	}

	.igm-category-btn {
		padding: 6px 10px;
		font-size: 12px;
		min-width: 56px;
	}

	.igm-location-dropdown select {
		min-width: 140px;
		font-size: 12px;
	}

	.igm-info-box {
		width: calc(100% - 30px);
		bottom: 10px;
		left: 15px;
	}

	.igm-info-image {
		width: 76px;
		height: 64px;
	}

	.igm-info-title {
		font-size: 14px;
	}

	.igm-compass {
		width: 40px;
		height: 40px;
		bottom: 10px;
		right: 10px;
	}
}
