body {
	margin: 0;
	padding: 0;
	line-height: 2em;
	font-family: Arial;
	font-size: 1em;
	color: #191919;
}

#logo {
	width: 99%;
	text-align: right;
	padding-top: 5px;
	margin: 0 auto 1em auto;
	display: block;
}

#heading {
	font-size: 24px;
	margin-bottom: 0.5em;
}

#timeline_menu {
	display: none;
}

/*table formatting*/

table {
	table-layout: fixed;
	border-collapse: collapse;
	font-size: 0.8em;
	width: 100%;
}

.fused {
	font-size: 0.8em;
}

th, td {
	min-width: 60px;
	padding: 5px;
	border-style: solid;
	border-width: 1px;
	border-color: #d3d3d3;
}

th {
	text-align: center;
}

table.total thead, table.single thead, table.single_change thead, table.sitze thead {
	display: none;
}

table.total tr, table.single tr, table.single_change tr, table.sitze tr {
	display: block;
	margin-top: 1em;
}

table.total tr.sort {
	display: none;
}

table.total td, table.single td, table.single_change td, table.sitze td {
	display: block;
	text-align: right;
	position: relative;
}

table.total td:nth-child(4n +9), table.total td:nth-child(4n+8) {
	background-color: transparent;
}

table.total td:nth-child(2), table.total td:nth-child(4), table.total td:nth-child(4n+7), table.total td:nth-child(4n+6) {
	background-color: #f0f0f0;
}

table.total td:nth-child(2n+6) {
	border-bottom-style: none;
}

table.total td:nth-child(2n+7) {
	border-top-style: none;
}

table.single td:nth-child(even), table.single_change td:nth-child(even), table.sitze td:nth-child(even) {
	background-color: #f0f0f0;
}

table.total td:nth-of-type(1), table.single td:nth-of-type(1), table.single_change td:nth-of-type(1) {
	font-weight: bold;
	/*padding-left: 24px;*/
	text-align: left;
}

table.total td:nth-of-type(2):before {
	content: "Wahlberechtigte"; 
}

table.total td:nth-of-type(3):before {
	content: "abgegeben";
}

table.total td:nth-of-type(4):before {
	content: "Wahlbeteiligung";
}

table.total td:nth-of-type(5):before {
	content: "gültig";
}

table.total td:nth-of-type(6):before {
	content: "ungültig";
}

table.single td:nth-of-type(2):before {
	content: "(Teil)Ergebnis"; 
}

table.single_change td:nth-of-type(2):before {
	content: "von"; 
}

table.single_change td:nth-of-type(3):before {
	content: "auf"; 
}

table.single_change td:nth-of-type(4):before {
	content: "(Teil)Ergebnis"; 
}

table.single_change td:nth-of-type(6):before {
	content: "Stimmen"; 
}

table.single_change td:nth-of-type(7):before {
	content: "Prozentpunkte"; 
}

td:before { 
	position: absolute;
	left: 6px;
	width: 50%; 
	padding-right: 10px;
	white-space: nowrap;
	text-align: left;
}

td > span {
	display: inline;
	position: absolute;
	left: 6px;
	padding-right: 10px;
	white-space: nowrap;
}


table.total td.na {
	text-align: right;
}
/* table formatting end */


.subhead {
	font-size: 1.2em;
	margin-top: 1em;
	padding: 0.8em;
	background-color: #f0f0f0;
	color: #333333;
	border-top-color: #333333;
	border-top-width: 1px;
	border-top-style: solid;
	border-bottom-color: #333333;
	border-bottom-width: 1px;
	border-bottom-style: solid;
}

.subhead.second {
	margin-top: 4em;
	padding: 0.8em;
}

.dist {
	margin-left: 1.5em;
}

.texte {
	max-width: 800px;
}

.buttons {
	margin-top: 1.5em;
}

#buttons_main {
	margin: 3em 0 1.5em 0;
	padding: 0.8em;
	font-size: 1.2em;
	background-color: #f0f0f0;
	border-top-color: #333333;
	border-top-width: 1px;
	border-top-style: solid;
	border-bottom-color: #333333;
	border-bottom-width: 1px;
	border-bottom-style: solid;
}

.button {
	background-color: #f0f0f0;
	margin-right: 0.5em;
	padding: 0.4em;
	cursor: pointer;
	display: block;
	border-radius: 5px;
	border: 1px solid transparent;
}

.button:hover, .button.pressed {
	background-color: #616161;
	color: #f9f9f9;
	border: 1px solid #f0f0f0;
}

.button.pressed {
	pointer-events: none;
}

label, input {
	cursor: pointer;
}

.disabled {
	color: #d3d3d3;
	pointer-events: none;
}

.gesamt {
	font-weight: bold;
}

.gem_spec {
	margin-left: 1em;
}

#result_single, #result_total, #result_timeline, #datenbestand, #sitze {
	width: 95%;
	margin: 1.5em auto 1.5em auto;
}

#datenbestand {
	display: none;
}

