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;
}

body>header {
    grid-area: header;
    z-index: 10;
}

aside {
    background-color: #f5f5f5;
    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 #f0d962;
}

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

.results-table td.number-cell {
    font-family: monospace;
}

.map {
    display: flex;
    flex-direction: column;
    background-color: white;
}

.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: #000;
    z-index: 1;
}

.result-bar {
    height: 8px;
    display: flex;
    width: 100%;
    margin: 15px 0 10px 0;
    border-radius: 4px;
    overflow: hidden;
    background-color: #e0e0e0;
    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 {
    background-color: #f5f5f5;
    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;
}