/* Wöchentliche Abstimmung – Frontend */

.wpoll-box,
.wpoll-results,
.wpoll-archive {
	--wpoll-accent: #2563eb;
	--wpoll-bar-bg: #e9edf5;
	--wpoll-border: #e2e2e2;
	--wpoll-font: inherit; /* Standard: Schrift des Themes übernehmen */
	max-width: 640px;
	margin: 1.5em 0;
	padding: 1.25em 1.5em;
	border: 1px solid var(--wpoll-border);
	border-radius: 10px;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .05);
	font-family: var(--wpoll-font, inherit);
}

/* Formular-Elemente erben Schrift und Schnitt (sonst UA-Standard) */
.wpoll-box input,
.wpoll-box button,
.wpoll-box select,
.wpoll-box textarea,
.wpoll-results input,
.wpoll-results button,
.wpoll-archive input,
.wpoll-archive button {
	font-family: inherit;
	font-weight: inherit;
}

.wpoll-question {
	margin: 0 0 .5em;
	font-size: 1.25em;
	line-height: 1.3;
}

.wpoll-description {
	margin: 0 0 .8em;
	line-height: 1.6;
}

.wpoll-description p {
	margin: 0 0 .5em;
}

.wpoll-description p:last-child {
	margin-bottom: 0;
}

.wpoll-choice-desc {
	margin: .2em 0 0;
	font-size: .9em;
	line-height: 1.5;
	color: #555;
}

.wpoll-choice-desc p {
	margin: 0 0 .4em;
}

.wpoll-choice-desc p:last-child {
	margin-bottom: 0;
}

/* In der Ergebnis-/Archiv-Ansicht etwas Luft zwischen Beschreibung und Balken. */
.wpoll-result-row .wpoll-choice-desc {
	margin-bottom: .5em;
}

/* Beschreibung im Abstimmungsformular linksbündig zum Antworttext
   (Box-Innenabstand + Radiobreite + Abstand). */
.wpoll-choices:not(.wpoll-choices--voted) > li > .wpoll-choice-desc {
	margin-top: .35em;
	padding-left: calc(1px + 1em + 1.1em + .6em);
}

/* Beschreibung in der Ansicht nach der Stimmabgabe (ohne Radiobutton). */
.wpoll-choices--voted > li > .wpoll-choice-desc {
	margin-top: .35em;
	padding-left: calc(1px + 1em);
}

.wpoll-meta {
	margin: 0 0 .4em;
	font-size: .9em;
	line-height: 1.5;
	color: #555;
}

/* letzte Meta-Zeile vor dem folgenden Block etwas mehr Luft */
.wpoll-meta + .wpoll-meta {
	margin-bottom: .4em;
}

.wpoll-choices {
	list-style: none;
	margin: 0 0 1.25em;
	padding: 0;
}

.wpoll-choices li {
	margin: 0 0 .85em;
}

.wpoll-choices label {
	display: flex;
	align-items: center;
	gap: .6em;
	padding: .75em 1em;
	border: 1px solid var(--wpoll-border);
	border-radius: 8px;
	cursor: pointer;
	transition: border-color .15s, background .15s;
}

.wpoll-choices label:hover,
.wpoll-choices label:focus-within {
	border-color: var(--wpoll-choice-color, var(--wpoll-accent));
	background: #f6f9ff;
}

.wpoll-choices input[type="radio"] {
	width: 1.1em;
	height: 1.1em;
	margin: 0;
	flex: 0 0 auto;
}

/* Antworten nach der Abstimmung (nur Anzeige, nicht mehr wählbar) */
.wpoll-choices--voted li {
	margin: 0 0 .85em;
}

.wpoll-choice-static {
	display: flex;
	align-items: center;
	gap: .6em;
	padding: .75em 1em;
	border: 1px solid var(--wpoll-border);
	border-radius: 8px;
	background: #fafafa;
}

.wpoll-choices--voted li.is-chosen .wpoll-choice-static {
	border-color: var(--wpoll-accent);
	background: #f0f5ff;
}

.wpoll-choice-mark {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.2em;
	flex: 0 0 auto;
	color: var(--wpoll-accent);
	font-weight: 700;
}

.wpoll-choice-yours {
	margin-left: auto;
	font-size: .82em;
	font-weight: normal;
	font-style: italic;
	color: #666;
	white-space: nowrap;
}

.wpoll-submit {
	display: inline-block;
	padding: .7em 1.4em;
	font-size: 1em;
	font-weight: 600;
	color: #fff;
	background: var(--wpoll-accent);
	border: 0;
	border-radius: 8px;
	cursor: pointer;
}

