/**
 * TN Enquetes — estilo base.
 * Propositalmente discreto: herda a tipografia do tema e serve de tela
 * limpa para os controles de estilo do Elementor.
 */

.tne {
	box-sizing: border-box;
	max-width: 100%;
}

.tne *,
.tne *::before,
.tne *::after {
	box-sizing: inherit;
}

.tne__pergunta {
	font-size: 1.25em;
	font-weight: 600;
	line-height: 1.3;
	margin-bottom: 16px;
}

/* ---------- Opções ---------- */

.tne__opcoes {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.tne__opcao {
	position: relative;
}

.tne__radio {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: 0;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.tne__rotulo {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	padding: 12px 16px;
	border: 1px solid rgba(0, 0, 0, 0.14);
	border-radius: 6px;
	cursor: pointer;
	transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.tne__rotulo:hover {
	border-color: rgba(0, 0, 0, 0.32);
}

.tne__radio:focus-visible + .tne__rotulo {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.tne__marcador {
	position: relative;
	display: inline-block;
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	border: 2px solid rgba(0, 0, 0, 0.35);
	border-radius: 50%;
	transition: border-color 0.18s ease;
}

.tne__marcador::after {
	content: "";
	position: absolute;
	inset: 3px;
	border-radius: 50%;
	background-color: currentColor;
	transform: scale(0);
	transition: transform 0.18s ease;
}

.tne__radio:checked + .tne__rotulo .tne__marcador::after {
	transform: scale(1);
}

.tne__texto {
	flex: 1 1 auto;
}

/* ---------- Botão ---------- */

.tne__botao {
	display: inline-block;
	margin-top: 16px;
	padding: 12px 28px;
	font: inherit;
	font-weight: 600;
	color: #fff;
	background-color: #111;
	border: 1px solid transparent;
	border-radius: 6px;
	cursor: pointer;
	transition: opacity 0.18s ease, background-color 0.18s ease;
}

.tne__botao:hover {
	opacity: 0.88;
}

.tne__botao[disabled] {
	opacity: 0.55;
	cursor: default;
}

.tne__aviso {
	margin: 10px 0 0;
	font-size: 0.875em;
	color: #b3261e;
}

.tne__aviso:empty {
	display: none;
}

/* ---------- Resultados ---------- */

.tne__resultados {
	display: flex;
	flex-direction: column;
	gap: 14px;
	margin-top: 20px;
}

.tne__resultados[hidden] {
	display: none;
}

.tne__resultado-topo {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 6px;
}

.tne__percentual {
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	flex: 0 0 auto;
}

.tne__barra {
	position: relative;
	overflow: hidden;
	height: 10px;
	background-color: rgba(0, 0, 0, 0.1);
	border-radius: 999px;
}

.tne__barra-preenchida {
	display: block;
	width: 0;
	height: 100%;
	background-color: #111;
	border-radius: inherit;
	transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.tne__votos {
	display: inline-block;
	margin-top: 6px;
	font-size: 0.8125em;
	opacity: 0.7;
}

.tne__total {
	font-size: 0.875em;
	opacity: 0.7;
}

.tne__mensagem {
	margin: 0;
	font-size: 0.875em;
	opacity: 0.7;
}

/* Enquete já respondida: some o formulário, aparece o resultado. */

.tne--respondida .tne__form {
	display: none;
}

.tne:not(.tne--respondida) .tne__mensagem {
	display: none;
}

/* Resultado visível antes do voto: mantém o formulário e o resultado juntos. */

.tne--revelada:not(.tne--respondida) .tne__mensagem {
	display: none;
}

.tne--vazia {
	padding: 16px;
	border: 1px dashed rgba(0, 0, 0, 0.3);
	border-radius: 6px;
	font-size: 0.9375em;
	opacity: 0.75;
}

.tne--vazia p {
	margin: 0;
}

@media (prefers-reduced-motion: reduce) {
	.tne__barra-preenchida,
	.tne__rotulo,
	.tne__marcador,
	.tne__marcador::after,
	.tne__botao {
		transition: none;
	}
}
