:root {
    --header-font: 'Bricolage Grotesque', sans-serif;
    --body-font: 'Public Sans', sans-serif;
    --mono-font: 'Roboto Mono', monospace;
    --background-color: #fbf5ed;
    --highlight-color: #f0d962;
    --black: #000000;
}

h1,
h2,
h3,
h4 {
    font-family: var(--header-font);
    font-weight: bold;
    margin-top: 0;
    margin-bottom: 0.5em;
}

h1 {
    font-size: 2em;
}

h2 {
    font-size: 1.5em;
    margin: 0.83em 0;
}

h3 {
    font-size: 1.17em;
    font-weight: bold;
}

h4 {
    font-size: 1em;
    font-weight: bold;
}

body {
    display: grid;
    grid-template-areas: 'header header header'
        'main main main'
        'footer footer footer';
    grid-template-columns: 1fr 1fr 300px;
    grid-template-rows: auto 1fr auto;
    min-height: 100vh;
    background: var(--background-color);
    font-family: var(--body-font);
    font-optical-sizing: auto;
    font-style: normal;
}

body>header {
    grid-area: header;
    position: relative;
    z-index: 1000;
}

nav {
    background-color: var(--black);
}

nav i {
    color: var(--highlight-color);
}

nav .brand-logo {
    display: flex;
    align-items: center;
}

.brand-logo i {
    display: flex;
    align-items: center;
}

.brand-logo h1 {
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0;
}

.nav-img {
    width: 100%;
    height: auto;
    display: block;
    margin-bottom: 1rem;
}

.sidenav-overlay {
    z-index: 900;
}

.sidenav {
    z-index: 1002;
}

aside {
    padding: 1rem;
}

body>main {
    grid-area: main;
    overflow-x: auto;
    max-width: 100%;
}

main>article {
    flex: 1;
    padding: 1rem;
    min-width: 0;
}

main>aside {
    width: 300px;
    padding: 1rem;
}

body>footer {
    padding-top: 4rem;
    padding-bottom: 7rem;
    padding-left: 1rem;
    padding-right: 1rem;
    grid-area: footer;
    background-color: #0f0d0d;
    text-align: center;
    color: white;
}

body>footer a,
body>footer a:visited {
    color: #fff;
    text-decoration: underline;
}

body>footer h3 a {
    text-decoration: none;
    border-bottom: solid 1px var(--highlight-color);
}

.results-section {
    margin-bottom: 20px;
}

.results-table td.number-cell {
    font-family: var(--mono-font);
}

.map {
    display: flex;
    flex-direction: column;
}

.map .wrapper {
    min-height: calc(100vh - 80px);
    display: flex;
    flex-direction: column;
    padding-bottom: 3rem;
}

#map-container {
    flex: 1;
}


/* Abstimmungstag View Styles */
.abst-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.abst-filter-row {
    margin-top: 20px;
    margin-bottom: 20px;
}

.abst-header-title {
    margin: 0;
}

.abst-region-card {
    margin-bottom: 30px;
    padding: 20px;
}

.abst-region-title {
    margin-top: 0;
    border-bottom: 2px solid #ccc;
    padding-bottom: 10px;
}

.abst-vote-card-title {
    font-size: 1.1rem;
    line-height: 1.3;
    height: 3.9em;
    /* 3 lines */
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.abst-vote-results {
    margin-top: 15px;
}

.abst-vote-status-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.abst-vote-status-badge {
    float: none;
    margin: 0;
    border-radius: 4px;
}

.abst-vote-no-results {
    padding: 20px 0;
}

/* Result Bar */
.result-bar-container {
    position: relative;
    padding-bottom: 5px;
}

/* Adds a small gap to properly overlap the marker over the bar */
.result-bar-50-marker {
    position: absolute;
    left: 50%;
    top: -4px;
    /* Slightly above the bar */
    height: 16px;
    width: 1px;
    background-color: var(--black);
    z-index: 1;
}

.result-bar {
    height: 8px;
    display: flex;
    width: 100%;
    margin: 15px 0 10px 0;
    border-radius: 4px;
    overflow: hidden;
    background-color: var(--background-color);
    position: relative;
}

.canton-bar-row td {
    padding: 0 !important;
    border-bottom: 0 !important;
}

.canton-bar-cell {
    padding: 0 0 6px 0 !important;
}

.canton-mini-bar {
    height: 2px;
    /* pseudo border-bottom */
    width: 100%;
    display: flex;
    overflow: hidden;
    border-radius: 0;
    /* wirkt wie Border */
    background: transparent;
}

.canton-mini-bar>div {
    height: 100%;
}

table.compact {
    border-collapse: collapse;
}

table.compact td,
table.compact th {
    padding-top: 6px;
    padding-bottom: 0px;

}

table.inside td,
table.inside th {
    padding: 0.5rem;
}

table.inside tr {
    border-bottom: 1px solid #ddd;
}

.map-layout {
    margin-bottom: 0;
}

.footer-nav h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-weight: bold;
}

.footer-nav {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

.subtitle {
    font-size: 12px;
    font-family: var(--header-font);
    position: absolute;
    color: var(--highlight-color);
    line-height: 1;
    font-weight: bold;
    rotate: -12deg;
    text-shadow: var(--black) 3px 3px 2px;
    right: -4px;
    bottom: 3px;
}

.blue.lighten-3 {
    background-color: #8dd4da !important;
}

.btn,
.btn-floating {
    background-color: #99cda9;
}

.nr {
    font-family: var(--mono-font);
}

.yes {
    font-weight: bold;
}

.staende {
    display: flex;
}

.staende .stand {
    width: 4%;
    height: 1.0rem;
}

.staende .stand:nth-child(2n) {
    margin-left: 0.2rem;
}

.staende .stand.yes {
    background-color: #0b12cd;
}

.staende .stand.no {
    background-color: #e53935;
}

.form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}