/* Nuvem PDV Community — enquetes e formulário de criação.
 * Escopo fechado em .npc-* para não colidir com o tema.
 */

.npc-poll,
.npc-poll-list,
.npc-create,
.npc-callout,
.npc-notice {
	--npc-ink: #0f172a;
	--npc-muted: #5b6472;
	--npc-line: #e2e8f0;
	--npc-surface: #ffffff;
	--npc-soft: #f6f8fb;
	--npc-accent: #0f766e;
	--npc-accent-soft: #ccfbf1;
	--npc-danger: #b91c1c;
	box-sizing: border-box;
}

.npc-poll *,
.npc-poll-list *,
.npc-create *,
.npc-callout *,
.npc-notice * {
	box-sizing: border-box;
}

/* ---------------------------------------------------------------- poll card */

.npc-poll {
	margin: 32px 0;
	padding: 24px;
	border: 1px solid var(--npc-line);
	border-radius: 16px;
	background: var(--npc-surface);
	color: var(--npc-ink);
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.npc-poll-head {
	margin-bottom: 18px;
}

.npc-poll-kicker {
	display: inline-block;
	margin-bottom: 8px;
	padding: 3px 10px;
	border-radius: 999px;
	background: var(--npc-accent-soft);
	color: #115e59;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.npc-poll-question {
	margin: 0 0 6px;
	font-size: 1.15rem;
	line-height: 1.35;
	font-weight: 700;
	color: var(--npc-ink);
}

.npc-poll-meta {
	margin: 0;
	color: var(--npc-muted);
	font-size: 0.85rem;
}

.npc-options,
.npc-results,
.npc-create-options,
.npc-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.npc-option + .npc-option {
	margin-top: 8px;
}

.npc-option-label {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	padding: 11px 14px;
	border: 1px solid var(--npc-line);
	border-radius: 10px;
	background: var(--npc-soft);
	cursor: pointer;
	transition: border-color 0.15s ease, background 0.15s ease;
}

.npc-option-label:hover {
	border-color: #94a3b8;
	background: #eef2f7;
}

.npc-option-label:has(input:checked) {
	border-color: var(--npc-accent);
	background: var(--npc-accent-soft);
}

.npc-option-label input {
	margin-top: 3px;
	accent-color: var(--npc-accent);
}

.npc-poll-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: center;
	margin-top: 16px;
}

.npc-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 10px 20px;
	border: 0;
	border-radius: 10px;
	background: var(--npc-accent);
	color: #ffffff;
	font-weight: 600;
	font-size: 0.95rem;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: filter 0.15s ease, transform 0.05s ease;
}

.npc-btn:hover {
	filter: brightness(1.08);
	color: #ffffff;
}

.npc-btn:active {
	transform: translateY(1px);
}

.npc-btn[disabled] {
	opacity: 0.65;
	cursor: progress;
}

.npc-poll-hint,
.npc-create-hint {
	color: var(--npc-muted);
	font-size: 0.82rem;
}

.npc-poll-error {
	margin: 10px 0 0;
	color: var(--npc-danger);
	font-size: 0.88rem;
}

/* ---------------------------------------------------------------- results */

.npc-result + .npc-result {
	margin-top: 12px;
}

.npc-result-top {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 6px;
	font-size: 0.92rem;
}

.npc-result-label {
	font-weight: 600;
}

.npc-result-value {
	color: var(--npc-muted);
	white-space: nowrap;
}

.npc-result-mine {
	margin-left: 6px;
	padding: 1px 7px;
	border-radius: 999px;
	background: var(--npc-accent);
	color: #ffffff;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	vertical-align: middle;
}

.npc-bar {
	height: 9px;
	border-radius: 999px;
	background: #e8edf4;
	overflow: hidden;
}

.npc-bar > span {
	display: block;
	height: 100%;
	border-radius: 999px;
	background: var(--npc-accent);
	transition: width 0.4s ease;
}

.npc-result.is-mine .npc-bar > span {
	background: #115e59;
}

.npc-poll-thanks,
.npc-poll-closed {
	margin: 14px 0 0;
	color: var(--npc-muted);
	font-size: 0.85rem;
}