.wpoll-submit:hover {
	filter: brightness(.95);
}

.wpoll-hint {
	margin: .75em 0 0;
	font-size: .82em;
	color: #777;
}

.wpoll-notice {
	margin: 0 0 1em;
	padding: .75em 1em;
	border-radius: 8px;
	font-size: .9em;
	line-height: 1.5;
}

.wpoll-notice--ok {
	background: #e8f6ec;
	color: #1d1d1d;
}

.wpoll-notice--error {
	background: #fdecec;
	color: #a32020;
}

/* Schlichter Hinweis ohne Kasten (z. B. „Bitte melde dich an“) – bündig ausrichten */
.wpoll-notice--plain {
	padding: 0;
	background: none;
	font-size: .9em;
	font-style: italic;
	color: #555;
}

.wpoll-notice--plain a {
	font-weight: 700;
}

/* Einzelner Hinweis im Archiv-Kasten: ohne Außenabstand, damit er durch den
   gleichen Innenabstand oben/unten vertikal zentriert steht. */
.wpoll-archive > .wpoll-notice--plain {
	margin: 0;
}

/* Tortendiagramm */
.wpoll-pie {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1.25em 1.75em;
	margin: 0 0 1.25em;
}

.wpoll-pie-svg {
	flex: 0 0 auto;
	width: 180px;
	height: 180px;
	max-width: 100%;
}

.wpoll-pie-legend {
	flex: 1 1 200px;
	list-style: none;
	margin: 0;
	padding: 0;
	min-width: 180px;
}

.wpoll-pie-legitem {
	display: flex;
	align-items: baseline;
	gap: .5em;
	margin: 0 0 .5em;
	line-height: 1.4;
}

.wpoll-pie-legitem:last-child {
	margin-bottom: 0;
}

.wpoll-pie-swatch {
	flex: 0 0 auto;
	width: .8em;
	height: .8em;
	border-radius: 2px;
	transform: translateY(.05em);
}

.wpoll-pie-leglabel {
	flex: 1 1 auto;
}

.wpoll-pie-legval {
	flex: 0 0 auto;
	white-space: nowrap;
	color: #444;
}

/* Ergebnisse */
.wpoll-result-row {
	margin: 0 0 .85em;
}

.wpoll-result-head {
	display: flex;
	justify-content: space-between;
	gap: 1em;
	margin: 0 0 .3em;
	font-size: inherit;
}

.wpoll-result-label {
	font-weight: inherit;
}

.wpoll-result-value {
	color: #444;
	white-space: nowrap;
}

.wpoll-bar {
	height: 12px;
	background: var(--wpoll-bar-bg);
	border-radius: 6px;
	overflow: hidden;
}

.wpoll-bar-fill {
	height: 100%;
	background: var(--wpoll-accent);
	border-radius: 6px;
	transition: width .4s ease;
}

/* Eigene Wahl im Ergebnis hervorheben */
.wpoll-result-row.is-chosen .wpoll-bar {
	box-shadow: 0 0 0 2px rgba(37, 99, 235, .25);
}

.wpoll-total {
	margin: 1em 0 0;
	padding-top: .75em;
	border-top: 1px solid var(--wpoll-border);
	font-size: .92em;
	color: #333;
}

/* Archiv */
.wpoll-archive-title {
	margin: 0 0 .75em;
	font-size: 1.5em;
	line-height: 1.25;
}

.wpoll-archive-item {
	margin: 0 0 1em;
	border: 1px solid var(--wpoll-border);
	border-radius: 8px;
	background: #fff;
	overflow: hidden;
}

.wpoll-archive-item > summary {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1em;
	padding: .85em 1.1em;
	cursor: pointer;
	list-style: none;
	border: 0 !important;
	box-shadow: none !important;
}

/* Theme-Linie am aufgeklappten Titel sicher entfernen. */
.wpoll-archive-item[open] > summary,
.wpoll-archive-item > summary:focus {
	border: 0 !important;
	box-shadow: none !important;
	outline: none;
}

.wpoll-archive-item summary::-webkit-details-marker {
	display: none;
}

.wpoll-archive-q {
	font-weight: 600;
}

.wpoll-archive-date {
	font-size: .85em;
	color: #777;
	white-space: nowrap;
}

.wpoll-archive-item .wpoll-results {
	margin: 0;
	border: 0 !important;
	border-top: 1px solid var(--wpoll-border) !important;
	border-radius: 0;
	box-shadow: none;
}

.wpoll-archive-item .wpoll-question {
	font-size: 1.05em;
}

