

@font-face {
  font-family: 'Open Sans Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 300 800;
  font-stretch: 75% 100%;
  src: url(fonts/open-sans_5.2.7_latin-wdth-normal.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

:root {
    --border-clr: #e4e0d6;
    --tabbar-btn-height: 50px;
}

html {
    font-family: "Open Sans Variable", system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.5em;
    scroll-behavior: smooth;

    background-color: #f7f3e8;
    color: #2f2f2d;

    height: 100%;
    overflow-y: scroll;

}
body {
    margin: 0;
}
* {
    box-sizing: border-box; /* include padding and border in widths */
}
p {
    margin: 0;
    padding: 0;
}
ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
}
li {
    margin: 0;
    padding: 0;
}
a {

}

#container {
    max-width: 900px;
    margin: auto;
    position: relative;
    padding-bottom: var(--tabbar-btn-height);
}


#header {
    display: flex;
    gap: 10px;
    border-bottom: solid 1px var(--border-clr);
    padding: 10px 20px;
    font-size: 14px;
}
#header .back-btn {
    text-decoration: none;
    color: inherit;
}
#header .spacer {
    flex-grow: 1;
}
#header .sync-btn {
    padding: 5px 10px;
    line-height: 1em;
    border-radius: 5px;
    background-color: var(--border-clr);
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    color: inherit;
    font-size: 14px;
    border: none;
}
#header .icon {
    display: flex;
    height: 100%; /* grow to line height */
    align-items: center; /* center vertically */
}

#header .gestemd-btn {
    display: flex;
    /* align-items: center; */
    gap: 10px;
    padding: 5px 10px;
    line-height: 1em;
    border-radius: 5px;
    border: none;
    background-color: var(--border-clr);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}
#header .gestemd-btn:hover {
    background-color: #d4d0c6;
}
#header .gestemd-btn.active {
    /* background-color: #c4c0b6; */
}
#header form.fractie-filter {
    display:flex;
}
#header form.fractie-filter input {
    width: 100%;
    min-width: 40px;
    border-radius: 5px;
    border: solid 1px #e4e0d6;
}
#header form.zoek-filter {
    display: flex;
    gap: 5px;
}
#header form.zoek-filter input[type="search"] {
    width: 100%;
    min-width: 80px;
    border-radius: 5px;
    border: solid 1px #e4e0d6;
    padding: 0 8px;
}
#header form.zoek-filter button {
    padding: 5px 10px;
    line-height: 1em;
    border-radius: 5px;
    border: none;
    background-color: var(--border-clr);
    cursor: pointer;
    display: flex;
    align-items: center;
}
#header form.zoek-filter button:hover {
    background-color: #d4d0c6;
}

#moties {

}
.activiteit-header {
    padding: 10px 20px;
    font-size: 12px;
    color: #767160;
    border-bottom: solid 1px var(--border-clr);
    text-align: center;
}

.motie {
    padding: 20px 20px;
    border-bottom: solid 1px var(--border-clr);;
    font-size: 14px;
}
.motie.heeft-stem {
    /* opacity: 0.7; */
}
.motie:last-child {
    border-bottom: none;
}
.motie .titel {
    font-family: "Open Sans Variable";
    font-weight: 600;
    font-stretch: 75%;
    color: #767160;
    font-size: 16px;
    position:relative;
}
.motie .titel .icon {
    opacity: 0.6;
    vertical-align: middle;
    margin-left: 5px;
}
.motie .titel .bookmark {
    cursor: pointer;
    display: inline-block;
    color: inherit;
    transition: color 0.2s ease;
}
.motie.bookmarked .titel .bookmark {
    color: #403d35;
}
.motie.bookmarked .titel .bookmark svg {
    fill: currentColor;
}
.bookmarks .motie {
    transition: opacity 0.2s ease;
}
.bookmarks .motie:not(.bookmarked) {
    opacity: 0.5;
}
.motie .titel .icon svg {

}
.motie .subtitel {
    font-family: "Open Sans Variable";
    font-weight: 400;
    /* font-stretch: 85%; */
    color: #767160;
    font-size: 12px;
}

.motie .avatar {
    float: right;
    margin-left: 10px;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: solid 3px white;
    shape-outside: circle(50%); /* flow text around a circle */
    object-fit: cover;
    object-position: center 10%;
}

.motie .stemming .resultaat {
    margin-top: 10px;
    margin-bottom: 10px;
    font-weight: 500;
}
.motie .stemming .resultaat.aangenomen,
.motie .stemming .resultaat .aantal-voor {
    color: #6a8046;
}
.motie .stemming .resultaat.verworpen,
.motie .stemming .resultaat .aantal-tegen {
    color: #7c2e2e;
}