.npc-poll-closed {
	color: #92400e;
}

/* ---------------------------------------------------------------- list */

.npc-poll-list {
	margin: 32px 0;
	padding: 22px 24px;
	border: 1px solid var(--npc-line);
	border-radius: 16px;
	background: var(--npc-soft);
}

.npc-list-title {
	margin: 0 0 14px;
	font-size: 1.05rem;
}

.npc-list-item {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 6px 16px;
	padding: 12px 0;
	border-top: 1px solid var(--npc-line);
}

.npc-list-item:first-child {
	border-top: 0;
}

.npc-list-link {
	font-weight: 600;
	color: var(--npc-ink);
	text-decoration: none;
}

.npc-list-link:hover {
	color: var(--npc-accent);
	text-decoration: underline;
}

.npc-list-meta {
	color: var(--npc-muted);
	font-size: 0.82rem;
}

/* ---------------------------------------------------------------- create form */

.npc-create {
	margin: 32px 0;
	padding: 24px;
	border: 1px solid var(--npc-line);
	border-radius: 16px;
	background: var(--npc-surface);
}

.npc-field {
	margin: 0 0 18px;
}

.npc-field > label,
.npc-field > legend {
	display: block;
	margin-bottom: 6px;
	font-weight: 600;
	font-size: 0.92rem;
	color: var(--npc-ink);
}

.npc-field input[type="text"],
.npc-field input[type="datetime-local"],
.npc-field select,
.npc-field textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #cbd5e1;
	border-radius: 10px;
	background: #ffffff;
	color: var(--npc-ink);
	font: inherit;
	font-size: 0.95rem;
}

.npc-field input:focus,
.npc-field select:focus,
.npc-field textarea:focus {
	outline: 2px solid var(--npc-accent);
	outline-offset: 1px;
	border-color: var(--npc-accent);
}

.npc-field-inline {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	align-items: center;
}

.npc-field-inline > label {
	display: inline-flex;
	gap: 8px;
	align-items: center;
	margin: 0;
	font-weight: 500;
}

.npc-create-option + .npc-create-option {
	margin-top: 8px;
}

.npc-link-btn {
	margin-top: 10px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--npc-accent);
	font: inherit;
	font-size: 0.88rem;
	font-weight: 600;
	cursor: pointer;
	text-decoration: underline;
}

.npc-create-honeypot {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* ---------------------------------------------------------------- notices */

.npc-notice,
.npc-callout {
	margin: 24px 0;
	padding: 14px 16px;
	border-radius: 12px;
	border: 1px solid var(--npc-line);
	background: var(--npc-soft);
	font-size: 0.92rem;
}

.npc-notice-success {
	border-color: #a7f3d0;
	background: #ecfdf5;
	color: #065f46;
}

.npc-notice-error {
	border-color: #fecaca;
	background: #fef2f2;
	color: #991b1b;
}

.npc-notice-info {
	border-color: #bfdbfe;
	background: #eff6ff;
	color: #1e40af;
}

.npc-callout p {
	margin: 0 0 10px;
}

.npc-callout p:last-child {
	margin-bottom: 0;
}

@media (max-width: 640px) {
	.npc-poll,
	.npc-create,
	.npc-poll-list {
		padding: 18px;
		border-radius: 14px;
	}

	.npc-result-top {
		font-size: 0.86rem;
	}
}

@media (prefers-color-scheme: dark) {
	.npc-poll,
	.npc-create {
		--npc-ink: #e5e7eb;
		--npc-muted: #9ca3af;
		--npc-line: #334155;
		--npc-surface: #0f172a;
		--npc-soft: #1e293b;
		--npc-accent-soft: #134e4a;
	}

	.npc-option-label:hover {
		background: #243044;
	}

	.npc-bar {
		background: #334155;
	}

	.npc-field input[type="text"],
	.npc-field input[type="datetime-local"],
	.npc-field select,
	.npc-field textarea {
		background: #0b1220;
		border-color: #475569;
		color: #e5e7eb;
	}
}
