/*============================================================
CE Tech - Cobertura (mapa SVG animado de cidades atendidas)
Shortcode [cetech_cobertura] - Mapa de Sao Paulo (somente SP)
com pins animados nas cidades atendidas e lista lateral de cidades.
Identidade visual: azul (#2020EE) e verde/turquesa (#00E8A8).
Prefixos: .cetech-cobertura / .cetech-svg
============================================================*/
.cetech-cobertura {
	margin: 24px 0;
}

/* ---------- Mapa SVG ---------- */
.cetech-cobertura__map-svg {
	position: relative;
	border-radius: 18px;
	overflow: hidden;
	border: 1px solid #e2e8f0;
	background: linear-gradient(165deg, #f8fafc 0%, #eef3f7 100%);
	box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

.cetech-cobertura__map-svg svg {
	display: block;
	width: 100%;
	height: auto;
	cursor: default;
}

/* ---------- Layout duas colunas (mapa | lista) ---------- */
.cetech-cobertura__layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 340px;
	gap: 16px;
	align-items: stretch;
}

/* ---------- Lista de cidades ---------- */
.cetech-cobertura__list {
	display: flex;
	flex-direction: column;
	border: 1px solid #e2e8f0;
	border-radius: 18px;
	background: #fff;
	box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
	overflow: hidden;
}

.cetech-cobertura__list-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 12px 16px;
	border-bottom: 1px solid #e8e8f0;
	background: #f8f9ff;
}

.cetech-cobertura__list-title {
	font-size: 14px;
	font-weight: 800;
	letter-spacing: 0.02em;
	color: #1a1a2e;
	text-transform: uppercase;
}

.cetech-cobertura__list-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 26px;
	height: 24px;
	padding: 0 9px;
	border-radius: 999px;
	background: #2020EE;
	color: #fff;
	font-size: 12px;
	font-weight: 800;
}

.cetech-cobertura__list ul {
	list-style: none;
	margin: 0;
	padding: 8px;
	flex: 1;
	overflow-y: auto;
	max-height: 560px;
}