#result_single, #result_total, #result_timeline, #sitze {
	overflow-x: auto;
	padding-bottom: 5px;
}

.no_result {
	font-weight: bold;
	color: #d40000;
}

.sub {
	margin-top: 1.5em;
	margin-bottom: -0.5em;
	font-style: italic;
	text-decoration: underline;
}

.cols {
	display: inline-block;
	min-width: 240px;
	margin-top: 0;
	vertical-align: top;
}

.cols:first-child {
	/*margin-top: 1em;*/
}

.outer {
	display: inline-block;
	vertical-align: top;
	margin-top: 1.5em;
}

.fields {
	display: inline-block;
	min-width: 480px;
}

.fields.down {
	text-align: center;
}

#footer {
	margin-top: 1em;
	font-size: 0.8em;
	line-height: 1.5em;
	word-wrap: break-word;
}

.results {
	width: 97%;
	margin: 0 auto 0 auto;
}

.load {
	border-style: solid;
	border-width: 10px;
	border-color: #f0f0f0;
	border-top-color: #6D6D6C;
	border-radius: 50%;
	width: 40px;
	height: 40px;
	overflow-y: hidden;
	animation: spin 2s linear infinite;
}

@keyframes spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

#small_sortier {
	margin-top: 1em;
	visibility: hidden;
}

#downloads, #show_all, #anmerkungen {
	font-size: 0.8em;
	display: none;
}

#show_all, .links {
	margin-bottom: 1em;
	text-decoration: underline;
	cursor: pointer;
}

a {
	color: #000000;
}

a:hover, a:active, #show_all:hover, .links:hover {
	color: #FCAF17;
}

#bezirke_gemeinden {
	margin-top: 1em;
	margin-bottom: 1em;
	display: none;
}


@media screen and (min-width: 480px) {
	#result_single, #result_total, #result_timeline, #datenbestand, #sitze {
		width: auto;
		margin-left: 0;
		margin-right: 0;
	}

	.results {
		margin-left: 1.5em;
		width: auto;
	}

	.cols {
		/*margin-top: 1em;*/
	}

	.button {
		display: inline-block;
	}

	table {
		width: auto;
	}

	table.total tr:nth-child(even) {
		background-color: #f0f0f0;
	}

	table.single tbody > tr:nth-child(odd), table.single_change tbody > tr:nth-child(odd) {
		background-color: #f0f0f0;
	}

	table.total td {
		text-align: right;
	}

	table.total td:first-child {
		min-width: 125px;
	}

	table.total td:nth-child(2), table.total td:nth-child(4), table.total td:nth-child(4n+7), table.total td:nth-child(4n+6) {
		background-color: transparent;
	}

	table.total td:nth-child(2n+6) {
		border-bottom-style: solid;
	}

	table.total td:nth-child(2n+7) {
		border-top-style: solid;
	}

	table.single td:nth-child(even), table.single_change td:nth-child(even), table.sitze td:nth-child(even) {
		background-color: transparent;
	}

	table.total th {
		cursor: help;
		position: sticky;
		top: 0;
		background-clip: padding-box;
		background-color: #f0f0f0;
		z-index: 2;
	}

	table.total thead, table.single thead, table.single_change thead, table.sitze thead	{
		display: table-header-group;
	}

	table.total tr, table.single tr, table.single_change tr, table.sitze tr {
		display: table-row;
		margin-top: 0;
	}

	table.total tr.sort {
		display: table-row;
		text-align: center;
	}

	tr.sort td, table.sitze td {
		text-align: center;
	}

	table.total td, table.single td, table.single_change td, table.sitze td {
		display: table-cell;
	}

	tr.sort > td {
		text-align: center !important;
	}

	tr.sort > td > span {
		display: inline;
		position: relative;
		cursor: pointer;
		text-align: center;
	}

	table.total td:nth-of-type(1), table.single td:nth-of-type(1), table.single_change td:nth-of-type(1) {
		font-weight: normal;
		padding: 5px;
	}

	td:before  {
		display: none;
	}

	tbody > tr:hover {
		background-color: #465C8B;
		color: #ffffff;
	}

	tr.sort:hover {
		background-color: transparent;
		color: #000000;
	}

	table.total tr:nth-child(even):hover, table.single tbody > tr:nth-child(odd):hover, table.single_change tbody > tr:nth-child(odd):hover {
		background-color: #465C8B;
	}

	table.single td, table.single_change td {
		text-align: left;
	}

	table.single_change td:nth-child(2), table.single_change td:nth-child(3) {
		text-align: center;
	}

	table.single td:nth-child(n+4) {
		text-align: right;
	}

	table.single_change td:nth-child(n+6) {
		text-align: right;
	}

	table.total td.na {
		text-align: center;
	}

	td > span {
		display: none;
	}

	#small_sortier {
		display: none;
	}

	#downloads {
		display: block;
	}

	#result_total, #result_timeline {
		max-height: 600px;
		overflow-y: auto;
	}

	#jsons, #csvs {
		cursor: pointer;
	}
}
