/* -- Textdesign -- */
html {font-size: 16px;}

/* font-size */
h1 {font-size: 1.75em;}
h2 {font-size: 1.5em;}
h3 {font-size: 1.25em;}
h4 {font-size: 1.125em;}
article nav a, #footer li a, #footer span, code, .text.small p, article > header span, .pg_svg_chart .abscissa > text, .pg_svg_chart .ordinate > text, .bar_chart_box > div > span, main > header nav a, .pie_chart div.small, .bar_chart_box + div.small {font-size: 0.875em;}


/* font-color */
.table a, .table a:hover, .pg_div_chart_horizontal {color: black;}
a {color: blue;}
a:hover, .marked_first_letter h2:first-letter, .red {color: red;}
.green {color: green;}
a.current, a.current:hover {color: darkblue;}
.grey {color: grey;}


/* font-style, font-weight */
.text table > *:first-child > *:first-child td, .text table > *:first-child > *:first-child th, .text table td:first-child, .text table th:first-child, .bold, #header nav a, section.pie_chart svg text:not(.inner), #footer ul a, .thead > div > div, .tfoot > div > div, .tbody > div > div, .tbody > * > div:first-child, .table div.highest, .table div.lowest, .pg_div_chart_vertical > div > div:last-child, .pg_div_chart_horizontal td:first-child, .pg_div_chart_horizontal td:nth-child(3), .pg_svg_chart .legend, .pg_svg_chart .abscissa > g, .pg_svg_chart .ordinate > g, .pg_svg_chart .bars, .svg_map .paths text, .circles text {font-weight: bold;}
.tbody > a > div:first-child span, .text tbody td:first-child span, .weight_normal div:not(:first-child) {font-weight: normal;}

.italic, h4, .tbody > a > div:first-child span:last-child, article > header span, .bar_chart_box > div > span, #Wahlen .tbody span, #Wahlergebnis .pg_div_chart_vertical + div, .text tbody td:first-child span:last-child {font-style: italic;}

code {white-space: pre-wrap; word-break: break-all;}


/* line-height */
.lists div, #footer div, .text table, .table, code, #Koalitionen header form {line-height: 1.25;}
.text div {line-height: 1.5;}
#header div.pgu_table > div > div, .social_media_share > div:not(:first-child) > div, #pie_charts > div > div:nth-child(2) {line-height: 0;}


/* text-align */
p {text-align: justify;}
.text table td:first-child, .text table th:first-child, .text tbody.numbers td:not(:first-child), .text tfoot.numbers td:not(:first-child), .tbody > a > div, .thead > div > div:first-child, .tfoot > div > div:first-child, .tbody > div > div:first-child, .pg_div_chart_horizontal td {text-align: right;}
ul li, .text tbody:not(.numbers) td:not(:first-child), code {text-align: left;}
body, .text table > *:first-child > *:first-child > td:not(:first-child), .text table > *:first-child > *:first-child > th:not(:first-child), .text tfoot:not(.numbers) td:not(:first-child), .thead > div > div:not(:first-child), .tfoot > div > div:not(:first-child), .tbody > div > div:not(:first-child), .pg_svg_chart, .center {text-align: center;}


/* vertical-align */
#header nav img, .social_media_share img, .text tbody td, .tbody > a > div, #header nav a div, #header nav a span, .social_media_share div:not(:first-child), .social_media_share div:not(:first-child) div, .pg_div_chart_horizontal td, #Koalitionen header form input {vertical-align: middle;}
.bar_chart, .pie_chart, .tfoot > div > div {vertical-align: top;}
.text table > *:first-child > *:first-child td, .text table > *:first-child > *:first-child th, .thead > div > div, .tbody > div > div, .pg_div_chart_vertical > div > div:first-child > div:first-child > div {vertical-align: bottom;}


/* text-decoration */
a {text-decoration: none;}
.underline {text-decoration: underline;}


/* lists */
#footer ul, #header nav ul, main > nav ul, article > header nav ul, main > header nav ul {list-style-type: none;}



/* -- Cursor -- */
a, a img, a:hover img {cursor: pointer;}



/* -- Blockdesign -- */
section.pie_chart, .bar_chart {box-sizing: border-box;}

