/**
 * Enquetes Apoio - estilos públicos (mobile-first)
 */

.enqa-enquete {
	--enqa-cor: #2271b1;
	--enqa-cor-escura: #135e96;
	--enqa-sucesso: #00a32a;
	--enqa-raio: 12px;
	max-width: 720px;
	margin: 0 auto;
	font-size: 16px;
	line-height: 1.5;
}

.enqa-enquete *,
.enqa-enquete *::before,
.enqa-enquete *::after {
	box-sizing: border-box;
}

/* Cabeçalho */
.enqa-header {
	text-align: center;
	margin-bottom: 20px;
}

.enqa-titulo {
	margin: 0 0 8px;
	font-size: 1.5em;
	line-height: 1.25;
}

.enqa-descricao {
	margin: 0 0 8px;
	color: #555;
}

.enqa-periodo {
	margin: 0;
	font-size: 0.85em;
	color: #777;
}

/* Avisos */
.enqa-aviso {
	padding: 14px 16px;
	border-radius: var(--enqa-raio);
	background: #f0f6fc;
	border: 1px solid #c5d9ed;
	color: #1d2327;
	text-align: center;
	margin-bottom: 16px;
}

.enqa-aviso-encerrada {
	background: #fcf0f1;
	border-color: #ecc8cb;
}

.enqa-aviso-votou {
	background: #edfaef;
	border-color: #c3e6cb;
}

/* Grade de candidatos: 2 colunas no celular, mais em telas maiores */
.enqa-opcoes {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 12px;
	margin-bottom: 16px;
}

@media (min-width: 600px) {
	.enqa-opcoes {
		grid-template-columns: repeat(3, 1fr);
		gap: 16px;
	}
}

@media (min-width: 900px) {
	.enqa-opcoes {
		grid-template-columns: repeat(4, 1fr);
	}
}

.enqa-opcao {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 100%;
	padding: 0 0 12px;
	border: 2px solid #ddd;
	border-radius: var(--enqa-raio);
	background: #fff;
	cursor: pointer;
	overflow: hidden;
	transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
	-webkit-tap-highlight-color: transparent;
	font: inherit;
	color: inherit;
	text-align: center;
}

.enqa-opcao:active {
	transform: scale(0.98);
}

.enqa-opcao.enqa-selecionada {
	border-color: var(--enqa-cor);
	box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.25);
}

.enqa-foto {
	display: block;
	width: 100%;
	aspect-ratio: 3 / 4;
	background: #f0f0f1;
	overflow: hidden;
}

.enqa-foto img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.enqa-foto-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	font-size: 3em;
	color: #b5bcc2;
}

.enqa-nome {
	display: block;
	padding: 10px 8px 0;
	font-weight: 600;
	font-size: 0.95em;
	word-break: break-word;
}

/* Selo de selecionado */
.enqa-check {
	position: absolute;
	top: 8px;
	right: 8px;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--enqa-cor);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 16px;
	opacity: 0;
	transform: scale(0.5);
	transition: opacity 0.15s ease, transform 0.15s ease;
}

.enqa-opcao.enqa-selecionada .enqa-check {
	opacity: 1;
	transform: scale(1);
}

/* Botão de confirmação: fixo no rodapé em telas pequenas */
.enqa-acao {
	position: sticky;
	bottom: 12px;
	z-index: 5;
	margin-bottom: 8px;
}

.enqa-votar {
	display: block;
	width: 100%;
	min-height: 52px;
	padding: 14px 20px;
	border: 0;
	border-radius: var(--enqa-raio);
	background: var(--enqa-cor);
	color: #fff;
	font-size: 1.05em;
	font-weight: 700;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
	transition: background 0.15s ease, opacity 0.15s ease;
	-webkit-tap-highlight-color: transparent;
}

.enqa-votar:hover:not(:disabled) {
	background: var(--enqa-cor-escura);
}

.enqa-votar:disabled {
	opacity: 0.5;
	cursor: not-allowed;
	box-shadow: none;
}

.enqa-votar.enqa-enviando {
	opacity: 0.7;
}

@media (min-width: 600px) {
	.enqa-acao {
		position: static;
	}

	.enqa-votar {
		max-width: 320px;
		margin: 0 auto;
	}
}

/* Mensagens */
.enqa-msg {
	text-align: center;
	margin: 10px 0;
	min-height: 1.5em;
	font-weight: 600;
}

.enqa-msg-sucesso {
	color: var(--enqa-sucesso);
}

.enqa-msg-erro {
	color: #d63638;
}

.enqa-msg-aviso {
	color: #996800;
}

/* Botão de voltar após o voto */
.enqa-voltar {
	text-align: center;
	margin: 16px 0 0;
}

.enqa-btn-voltar {
	display: inline-block;
	padding: 12px 24px;
	min-height: 48px;
	border-radius: var(--enqa-raio);
	background: #f0f0f1;
	color: #1d2327;
	font-weight: 600;
	text-decoration: none;
	transition: background 0.15s ease;
	-webkit-tap-highlight-color: transparent;
}

.enqa-btn-voltar:hover {
	background: #dcdcde;
	color: #1d2327;
	text-decoration: none;
}

/* Resultados */
.enqa-resultados {
	margin-top: 16px;
}

.enqa-resultado {
	margin-bottom: 14px;
}

.enqa-resultado-info {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 8px;
	margin-bottom: 4px;
	flex-wrap: wrap;
}

.enqa-resultado-nome {
	font-weight: 600;
}

.enqa-resultado-numeros {
	font-size: 0.85em;
	color: #555;
	white-space: nowrap;
}

.enqa-barra {
	width: 100%;
	height: 14px;
	border-radius: 7px;
	background: #f0f0f1;
	overflow: hidden;
}

.enqa-barra-preenchida {
	height: 100%;
	border-radius: 7px;
	background: linear-gradient(90deg, var(--enqa-cor), var(--enqa-cor-escura));
	transition: width 0.8s ease;
	min-width: 2px;
}

.enqa-vencedor .enqa-resultado-nome {
	color: var(--enqa-cor-escura);
}

.enqa-vencedor .enqa-barra-preenchida {
	background: linear-gradient(90deg, #d4a017, #b8860b);
}

.enqa-total {
	text-align: center;
	color: #777;
	font-size: 0.9em;
	margin: 12px 0 0;
}