.motie .stemming .details {
    display: flex;
    flex-direction: row;

}
.motie .stemming .details .groep {
    width: 50%;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 5px;
    align-items: flex-start;
    align-content: flex-start;
}
.motie .stemming .details .groep.voor {
    padding-right: 10px;
}
.motie .stemming .details .groep.tegen {
    padding-left: 10px;
    /* border-left: solid 1px var(--border-clr); */
}

.motie .stemming .details .groep .fractie {
    border-radius: 5px;
    padding: 5px;
    text-align: center;
    width: calc(50% - 2.5px); /* TODO: multiple columns on wider screens */
    overflow: hidden;
    /* font-size: 12px; */
    line-height: 1em;

    white-space: nowrap;
    overflow: hidden;
}

.motie .stemming .details .groep.voor .fractie {
    background-color: #abcb7b;
    color: #2a3521;
}
.motie .stemming .details .groep.tegen .fractie {
    background-color: #f38482;
    color: #5a2121;
}

#motie .stemming {
    margin-bottom: 20px;
}
#motie a.bron-link {
    float: right;
    padding: 0 0 10px 10px;
    color: #767160;
}
#motie a.bron-link:hover {
    color: black;
}

/* Dialog styling */
.motie .more {
    font-weight: bold;
    cursor: pointer;
    color: #767160;
}
.motie .more:hover {
    color: inherit;
}
.motie dialog {
    border: none;
    border-radius: 8px;
    padding: 20px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    font-size: 12px;
}
.motie dialog hr {
    border: none;
    border-bottom: solid 1px var(--border-clr);
}
.motie dialog::backdrop {
    background-color: rgba(0, 0, 0, 0.5);
}
.motie dialog .original {
    /* white-space: pre-wrap; */
}
.motie dialog .close-btn {
    margin-top: 10px;
    display: block;
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 5px;
    background-color: var(--border-clr);
    cursor: pointer;
    font-size: 14px;
}
.motie dialog .close-btn:hover {
    background-color: #d4d0c6;
}
.motie dialog .close-btn:focus {
    outline: none;
}

/* Voting buttons */
.motie .mijn-stem {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}
.motie .mijn-stem button {
    width: 50%;
    padding: 5px;
    line-height: 1em;
    border-radius: 5px;
    border: none;
    background-color: var(--border-clr);
    cursor: pointer;
    text-align: center;
    font-size: inherit;
    font-family: inherit;
    color: inherit;
    font-weight: inherit;
}
.motie .mijn-stem button:hover {
    background-color: #d4d0c6;
}
.motie .mijn-stem .voor-btn.gekozen {
    background-color: #abcb7b;
    color: #2a3521;
}
.motie .mijn-stem .tegen-btn.gekozen {
    background-color: #f38482;
    color: #5a2121;
}
.motie .mijn-stem button .checkmark {
    display: none;
}
.motie .mijn-stem button.gekozen .checkmark {
    display: inline;
}
.motie .mijn-stem button.pop {
    animation: popvote 0.3s ease-out;
}
@keyframes popvote {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

/* Error flash */
.motie.vote-error {
    animation: vote-error-flash 0.3s ease-out;
}

@keyframes vote-error-flash {
    0%, 100% { background-color: inherit; }
    50% { background-color: rgba(243, 132, 130, 0.3); }
}

/* Filter buttons */
.filters {
    display: flex;
    gap: 10px;
    padding: 10px 20px;
    border-bottom: solid 1px var(--border-clr);
}
.filters a {
    padding: 5px 10px;
    line-height: 1em;
    border-radius: 5px;
    background-color: var(--border-clr);
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    color: inherit;
    font-size: 14px;
}
.filters a:hover {
    background-color: #d4d0c6;
}
.filters a.active {
    background-color: #d4d0c6;
}

.controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    border-bottom: solid 1px var(--border-clr);
    padding: 10px 20px;
}
.controls form {
    display: flex;
}
.controls input {
    padding: 5px 10px;
    line-height: 1em;
    border-radius: 5px;
    background-color: var(--border-clr);
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    color: inherit;
    font-size: 14px;
    border: none;
}
.controls input[type="email"] {
    cursor: text;
    text-align: left;
    max-width: 100px;
    margin-right: 5px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 20px;
    border-top: solid 1px var(--border-clr);
}
.pagination-btn {
    padding: 5px 15px;
    line-height: 1em;
    border-radius: 5px;
    background-color: var(--border-clr);
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    color: inherit;
    font-size: 14px;
}
.pagination-btn:hover:not(.disabled) {
    background-color: #d4d0c6;
}
.pagination-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.pagination-info {
    font-size: 14px;
    color: #767160;
}