/* display */
.bar_chart, .pie_chart, #pie_charts > div, #Umfrageverlauf form div, #Chronik form div, #header nav li, #header nav a div, .lists div, .social_media_share div, main > nav li, #footer li, main > nav div, main > nav ul, article > header nav ul, main > header nav ul, article > header nav li, main > header nav li, .pg_div_chart_vertical > div > div:first-child > div:first-child > div, .pg_div_chart_vertical > div, .text form span, button.block, .inline, #Koalitionen header form div, #Export form {display: inline-block;}
header, main, article, footer, nav, #header nav a, #header > div img, .social_media_share a, code, .pie_chart svg:hover g text.hidden {display: block;}
.pg_div_chart_vertical .none, #swiper, .pie_chart svg g text.hidden, .pie_chart svg:hover g text.visible {display: none;}

.table {display: table;}
.table > * > * {display: table-row;}
.table > * > * > div {display: table-cell;}

.thead {display: table-header-group;}
.tbody {display: table-row-group;}
.tfoot {display: table-footer-group;}

.errortolerance td div:first-child, .errormargin td div:first-child {float: left;}


/* position */
.pg_div_chart_vertical > div > div:first-child > div:last-child {position: relative;}


/* width */
.pg_div_chart_vertical > div > div:first-child > div:last-child, .pg_div_chart_horizontal td:nth-child(2), section.pie_chart, .bar_chart {width: 100%;}
.social_media_share img, .pg_div_chart_vertical > div > div:first-child > div:first-child div {width: 2em;}
#header nav a div {width: 1.5em;}
#pie_charts > div:not(.no_pie) {width: 100px;}

img {max-width: 100%;}
#header nav img {max-width: 1.5em;}
.bar_chart_box.light {max-width: 300px;}
#bar_charts .bar_chart {max-width: 320px;}
.bar_chart_box.normal {max-width: 360px;}
section.pie_chart, .bar_chart {max-width: 400px;}
.text div {max-width: 720px;}
.table {max-width: 1280px;}

.social_media_share img, #header > div img {min-width: 1.5em;}


/* height */
.errormargin td div:first-child {height: 1em;}
#header nav img, #header nav a div, .errortolerance td div:first-child {height: 1.5em;}
.pg_div_chart_horizontal td div {height: 2em;}


/* padding */
.bar_chart , section.pie_chart {padding: 1.0em;}
code {padding: 0.5em;}
#current_government {padding: 3px;}

.text table td, .text table th, .table > * > * > div {padding: 0.25em 0.5em;}
#pie_charts > div:not(#current_government):not(.no_pie) {padding: 0.5em 1em;}
main > header, main aside, .text, #Chronik, #Wahlumfragen_des_Wahltrends, .cwr_short_table {padding: 1em 0.5em;}
#no_pie_charts, .lists, #Umfrageverlauf header, #Abweichung_zum_Wahlergebnis header, .pg_svg_chart_section header, #neueste_Wahlumfragen > header, .pg_div_chart_vertical, #pie_charts > div.no_pie, #Tabelle > .text {padding: 0em 0.5em;}
.chart, #Umfrageverlauf, #Abweichung_zum_Wahlergebnis, .pg_svg_chart_section {padding: 1em 0em;}
main > nav, #header nav, #footer {padding: 0.5em 0em;}
#pie_charts svg {padding: 0.25em 0em;}
.pg_div_chart_vertical > div > div:last-child, .pg_div_chart_vertical > div > div:first-child > div:first-child, .text form span {padding: 0em 0.25em;}

#Koalitionen header {padding: 0em 0.5em 0.5em 0.5em;}
div.pie_chart {padding: 1.0em 1.0em 0.0em 1.0em;}
.chart header {padding: 0em 0.5em 1em 0.5em;}
article > header, #Wahlergebnis .pg_div_chart_vertical + div {padding: 1em 0.5em 0em 0.5em;}
#pie_charts + div, #Koalitionen .text, .pie_chart + div:not(.pie_chart) {padding: 0.5em 0.5em 0em 0.5em;}

.padding_top_1, .pg_div_chart_horizontal {padding-top: 1.0em;}
.bar_chart_box > div, .pie_chart div + div, .bar_chart_box + div.small {padding-top: 0.25em;}
header + .text, .text + .text, header + #Chronik, header + #Wahlumfragen_des_Wahltrends, header + .cwr_short_table {padding-top: 0em;}

.lists div, .padding_bottom_1 {padding-bottom: 1em;}
.lists header {padding-bottom: 0.5em;}
.pg_svg_chart_section div.text:last-child {padding-bottom: 0em;}

.padding_right_1 {padding-right: 1em;}

.lists ul {padding-left: 1.5em;}

#footer ul, #header nav ul, main > nav ul, article > header nav ul, main > header nav ul {padding: 0;}

