/* RTKSA Coverage Map Widget — default styles.
   Dark theme (default) matches a network-operator-style map: dark
   unlabelled basemap, bold uppercase country labels, smaller city labels,
   and pulsing green "live" markers — built entirely from the site owner's
   own coverage data (never a third-party network's data or branding). */

.rtksa-ew-coverage-map { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; width: 100%; box-sizing: border-box; overflow-x: hidden; }
.rtksa-ew-coverage-map *, .rtksa-ew-coverage-map *::before, .rtksa-ew-coverage-map *::after { box-sizing: border-box; }

.rtksa-ew-map-card {
	border: 1px solid #DDE2E9;
	border-radius: 20px;
	overflow: hidden;
	box-shadow: 0 10px 30px rgba(6,26,51,.08);
}
.rtksa-ew-theme-dark .rtksa-ew-map-card { border-color: #1A2436; box-shadow: 0 20px 50px rgba(0,0,0,.35); }

.rtksa-ew-map-canvas { width: 100%; height: 520px; background: #EEF3F8; }
.rtksa-ew-theme-dark .rtksa-ew-map-canvas { background: #0B1220; }

/* Country/city text labels drawn on the map (not baked into tiles) */
.rtksa-ew-map-label-wrap { background: none !important; border: none !important; }
.rtksa-ew-map-label {
	display: inline-block;
	font-weight: 800;
	letter-spacing: .08em;
	white-space: nowrap;
	text-shadow: 0 1px 3px rgba(0,0,0,.6);
	pointer-events: none;
	transform: translate(-50%, -50%);
	position: relative;
	left: 50%;
	top: 50%;
}
.rtksa-ew-map-label.is-country { text-transform: uppercase; }
.rtksa-ew-map-label.is-city { font-weight: 600; letter-spacing: .02em; opacity: .92; }

/* Leaflet popups, restyled to match RTKSA brand rather than default Leaflet look */
.rtksa-ew-popup .leaflet-popup-content-wrapper { border-radius: 12px; box-shadow: 0 8px 24px rgba(6,26,51,.18); }
.rtksa-ew-popup .leaflet-popup-content { margin: 12px 16px; font-family: inherit; }
.rtksa-ew-popup-title { font-weight: 800; font-size: 14px; color: #14181F; display: block; margin-bottom: 2px; }
.rtksa-ew-popup-status { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 99px; margin: 4px 0; }
.rtksa-ew-popup-status--active { background: rgba(19,185,120,.15); color: #0E9E64; }
.rtksa-ew-popup-status--planned { background: rgba(91,100,114,.12); color: #5B6472; }
.rtksa-ew-popup-extra { font-size: 12px; color: #5B6472; margin: 4px 0 0; }

.rtksa-ew-popup--dark .leaflet-popup-content-wrapper,
.rtksa-ew-popup--dark .leaflet-popup-tip { background: #0F1B2E; color: #fff; }
.rtksa-ew-popup--dark .rtksa-ew-popup-title { color: #fff; }
.rtksa-ew-popup--dark .rtksa-ew-popup-extra { color: #B7C0CE; }

/* Custom marker dots (rendered as divIcon, not Leaflet's default pin) */
.rtksa-ew-marker-wrap { position: relative; display: block; width: 16px; height: 16px; }
.rtksa-ew-marker-dot {
	position: relative; z-index: 2;
	display: block; width: 16px; height: 16px; border-radius: 50%;
	border: 3px solid #fff; box-shadow: 0 2px 6px rgba(6,26,51,.35);
}
.rtksa-ew-theme-dark .rtksa-ew-marker-dot { border-color: #0B1220; box-shadow: 0 0 8px rgba(19,185,120,.6); }
.rtksa-ew-marker-pulse {
	position: absolute; z-index: 1;
	top: 50%; left: 50%;
	width: 16px; height: 16px; border-radius: 50%;
	transform: translate(-50%, -50%);
	opacity: .55;
	animation: rtksa-ew-marker-ping 2.2s cubic-bezier(0,0,.2,1) infinite;
	pointer-events: none;
}
@keyframes rtksa-ew-marker-ping {
	0%   { transform: translate(-50%, -50%) scale(1);   opacity: .55; }
	70%  { transform: translate(-50%, -50%) scale(2.8); opacity: 0; }
	100% { transform: translate(-50%, -50%) scale(2.8); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
	.rtksa-ew-marker-pulse { animation: none; opacity: .25; }
}

/* Legend */
.rtksa-ew-legend { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; margin-top: 18px; padding: 0 4px; }
.rtksa-ew-legend-item { display: inline-flex; align-items: center; gap: 8px; }
.rtksa-ew-legend-item span:last-child { font-size: 13px; }
.rtksa-ew-legend-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.rtksa-ew-legend-dot--active { background: #13B978; }
.rtksa-ew-legend-dot--planned { background: #C7CDD6; }
.rtksa-ew-legend-dot--zone { background: rgba(15,85,168,.15); border: 1.5px solid #0F55A8; width: 13px; height: 13px; }

.rtksa-ew-map-canvas .leaflet-control-attribution { font-size: 10px; }
.rtksa-ew-theme-dark .leaflet-control-attribution { background: rgba(11,18,32,.7) !important; color: #B7C0CE !important; }
.rtksa-ew-theme-dark .leaflet-control-attribution a { color: #fff !important; }
.rtksa-ew-theme-dark .leaflet-control-zoom a { background: #0F1B2E !important; color: #fff !important; border-color: #1A2436 !important; }

/* --- Custom controls (fullscreen / stats / locate) --- */
.rtksa-ew-ctrl { margin: 10px 0 0 10px !important; }
.rtksa-ew-ctrl-btn {
	display: flex !important; align-items: center; justify-content: center;
	width: 30px; height: 30px;
	background: #fff; color: #14181F;
	text-decoration: none; cursor: pointer;
}
.rtksa-ew-theme-dark .rtksa-ew-ctrl-btn { background: #0F1B2E; color: #fff; }
.rtksa-ew-ctrl-btn:hover { background: #F6F8FA; }
.rtksa-ew-theme-dark .rtksa-ew-ctrl-btn:hover { background: #17233A; }
.rtksa-ew-ctrl-btn.is-loading { opacity: .5; pointer-events: none; }

.rtksa-ew-ctrl-stats-wrap { position: relative; }
.rtksa-ew-stats-panel {
	display: none; position: absolute; top: 0; left: 38px;
	background: #0F1B2E; color: #fff; border-radius: 8px; padding: 10px 14px;
	min-width: 170px; box-shadow: 0 8px 24px rgba(0,0,0,.35); font-size: 12px;
	white-space: nowrap;
}
.rtksa-ew-theme-light .rtksa-ew-stats-panel { background: #fff; color: #14181F; box-shadow: 0 8px 24px rgba(6,26,51,.18); }
.rtksa-ew-stats-panel.is-open { display: block; }
.rtksa-ew-stats-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.rtksa-ew-stats-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }

/* --- Search box (top-right, GEODNET-style) --- */
.rtksa-ew-search-wrap {
	position: relative;
	display: flex; align-items: center; gap: 8px;
	background: rgba(255,255,255,.95);
	border-radius: 8px; padding: 7px 12px;
	width: 220px; box-shadow: 0 2px 10px rgba(0,0,0,.15);
}
.rtksa-ew-theme-dark .rtksa-ew-search-wrap { background: rgba(15,27,46,.92); }
.rtksa-ew-search-icon { display: flex; color: #8B93A1; flex-shrink: 0; }
.rtksa-ew-theme-dark .rtksa-ew-search-icon { color: #7C8797; }
.rtksa-ew-search-input {
	border: none; outline: none; background: none; width: 100%;
	font-size: 13px; color: #14181F;
}
.rtksa-ew-theme-dark .rtksa-ew-search-input { color: #fff; }
.rtksa-ew-search-input::placeholder { color: #A2A9B4; }
.rtksa-ew-search-results {
	display: none; position: absolute; top: calc(100% + 6px); left: 0; right: 0;
	background: #fff; border-radius: 8px; box-shadow: 0 8px 24px rgba(6,26,51,.18);
	overflow: hidden; max-height: 220px; overflow-y: auto;
}
.rtksa-ew-theme-dark .rtksa-ew-search-results { background: #0F1B2E; box-shadow: 0 8px 24px rgba(0,0,0,.4); }
.rtksa-ew-search-results.is-open { display: block; }
.rtksa-ew-search-result { padding: 9px 14px; font-size: 13px; color: #14181F; cursor: pointer; }
.rtksa-ew-theme-dark .rtksa-ew-search-result { color: #fff; }
.rtksa-ew-search-result:hover { background: #F6F8FA; }
.rtksa-ew-theme-dark .rtksa-ew-search-result:hover { background: #17233A; }
.rtksa-ew-search-empty { padding: 9px 14px; font-size: 12px; color: #8B93A1; }

.rtksa-ew-ctrl-locate { margin-top: 8px !important; }

/* --- Floating legend panel (bottom-right, "Coverage" box) --- */
.rtksa-ew-legend-overlay {
	background: rgba(255,255,255,.95);
	border-radius: 10px; padding: 12px 16px;
	box-shadow: 0 4px 16px rgba(0,0,0,.15);
	font-size: 12px; margin: 0 10px 10px 0;
	min-width: 150px;
}
.rtksa-ew-theme-dark .rtksa-ew-legend-overlay { background: rgba(15,27,46,.92); }
.rtksa-ew-legend-overlay-title { font-weight: 800; font-size: 12px; color: #14181F; margin-bottom: 8px; }
.rtksa-ew-theme-dark .rtksa-ew-legend-overlay-title { color: #fff; }
.rtksa-ew-legend-overlay-row { display: flex; align-items: center; gap: 8px; padding: 3px 0; color: #3A4250; }
.rtksa-ew-theme-dark .rtksa-ew-legend-overlay-row { color: #D3D9E2; }
