body {
    font-size: 26px;
    font-family: sans-serif;

    margin-left: 2em;
    margin-right: 2em;
    margin-top: 0.2em;
    --border-col: rgba(0,0,0,0.5);
    --vote-active-main: green;
    --vote-active-bg: #ddffdd;
    --vote-inactive-main: red;
    --vote-inactive-bg: #ffdddd;

    --text-col: #191716;
    --bg-col: #E0E2DB;
    --theme-col-1: #e6af2e;
    --theme-col-2: #3d348b;
    --theme-col-3: #beb7a4;

    background: var(--bg-col);
    color: var(--text-col);

    a, a:visited, a:link, a:hover, a:active {
        color: var(--theme-col-2);
    }
}

@media (prefers-color-scheme: dark) {
    body {
        --bg-col: #293241;
        --text-col: #e2fdfe;
        --theme-col-1: #ee6c4d;
        --theme-col-2: #787179;
        --theme-col-3: #3d5a80;
    }
}

main {
    .powered {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        text-align: center;
        font-size: 0.8em;
        color: var(--theme-col-3);
    }

    &.meet {
        &.login {
            div.info {
                font-weight: 500;
            }
            div.gdpr {
                font-style: italic;
                margin: 2em 0;
            }
            div.form {
                border: 1px solid var(--text-col);
                margin-top: 0.2em;
                padding: 0.7em 1em;
                border-radius: 0.5em;
            }
            label {
                font-weight: 500;
            }
            input[type="email"] {
                margin-left: 2em;
                margin-right: 2em;
                font-size: 26px;
            }
            input[type="button"] {
                margin-top: 0.6em;
                padding: 0.1em 0.5em;
                display: block;
                font-size: 0.8em;
                border-radius: 6px;
                background: var(--text-col);
                color: var(--bg-col);
                font-size: 1em;
                font-weight: 500;
            }
        }

        &.enter-name {
            input[type="text"] {
                font-size: 26px;
            }
            input[type="button"] {
                margin-top: 0.6em;
                padding: 0.1em 0.5em;
                display: block;
                font-size: 0.8em;
                border-radius: 6px;
                background: var(--text-col);
                color: var(--bg-col);
                font-size: 1em;
                font-weight: 500;
            }
        }

        &.meeting {
            --border-col: var(--theme-col-2);
            --vote-color: var(--theme-col-3);

            .comment {
                margin-top: 2em;
                margin-bottom: 2em;
            }

            table.vote-table {
                border-collapse: separate;
                border-spacing: 0;
                table-layout: fixed;

                .dateheader {
                    box-sizing: border-box;
                    vertical-align: bottom;
                    font-size: 0.5em;
                    display: inline-flex;
                    flex-direction: column;
                    justify-content: center;
                    height: 3em;
                    min-width: 8.5em;
                    background: var(--theme-col-3);
                    border-top-right-radius: 0.5rem;
                    border-top-left-radius: 0.5rem;
                    border-top: 1px solid var(--border-col);
                    border-left: 1px solid var(--border-col);
                    border-right: 1px solid var(--border-col);
                    margin-left: -1px;
                    margin-right: -1px;
                    margin-bottom: -1px;
                }

                th.chosen {
                    position: relative;
                    &::after {
                        position: absolute;
                        top: -1.1em;
                        left: 0;
                        right: 0;

                        content: "↓";
                        font-size: 1.8em;
                        color: var(--theme-col-1);
                    }
                }

                td.vote {
                    padding: 0.2em;
                    user-select: none;
                }
                div.vote {
                    display: inline-block;
                    border-radius: 50%;
                    border-width: 3px;
                    border-style: solid;
                    width: 1.4em;
                    color: var(--vote-inactive-main);
                    border-color: var(--vote-inactive-bg);
                    background-color: var(--vote-inactive-bg);
                    &.active {
                        color: var(--vote-active-main);
                        border-color: var(--vote-active-bg);
                        background-color: var(--vote-active-bg);
                    }
                }
                td.name { 
                    background: var(--theme-col-3);
                    padding-left: 0.4em;
                    padding-right: 0.6em;
                }
                td.blank {
                    max-height: 10px;
                    height: 10px;
                    font-size: 0.5em;
                }
                tr:nth-child(2) {
                    td {
                        border-top: 1px solid var(--border-col);
                    }
                    td:first-child {
                        border-top-left-radius: 1.0rem;
                    }
                }
                tr:nth-last-child(2) {
                    td {
                        border-bottom: 1px solid var(--border-col);
                    }
                    td:first-child {
                        border-bottom-left-radius: 1.0rem;
                    }
                }
                tr:nth-child(n+2) {
                    td:first-child {
                        border-left: 1px solid var(--border-col);
                    }
                    td:last-child {
                        border-right: 1px solid var(--border-col);
                    }
                }
                tr.my-user {
                    --vote-color: var(--theme-col-1);
                    td {
                        border-bottom: 1px solid var(--border-col);
                    }
                    td:first-child {
                        border-top-left-radius: 1.0rem;
                        border-bottom-left-radius: 1.0rem;
                    }
                    td:last-child {
                        border-bottom-right-radius: 1.0rem;
                    }
                    td.vote {
                        position: relative;
                        &:not(.locked) {
                            cursor: pointer;
                        }
                    }
                    td.vote.locked::before {
                        content: "🔒";
                        text-shadow: 1px 1px 4px black;
                        position: absolute;
                        top: 0;
                        left: 5px;
                    }
                    div.vote {
                        border-color: var(--vote-inactive-main);
                        &.active {
                            border-color: var(--vote-active-main);
                        }
                    }
                    td.name {
                        background-color: var(--theme-col-1);
                    }
                }
                td:nth-child(2n+3) {
                    background-color: var(--vote-color);
                }
                td:nth-child(2n+2) {
                    background-color:  color-mix(in oklab, var(--vote-color), white 30%)
                }
                td:nth-child(n+2) {
                    text-align: center;
                }
            }
            input[type="button"] {
                position: fixed;
                top: 55px;
                right: 30px;
                padding: 0.1em 0.5em;
                display: block;
                border-radius: 6px;
                background: var(--theme-col-3);
                color: var(--text-col);
                font-size: 0.8em;
                font-weight: 500;
            }
        }
    }

    &.admin {
        &.meeting {
            div.slots {
                display: inline-flex;
                flex-direction: column;
                row-gap: 5px;

                div.slot {
                    text-align: center;
                    display: flex;
                    column-gap: 20px;
                    border: 1px solid black;
                    border-radius: 10px;
                    background: #39397f;

                    &.add {
                        background: none;
                    }
                }
                div.from, div.to {
                    width: 200px;
                    background: #c9c9ff;
                    color: black;
                    border-radius: 10px;
                    border-color: #445599;
                    border-style: solid;
                    border-width: 0;
                }
                div.to {
                    border-left-width: 1px;
                }
                div.from {
                    border-left-width: 1px;
                }
            }
            div.emails {
                div {
                    background: #dedede;
                    color: black;
                    margin-bottom: 1em;
                }
            }
            table.users {
                th {
                    text-align: left;
                }

                th:nth-child(2),
                td:nth-child(2) {
                    padding-left: 1em;
                    padding-right: 1em;
                }
            }
            table.vote-table {
                margin-top: 2em;
                border-collapse: separate;
                border-spacing: 0;
                table-layout: fixed;

                .dateheader {
                    box-sizing: border-box;
                    vertical-align: bottom;
                    font-size: 0.5em;
                    display: inline-flex;
                    flex-direction: column;
                    justify-content: center;
                    height: 3em;
                    min-width: 8.5em;
                    background: var(--theme-col-3);
                    border-top-right-radius: 0.5rem;
                    border-top-left-radius: 0.5rem;
                    border-top: 1px solid var(--border-col);
                    border-left: 1px solid var(--border-col);
                    border-right: 1px solid var(--border-col);
                    margin-left: -1px;
                    margin-right: -1px;
                    margin-bottom: -1px;
                }

                td.vote {
                    padding: 0.2em;
                    user-select: none;
                }
                div.vote {
                    display: inline-block;
                    border-radius: 50%;
                    border-width: 3px;
                    border-style: solid;
                    width: 1.4em;
                    color: var(--vote-inactive-main);
                    border-color: var(--vote-inactive-bg);
                    background-color: var(--vote-inactive-bg);
                    &.active {
                        color: var(--vote-active-main);
                        border-color: var(--vote-active-bg);
                        background-color: var(--vote-active-bg);
                    }
                }
                td.name { 
                    background: var(--theme-col-3);
                    padding-left: 0.4em;
                    padding-right: 0.6em;
                }
                td.blank {
                    max-height: 10px;
                    height: 10px;
                    font-size: 0.5em;
                }
                td:nth-child(2n+3) {
                    background-color: var(--vote-color);
                }
                td:nth-child(2n+2) {
                    background-color:  color-mix(in oklab, var(--vote-color), white 30%)
                }
                td:nth-child(n+2) {
                    text-align: center;
                }
            }
        }
    }
}