.pg_div_chart_horizontal td:not(:nth-child(2)):not(:first-child) {padding-left: 0.5em;}
.pg_div_chart_horizontal td:first-child {padding-right: 0.5em;}

.text.party {padding-top: 1.0em !important; padding-bottom: 0em !important;}


/* margin */
#Umfrageverlauf > div, body, table, .text div, .lists div, section.pie_chart svg, .table, section.pie_chart div, .bar_chart_box, .pg_svg_chart {margin: 0 auto;}
h1, h2, h3, h4, h5, img {padding: 0; margin: 0;}
ul {margin: 0;}

.pg_div_chart_vertical > div > div:first-child > div:first-child > div {margin: 0em 0.25em;}
#header nav li, main > nav li, main > nav div, article > header nav li, main > header nav li {margin: 0.25em 0.5em;}
#footer div {margin: 0em 0.5em;}
#current_government {margin: 0.25em 0.75em;}

#footer li, #Umfrageverlauf header div, #Chronik header div {margin: 0em 0.5em 0.5em 0.5em;}

p:first-child, code:first-child, dl:first-child {margin-top: 0em;}
article > header div {margin-top: 0.125em;}
.errortolerance td div:first-child {margin-top: 0.25em;}
#Umfrageverlauf header form, #Chronik header form:not(:first-child), #Karte header form:not(:first-child), #Abweichung_zum_Wahlergebnis header form, #Koalitionen header form, button.block, #Potentialanalyse header form, #Umfrageverlauf > div:not(.pg_svg_chart):not(.text), .errormargin td div:first-child {margin-top: 0.5em;}
code, #Wahlergebnis {margin-top: 1em;}

p:last-child, code:last-child, dl:last-child {margin-bottom: 0em;}
.social_media_share > div:first-child, .text header, #Chronik header, #Abweichung_zum_Wahlergebnis header, .pg_svg_chart_section:not(#Umfrageverlauf) header, #footer > div:not(:last-child), p.preform {margin-bottom: 0.5em;}
.pg_div_chart_vertical > div > div:first-child > div:first-child > div > div:first-child {margin-bottom: 0.8em; margin-top: 2em;}
.text section:not(:last-child), .text div:not(:last-child), #Wahlumfragen_des_Wahltrends > div:not(:last-child), .cwr_short_table > div:not(:last-child), #Wahlumfragen_des_Wahltrends header, .cwr_short_table header, code, dd:not(:last-child) {margin-bottom: 1em;}

#Abweichung_zum_Wahlergebnis section:not(:last-child), .pg_svg_chart_section section:not(:last-child) {margin-bottom: 2em;}

.social_media_share div:not(:first-child) {margin-left: 0.5em;}

.pg_div_chart_vertical > div > div:first-child:not(.nofph) {margin-bottom: -1px;}


