/* Allgemein */
:root {
    --voting-color-yes: hsl(111 100% 36%);
    --voting-color-no: hsl(0 79% 57%);
    --voting-color-bg: hsl(0 0% 97%);
    --voting-color-bg-hover: hsl(0 0% 94%);
    --voting-border-radius: 0px;

    --voting-color-election-bar-neutral: #3e73a7;
    --voting-color-election-bar-yes: var(--voting-color-yes);
    --voting-color-election-bar-no: var(--voting-color-no);
    --voting-color-election-bar-container: #dedede;

    --tiebreaker-color-more: var(--voting-color-yes);
    --tiebreaker-color-less: #dedede;
}
.back-button {
	display: inline-block;
    margin: 1.5em 0 0 !important;
}
.mod-voting table th {
	inline-size: 50%;
}

/* Liste */
.topic-entry {
	display: grid;
    grid-template-columns: 1fr auto;
    align-items: baseline;
    gap: 1em;
    padding: 1em;
    margin: 0 0 1em;
    background-color: var(--voting-color-bg);
    border-radius: var(--voting-border-radius);
}
.topic-entry:has(a):hover {
    background: var(--voting-color-bg-hover);
}
.topic-entry__header {
    display: grid;
}
.topic-entry__title {
    font-size: 1.25em;
    -webkit-hyphens: auto;
            hyphens: auto;
    hyphenate-limit-chars: 12 4 4;
}
.topic-entry__date {  
    grid-row: 1; 
}
.topic-entry__status {
    padding: 0 0.75em;
    border: 1px solid white;
    border-radius: 4px;
    background: var(--voting-color-bg-hover);
}

/* Detailseiten */
.voting-detail:has( + .voting-detail) {
    margin: 0;
}
.voting-detail__value {
    font-weight: bold;
}

.vote__block {
    margin-block-start: 3em;

    > *:last-child {
        margin-block-end: 0;
    }
}

/* Abstimmungsdetails */
.graphic-vote {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
        "title-yes title-no"
        "votes-bar votes-bar"
        "votes-yes votes-no";
    margin: 1.5em 0;
}
.graphic-vote__title--yes {
    grid-area: title-yes;
}
.graphic-vote__title--no {
    grid-area: title-no;
}
.graphic-vote__votes--yes {
    grid-area: votes-yes;
}
.graphic-vote__votes--no {
    grid-area: votes-no;
}
.graphic-vote__votes-bar-container {
    grid-area: votes-bar;
}
.graphic-vote__title {
	font-size: 1.25em;
    font-weight: bold;
    text-transform: uppercase;
}
.graphic-vote__votes {
    color: hsl(0 0% 40%)
}
.graphic-vote__title--no,
.graphic-vote__votes--no {
    text-align: right;
}
.graphic-vote__votes-bar-container {
	position: relative;
    display: grid;
}
.graphic-vote__votes-bar-container::after {
    content: "";
    position: absolute;
    left: 50%;
    top: -1em;
    bottom: -1em;
    border-right: 1px dashed  hsl(0 0% 0% / 70%);
}
.graphic-vote__votes-bar {
    height: 1.5em;
}
.graphic-vote__votes-bar--yes {
    background-color: var(--voting-color-yes);
}
.graphic-vote__votes-bar--no {
    background-color: var(--voting-color-no);
}

/* Wahldetails */
.election-entries:empty { /* keine einträge vorhanden */
    display: none;
}
.election-entries {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    gap: 1.5em .75em;
    margin: 1.5em 0;
}
.election-entry {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    grid-column: span 4;
    grid-template-areas:
        "img contact result icon"
        "bar bar bar bar";
    padding: .5em;
    background-color: var(--voting-color-bg);
}
@supports (grid-template-columns: subgrid) {
	.election-entry {
        grid-template-columns: subgrid;
    }
}
.election-entry__contact {
    grid-area: contact;
}
.election-entry__result {
    grid-area: result;
}
:is(.election-entry__contact, .election-entry__result) > *:last-child  {
    margin-block-end: 0;
}
.election-result {
    font-size: 1.25em;
}
.election-entry__result-icon {
    grid-area: icon;
    font-size: 2.4em;
}
.election-entry--elected .election-entry__result-icon {
    color: var(--voting-color-yes);
}
.election-entry--not-elected .election-entry__result-icon {
    color: var(--voting-color-no);
}
.election-entry__img {
    grid-area: img;
}
.election-entry__img img {
	width: var(--election-entry-img-size, 3em);
    height: var(--election-entry-img-size, 3em);
    aspect-ratio: 1;
    object-fit: cover;
    overflow: hidden;
    border-radius: 50%;
}
.election-entry__votes-bar-container {
    grid-area: bar;
    background-color: var(--voting-color-election-bar-container);
}
.election-entry__votes-bar {
    height: 1em;
    background-color: var(--voting-color-election-bar-neutral);
}
.election-entry--elected .election-entry__votes-bar {
    background-color: var(--voting-color-election-bar-yes);
}
.election-entry--not-elected .election-entry__votes-bar {
    background-color: var(--voting-color-election-bar-no);
}

/* Stichfragen */
.graphic-vote__votes-bar-container--tiebreaker {
    .graphic-vote__votes-bar--more {
        background-color: var(--tiebreaker-color-more);
    }
    .graphic-vote__votes-bar--less {
        background-color: var(--tiebreaker-color-less);
    }
}