.cetech-cobertura__list li {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 9px 10px;
	border-radius: 10px;
	cursor: pointer;
	font-size: 14px;
	line-height: 1.35;
	color: #1a1a2e;
	transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.cetech-cobertura__list li:hover {
	background: #f4f5ff;
}

.cetech-cobertura__list li.is-active {
	background: rgba(32, 32, 238, 0.07);
	color: var(--cetech-pin, #2020ee);
	font-weight: 700;
}

.cetech-cobertura__list li.is-hidden {
	display: none;
}

.cetech-cobertura__list-dot {
	flex: none;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--cetech-pin, #2020ee);
	opacity: 0.45;
	transition: opacity 0.15s ease, transform 0.15s ease;
}

.cetech-cobertura__list li.is-active .cetech-cobertura__list-dot {
	opacity: 1;
	transform: scale(1.3);
}

.cetech-cobertura__list-name {
	flex: 1;
}

.cetech-cobertura__list-uf {
	flex: none;
	padding: 2px 8px;
	border-radius: 999px;
	background: #f1f3f9;
	color: #64748b;
	font-size: 11px;
	font-weight: 700;
}

/* ---------- Chip "SP - N cidades" ---------- */
.cetech-cobertura__chip {
	position: absolute;
	z-index: 2;
	top: 14px;
	left: 14px;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 14px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.92);
	box-shadow: 0 8px 20px rgba(15, 23, 42, 0.14);
	font-size: 13px;
	font-weight: 700;
	color: #0f172a;
	pointer-events: none;
}

.cetech-cobertura__chip strong {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: #2020EE;
	color: #fff;
	font-size: 12px;
}

.cetech-cobertura__chip span {
	color: #64748b;
}

/* ---------- Divisas municipais (todos os municipios) ---------- */
.cetech-svg__mun {
	fill: #eefaf5;
	fill-rule: evenodd;
	stroke: #c3e6d6;
	stroke-width: 0.6;
	stroke-linejoin: round;
	opacity: 1;
	transition: fill 0.2s ease, stroke 0.2s ease;
}

/* Cidades atendidas: divisa e area na cor de cada cidade (paleta CE Tech). */
.cetech-svg__mun.is-served {
	stroke: var(--cetech-pin, #2020ee);
	stroke-width: 1.4;
	fill: var(--cetech-pin, #2020ee);
	fill-opacity: 0.06;
}

.cetech-svg__mun.is-served:hover {
	fill-opacity: 0.12;
}

/* Cidade selecionada: destaque da area. */
.cetech-svg__mun.is-active {
	fill-opacity: 0.18;
	stroke: var(--cetech-pin, #2020ee);
	stroke-width: 2.2;
}

/* ---------- Pins das cidades ---------- */
.cetech-svg__pin {
	transform-box: fill-box;
	transform-origin: center;
	cursor: pointer;
	will-change: transform;
	animation: cetech-cobertura-pin-in 0.55s cubic-bezier(0.2, 0.9, 0.3, 1.15) both;
	animation-delay: calc(var(--i, 0) * 150ms + 1100ms);
	transition: opacity 0.3s ease;
}

.cetech-svg__pin.is-filtered-out {
	opacity: 0.08 !important;
	pointer-events: none;
}

.cetech-svg__pin.is-filtered-match .cetech-svg__pin-dot {
	r: 7;
	stroke-width: 2;
}

.cetech-svg__pin.is-pin-active .cetech-svg__pin-dot {
	r: 6;
	stroke-width: 2.2;
}

.cetech-svg__pin.is-pin-active {
	filter: drop-shadow(0 0 6px var(--cetech-pin, #2020ee));
}

.cetech-svg__pin.is-pin-active .cetech-svg__pin-ring {
	animation: cetech-cobertura-ring 1.2s ease-out infinite;
}

.cetech-svg__pin-dot {
	fill: var(--cetech-pin, #2020ee);
	stroke: #ffffff;
	stroke-width: 1.6;
}

.cetech-svg__pin-ring {
	fill: none;
	stroke: var(--cetech-pin, #2020ee);
	stroke-width: 2.2;
	opacity: 0;
	transform-box: fill-box;
	transform-origin: center;
	animation: cetech-cobertura-ring 2.2s ease-out infinite;
	animation-delay: calc(var(--i, 0) * 150ms + 1350ms);
}

@keyframes cetech-cobertura-pin-in {
	0% {
		opacity: 0;
		transform: translateY(14px) scale(0.3);
	}
	60% {
		opacity: 1;
		transform: translateY(-3px) scale(1.15);
	}
	100% {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

@keyframes cetech-cobertura-ring {
	0% {
		opacity: 0.7;
		transform: scale(0.35);
	}
	70% {
		opacity: 0;
		transform: scale(1.9);
	}
	100% {
		opacity: 0;
		transform: scale(1.9);
	}
}

/* ---------- Fallback lista (sem SVG) ---------- */
.cetech-cobertura__noscript {
	margin: 0;
	padding: 18px 20px;
	list-style: disc inside;
	color: #334155;
	font-size: 14px;
}

/* ---------- Responsivo ---------- */
@media (max-width: 900px) {
	.cetech-cobertura__layout {
		grid-template-columns: 1fr;
	}

	/* No mobile a lista vem primeiro, o mapa depois. */
	.cetech-cobertura__list {
		order: -1;
	}

	.cetech-cobertura__list ul {
		max-height: 320px;
	}
}

@media (max-width: 640px) {
	.cetech-cobertura {
		margin: 16px 0;
	}

	.cetech-cobertura__chip {
		top: 10px;
		left: 10px;
		padding: 6px 10px;
		font-size: 12px;
	}

	.cetech-cobertura__chip strong {
		width: 26px;
		height: 26px;
	}
}

/* ---------- Acessibilidade ---------- */
@media (prefers-reduced-motion: reduce) {
	.cetech-svg__pin,
	.cetech-svg__pin-ring {
		animation: none;
		opacity: 1;
		stroke-dashoffset: 0;
	}
}