.motie a {
    text-decoration: none;
    color: inherit;
}
.motie a:hover {
    text-decoration: underline;
}

/* Back link */
.controls .back-link {
    text-decoration: none;
    color: inherit;
    font-size: 14px;
}
.controls .back-link:hover {
    text-decoration: underline;
}


.motie ul.debat-moties {
    list-style: inside;
    padding: 0;
    margin: 0;
    margin-bottom: 20px;
}
.motie ul.debat-moties li {
    margin-bottom: 4px;
}
.motie ul.debat-moties li.current {
    opacity: 0.6;
}
.motie tr.old {
    opacity: 0.6;
}
.motie td:first-child {
    white-space: nowrap;
}

.motie .full-text {
    /* white-space: pre-wrap; */
    font-size: 12px;
    background-color: rgb(240, 236, 224);
    padding: 15px;
    margin: 20px 0;
    border-left: solid 3px #d4d0c6;
}
.motie .admin-action input[type="submit"] {
    padding: 5px 10px;
    border: none;
    border-radius: 5px;
    background-color: #767160;
    color: white;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    float: right;
}
.motie .admin-action input[type="submit"]:hover {
    background-color: #5f5a4d;
}


#tabbar-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
}
#tabbar {
    width: 100%;
    max-width: 900px;
    display: flex;
    gap: 10px;
    margin-left: auto;
    margin-right: auto;
    
    background-color: rgba(247, 243, 232, 0.73);
    backdrop-filter: blur(10px);

    box-shadow: 0px 0px 5px 0px rgba(0,0,0,0.3);
}
#tabbar a.btn {
    text-decoration: none;
    color: inherit;
}
#tabbar .btn {
    flex-grow: 1;
    flex-shrink: 1;
    align-content: center;
    text-align: center;

    font-family: "Open Sans Variable";
    font-weight: 600;
    font-stretch: 75%;
    line-height: 1em;
    color: #767160;
    cursor: pointer;
    min-height: var(--tabbar-btn-height);
}
#tabbar .btn:hover {
    color: black;
}
    


@media (min-width: 920px) {
    #tabbar-container {
        left: 0;
        top: 0;
        bottom: auto;
        right: 0;
        height: 0;
    }

    #tabbar-container #tabbar {
        margin-left: calc(50% - 450px);
        width: 60px;
        flex-direction: column;
        height: auto;
        border-radius: 5px;
        margin-top: 10px;
        border-radius: 0;
        border-right: solid 3px #e4e0d6;
        background-color: transparent;
        box-shadow: none;
    }

    #container {
        padding-left: 60px;
    }
}

/* Account/Login pages */
#account {
    padding: 20px;
    font-size: 14px;
}
#account p {
    margin-bottom: 15px;
}
#account form {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}
#account input[type="email"],
#account input[type="text"],
#account input[type="number"] {
    padding: 5px 10px;
    border: solid 1px var(--border-clr);
    border-radius: 5px;
    font-size: 14px;
    font-family: inherit;
    background-color: white;
}
#account input[type="email"]:focus,
#account input[type="text"]:focus,
#account input[type="number"]:focus {
    outline: none;
    border-color: #767160;
}
#account input[type="submit"] {
    padding: 5px 10px;
    border: none;
    border-radius: 5px;
    background-color: #767160;
    color: white;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
}
#account input[type="submit"]:hover {
    background-color: #5f5a4d;
}
#account .error {
    color: #a00;
}
#stats {
    padding: 20px;
    font-size: 14px;
}

table {
    margin-bottom: 20px;
}
table th,
table td {
    text-align: left;
    font-weight: inherit;
    font-size: inherit;
    vertical-align: top;
}
table th {
    font-family: "Open Sans Variable";
    font-weight: 600;
    font-stretch: 85%;
}
.matrix-wrapper {
    overflow-x: auto;
    margin-bottom: 20px;
}
table.matrix {
    table-layout: fixed;
    width: 100%;
}
table.matrix th,
table.matrix td {
    padding: 4px 6px;
    text-align: center;
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
table.matrix .row-header {
    text-align: left;
    font-weight: 600;
    font-family: "Open Sans Variable";
    font-stretch: 85%;
}
table.matrix .matrix-cell {
    color: #2f2f2d;
}