/* background-color */
main {background: #FFFFFF;}

#header > div, #footer, body {background: #cccccc;}
main > nav, main aside {background: #e6e6e6;}
#header nav {background: #d9d9d9;}

.tbody > div > div:not(:first-child), .tfoot > div > div:not(:first-child), .text thead > tr > th:not(:first-child), .text tbody > tr > td:not(:first-child), .text tfoot > tr > td:not(:first-child) {background: white;}
.thead > div > div:not(:first-child), .tbody > div > div:first-child, .tfoot > div > div:first-child, .wnv > .tbody > div > div:last-child, .wnv > .tfoot > div > div:last-child, .text thead > tr:first-child > th:not(:first-child), .text table > *:first-child > *:first-child > td:not(:first-child), .text tbody > tr > td:first-child, .text tfoot > tr > td:first-child, .text thead > tr > th:first-child {background: #CCCCCC;}
.thead > div > div:first-child, .wnv > .thead > div > div:last-child, .text thead > tr:first-child > th:first-child, .text table > *:first-child > *:first-child > td:first-child {background: #B3B3B3;}

.tbody > a:nth-child(even) > div:first-child, .wnv > .tbody > a:nth-child(even) > div:last-child, .text tbody > tr:nth-child(even) > td:first-child {background: #C4C4DA;}
.tbody > a:nth-child(odd) > div:first-child, .wnv > .tbody > a:nth-child(odd) > div:last-child, .text tbody > tr:nth-child(odd) > td:first-child {background: #c3d4da;}

.tbody > a:nth-child(even) > div:not(:first-child), .text tbody > tr:nth-child(even) > td:not(:first-child) {background: #d9d9d9;}
.tbody > a:nth-child(odd) > div:not(:first-child), .text tbody > tr:nth-child(odd) > td:not(:first-child), .govmarked {background: #f2f2f2;}

.tbody > a:nth-child(even).red > div:first-child {background: #DAAEAE;}
.tbody > a:nth-child(odd).red > div:first-child {background: #DAC4C4;}

.table a:nth-child(even) > div.highest {background: #afdaaf;}
.table a:nth-child(odd) > div.highest {background: #c3dac3;}
.table a:nth-child(even) > div.lowest {background: #DAAEAE;}
.table a:nth-child(odd) > div.lowest {background: #DAC4C4;}

.tbody > a:hover > div:first-child, .tbody > a:hover > div:not(:first-child), .tbody > a.marked:hover > div:first-child, .tbody > a.marked:hover > div:not(:first-child), .wnv > .tbody > a:hover > div:last-child {background: #FFBE4C;}
.tbody > a:active > div:first-child, .tbody > a:active > div:not(:first-child), .tbody > a.marked:active > div:first-child, .tbody > a.marked:active > div:not(:first-child), .wnv > .tbody > a:active > div:last-child {background: #E6AB45;}

code {background: #DEDEDE;}
.bggreen {background: #aaffc3;}
.bgred {background: #fabebe;}
.table a.marked > div:first-child, .table a.marked > div:not(:first-child) {background: #ffe119;}


/* border */
.pg_div_chart_horizontal tr td {border-top: 1px solid #d3d3d3;}
.pg_div_chart_vertical > div > div:last-child {border-top: 1px solid #c0c0c0;}
main aside {border-top: 1px solid #a6a6a6;}
#footer {border-top: 1px solid #737373;}
.pg_div_chart_vertical > div > div:first-child > div:last-child:not(.nofph) {border-top: 1px solid red;}

#header nav {border-bottom: 1px solid #8c8c8c;}
main > nav, main aside {border-bottom: 1px solid #a6a6a6;}
#header > div {border-bottom: 1px solid #737373;}

#Wahlergebnis {border: 2px dashed red;}
#current_government.minority {border: 1px dashed red;}
#current_government.majority {border: 1px dashed cornflowerblue	;}
#current_government.majority.lessparty {border: 1px dashed green;}
#current_government.majority.otherfirst {border: 1px dashed fuchsia;}

a, a img, a:hover img {border: none;}
.pg_div_chart_horizontal tr:first-child td {border-top: none;}

table {border-spacing: 0;}

/* inner border */
.table > * > * > div, .text table td, .text table th {border-right: 1px solid grey; border-bottom: 1px solid grey;}
.tbody > a:first-of-type > div, .tbody > div + a > div, .text tbody > tr:first-child > td {border-top: 1px solid grey;}
.tbody > a:last-of-type > div, .text tbody > tr:last-child > td {border-bottom: 2px solid grey;}
.table > * > * > div:first-child, .text table td:first-child, .text table th:first-child {border-right: 2px solid grey;}
.wnv > * > * > div:last-child {border-left: 1px solid grey;}

/* outer border */
.thead > div > div, .text table > *:first-child > *:first-child > th, .text table > *:first-child > *:first-child > td {border-top: 1px solid black;}
.table > *:last-child > *:last-child > div, .text table > *:last-child > *:last-child > td {border-bottom: 1px solid black;}
.table > * > * > div:last-child, .text table td:last-child, .text table th:last-child {border-right: 1px solid black;}
.table > * > * > div:first-child, .text table td:first-child, .text table th:first-child {border-left: 1px solid black;}


/* Tabellendesign für Nicht-table-Elemente */
.pgu_table {
	display: table;
	margin: 0 auto;
}
.pgu_table > * {
	display: table-row;
}
.pgu_table > * > * {
	display: table-cell;
	vertical-align: middle;
	padding: 0.5em;
}


/* specials */
#rstv, .rstv {
	direction: rtl; unicode-bidi: bidi-override;
	
	-webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
	
	cursor: default;
}

.rotate90, .pg_svg_chart g.bars text, .pg_div_chart_vertical > div > div:first-child > div:first-child > div > div:first-child, .pg_svg_chart g.ordinate > text {
	transform: rotate(-90deg);
	-webkit-transform: rotate(-90deg);
	-moz-transform: rotate(-90deg);
	-ms-transform: rotate(-90deg);
	-o-transform: rotate(-90deg);
	filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);
}

#mysql_error {padding: 1em; font-weight: bold; background: #fabebe; text-align: center; line-height: 1.5; border-bottom: 1px solid #e6194b;}

.social_media_flex {display: flex; gap: 0.5em; flex-wrap: wrap; justify-content: center;}
.social_media_flex img {height: 1em; width: 1em; vertical-align: text-top;}


/* SVG */
.pg_svg_chart .graphs, .pg_svg_chart .areas, .svg_map .paths path {stroke-linejoin: round; stroke-linecap: round;}
.pg_svg_chart .axes {stroke-linecap: square;}

.pg_svg_chart circle, .pg_svg_chart .areas, .svg_map .paths path {stroke-width: 1;}
.pg_svg_chart .lines, .svg_map .paths rect, #pie_charts svg > *:last-child, .pie_chart svg > circle:last-child, .pie_chart svg > circle.inner {stroke-width: 2;}
.pg_svg_chart .wide, .pg_svg_chart .axes {stroke-width: 4;}
.pg_svg_chart .wider {stroke-width: 6;}
.pg_svg_chart .widest {stroke-width: 8;}
.pg_svg_chart .election line:first-child {stroke-width: 12;}
.pg_svg_chart .dasharray {stroke-dasharray: 0.5em;}

.pg_svg_chart .axes, .svg_map .paths path, .pg_svg_chart .election line:last-child, .pg_svg_chart .election circle, .pg_svg_chart .circles circle {stroke: black;}
.pg_svg_chart .lines {stroke: grey;}
.pg_svg_chart .graphs .widest, .pg_svg_chart .legend circle, .pg_svg_chart .areas {stroke: dimgrey;}
.pg_svg_chart .lines.dasharray, section.pie_chart svg > circle:last-child, .pie_chart svg > circle.inner {stroke: #c0c0c0;}
div.pie_chart svg > circle:last-child, #pie_charts svg > *:last-child {stroke: #d3d3d3;}

.pg_svg_chart .bars text.start {text-anchor: start;}
.pg_svg_chart .abscissa, .pg_svg_chart .ordinate > text, .svg_map .paths text {text-anchor: middle;}
.pg_svg_chart .bars text.end, .pg_svg_chart .ordinate > g {text-anchor: end;}

.pg_svg_chart .bars text:not(.filled), .pg_svg_chart .graphs, .pg_svg_chart .bars rect, #pie_charts svg > *:last-child, .pie_chart svg > circle:last-child {fill: none;}
.pg_svg_chart > svg > rect:first-child {fill: #e6e6e6;}
.pg_svg_chart .bars:hover text, .svg_map .paths .black {fill: black;}
.pg_svg_chart .bars:hover text.white, .pg_svg_chart .bars text.white.filled, .svg_map .paths .white, .pg_svg_chart .ordinate rect {fill: white;}
.pg_svg_chart .election line:first-child {stroke: white; opacity: 0.66;}
.pie_chart svg > circle.inner {fill: white; opacity: 0.95;}
.pg_svg_chart g.marked rect {fill: #fffac8;}
.pg_svg_chart .abscissa a text {fill: blue;}
.pg_svg_chart .abscissa a:hover text {fill: red;}

.pg_svg_chart .bars rect {pointer-events: all;}

.svg_map .paths rect.black {stroke: white; opacity: 0.5;}
.svg_map .paths rect.white {stroke: black; opacity: 0.66;}
.svg_map .paths a:hover rect {opacity: 1; stroke-width: 3;}

#pie_charts svg > path.filledcircle {stroke-width: 1; stroke: #d3d3d3; fill: none;}
#pie_charts svg > line {stroke-width: 1; stroke-dasharray: 2.5; stroke: #ff0000;}
.pie_chart svg > line {stroke-width: 2; stroke-dasharray: 3; stroke: #FFFFFF;}
.pie_chart svg g > line {stroke-width: 2; stroke: #FFFFFF;}


/* Neu */

#Metadaten {padding: 0.5em 0em;}
#Metadaten tr {display: inline-table; padding: 0em 0.5em;}
#Metadaten td {padding: 0.25em; line-height: 1.25; font-size: 0.875em;}
#Metadaten td:first-child {text-align: right; font-weight: bold;}
#Metadaten td:last-child {text-align: left;}
#Metadaten ul {list-style-type: none; margin: 0; padding: 0;}


/* Druckansicht */
@media print {
	#header, #footer, main aside, main > nav, article > header > nav, header form, #pie_charts + div {display: none;}
	.pg_svg_chart .bars text:not(.filled) {fill: black;}
	.pg_svg_chart .bars text.white {fill: white;}
}