/* Allgemeines */
body {
    max-width: 70em;
    /* border: 1px solid black; */
    margin: 2em auto;
    color: black !important; /* gegen Bootstrap */
}

/* Die einzelnen Bereiche der Seite */
section.absatz, div#eingabemaske {
    padding: 2em;
    border: 1px solid black;
    margin: 1px;
}

@media (min-width: 55em) {
    section.absatz, div#eingabemaske {
        border-radius: 1.5em;
        margin: 1rem;
    }
}

section.absatz > div {
    margin-top: 1em;
}


div.headarea > div {
    text-align: center;
}

div.headingdiv {
    display: flex;
    flex-wrap: wrap-reverse;
    justify-content: space-between;
    align-items: center;

    margin-left: 1rem;
    margin-right: 1rem;
}
div.headingdiv div {
    /* text-align: center; */
}

h1 {
    margin: 0;
}

.erklaerungszusatz {
    margin-top: 1em;
    font-size: smaller;
}

/* Affenformular = Eingabe der Summen zur Kontrolle */
div#affenformular {
    display: flex;
    flex-wrap: wrap;
}

div#affenformular label  {
    margin: 1em;
}

div#affenformular input  {
    width: 7em;
}


/* Tabellen */
table {
    border-collapse: collapse;
    
    /* in der Druckansicht soll ein Seitenumbruch nicht innerhalb einer Tabelle sein */
    break-inside: avoid;
}

th, td {
    border: 1px solid black;
}

table#votes th, table#votes td {
    padding: 0.5em;
    border: none;
    border-top: 1px solid black;
}

tr.sum {
    font-weight: bold;
}

table.zwischenergebnis td:not(:first-child), table.result td:not(:first-child) {
    /* Zahlen rechtsbuendig ausrichten */
    text-align: right;
}


/* Eingabe der Stimmen */
table.result th, table.result td {
    padding: 0.1em 0.4em;
}

input.direktmandate {
    width: 5em;
}

input.stimmen {
    width: 6em;
}

th, td {
    /* padding: .1em; */
}

tr.voteSum {
    text-align: right;
}

input.parteiname {
    /*
    min-width: 8em;
    max-width: 10em;
    */
}

input.direktmandate {
    margin-left: 1em;
}

.reserveliste {
    transform: scale(1.3);
    /* width: 100%; */
}

td.checkboxcontainer {
    text-align: center;
}

output#gesamtmandate {
    margin-right: 1em;
}

div#fehlerausgabe {
    color: red;
}

/* Berechnete Zahlen im Text umrahmen */
span.divisor {
    border: 1px solid black;
}

/* Los */
div.losbtns {
    /* border: 1px solid black; */
}

button.losbtn {
    margin: 1em;
    padding: 0.5em;
}

div.slots {
    display: flex;
    flex-wrap: wrap;
    margin: 1em;
}

div.slot {
    /* width: 4em; */
    /* height: 4em; */
    padding: 1.5em;
    border: 3px solid black; /* gap bei flexbox wird nur von Firefox unterstuetzt, daher nicht nutzbar */
}

div.slot:empty {
    padding-left: 7em;
    padding-top: 3em; /* gleiche Höhe, iwie nicht 2.5 sondern 3 em */
}

/*
 * alternatives layout
table div div {
    /*display: inline;* /
}
tbody > div {
    border: 1px solid black;
    display: inline;
}
tbody {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
}
*/


/* ausfuehrliche Rechnung anzeigen / verstecken */
body.hide_calc .zwischenergebnis {
    display: none;
}


/* fuer slider */
div.slidercontainer {
    display: flex;
    align-items: center;
    float: right;
}

div.slidercontainer label {
    margin: 0;
    margin-left: .5em;
}

/* toggle sliders, Quelle: https://www.w3schools.com/howto/howto_css_switch.asp */

.switch {
    position: relative;
    display: inline-block;
    width: 2em;
    height: 1em;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    /* TODO: keine Animation bei resize, nicht wenn prefers reduced motion */
    -webkit-transition: .3s;
    transition: .3s;
}

.slider:before {
    position: absolute;
    content: "";
    height: calc(1em - 8px);
    width: calc(1em - 8px);
    left: 4px;
    bottom: 4px;
    background-color: white;
    -webkit-transition: .3s;
    transition: .3s;
}

input:checked + .slider {
    background-color: #2196F3;
}

input:focus + .slider {
    box-shadow: 0 0 1px #2196F3;
}

input:checked + .slider:before {
    margin-left: 1em;
}

/* Rounded sliders */
.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