/* Zusätzliche Hinweiszeile unter der Frage */
.wpoll-meta--hint {
	margin-bottom: 1.1em;
	font-style: italic;
}

/* Registrierungsformular */
.wpoll-register .wpoll-field {
	display: flex;
	flex-direction: column;
	gap: .3em;
	margin: 0 0 .9em;
}

.wpoll-register .wpoll-field label {
	font-weight: 600;
	font-size: .92em;
}

.wpoll-register input[type="text"],
.wpoll-register input[type="email"],
.wpoll-register input[type="password"],
.wpoll-register select {
	padding: .6em .7em;
	border: 1px solid var(--wpoll-border);
	border-radius: 8px;
	font-size: 1em;
	width: 100%;
	max-width: 360px;
	box-sizing: border-box;
	background-color: #fff;
	color: inherit;
	line-height: 1.3;
	height: auto;
}

/* Auswahlfeld wie die übrigen Felder, mit eigenem Pfeil. */
.wpoll-register select {
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	padding-right: 2em;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath fill='%23666' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right .7em center;
}

.wpoll-reg-links {
	margin-top: .5em;
	margin-bottom: 1.75em;
	font-size: .9em;
}

.wpoll-submit--link {
	text-decoration: none;
}

/* Honeypot unsichtbar halten */
.wpoll-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* Konto-Zeile (Abmelden) */
.wpoll-account {
	font-family: var(--wpoll-font, inherit);
	max-width: 640px;
	margin: 1.5em 0 .5em;
	padding: .5em 1.5em;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1em;
	font-size: .88em;
	color: #555;
	background: #f5f6f8;
	border: 1px solid var(--wpoll-border, #e2e2e2);
	border-radius: 10px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .05);
}

.wpoll-logout {
	font-weight: 600;
	white-space: nowrap;
	text-decoration: none;
}

.wpoll-logout:hover {
	text-decoration: none;
}

/* Admin-Diagnose */
.wpoll-debug {
	max-width: 640px;
	margin: 1em 0;
	padding: .8em 1em;
	font-size: .85em;
	line-height: 1.5;
	color: #614700;
	background: #fff8e5;
	border: 1px solid #e8d48a;
	border-radius: 8px;
}
.wpoll-debug code { background: rgba(0,0,0,.06); padding: .05em .35em; border-radius: 4px; }

/* Seiten-Untertitel ([votum_untertitel]) */
.wpoll-tagline {
	max-width: 640px;
	margin: .25em 0 1em;
	font-size: 1.15em;
	line-height: 1.4;
	color: #444;
}

/* Abmelde-Link im Registrierungsblock: wie der Fließtext, kursiv, nicht fett */
.wpoll-logout--plain {
	font-weight: normal;
	font-style: italic;
	color: inherit;
	text-decoration: none;
}

/* „Angemeldet als …“ kursiv, nicht fett */
.wpoll-account-name {
	font-style: italic;
	font-weight: normal;
}

/* ---------- Ergebnis nach Bundesland ---------- */
.wpoll-bl {
	margin: 1em 0 0;
	border-top: 1px solid var(--wpoll-border);
	padding-top: .75em;
}

.wpoll-bl-summary {
	cursor: pointer;
	font-weight: 600;
	list-style: none;
	border: 0 !important;
	box-shadow: none !important;
	outline: none !important;
}

/* Vom Theme/Browser gesetzten Rahmen/Fokuskasten am aufgeklappten Titel entfernen. */
.wpoll-bl[open] > .wpoll-bl-summary,
.wpoll-bl-summary:focus,
.wpoll-bl-summary:focus-visible {
	border: 0 !important;
	box-shadow: none !important;
	outline: none !important;
}

.wpoll-bl-summary::-webkit-details-marker {
	display: none;
}

.wpoll-bl-summary::before {
	content: "▸ ";
}

.wpoll-bl[open] .wpoll-bl-summary::before {
	content: "▾ ";
}

.wpoll-bl-body {
	margin-top: .75em;
}

.wpoll-bl-state {
	margin: 0 0 1em;
}

.wpoll-bl-state:last-child {
	margin-bottom: 0;
}

.wpoll-bl-name {
	font-weight: 600;
	margin: 0 0 .85em;
}

.wpoll-bl-count {
	font-weight: normal;
	color: #777;
	font-size: .9em;
}

.wpoll-bl-row {
	margin: 0 0 .85em;
}

.wpoll-bl-head {
	display: flex;
	justify-content: space-between;
	gap: 1em;
	font-size: inherit;
	margin: 0 0 .5em;
}

.wpoll-bl-value {
	color: #444;
	white-space: nowrap;
}
