body {
    display: flex;
    flex-flow: column;
    min-height: 100vh;
}

.header {
    background: #4a6da7;
    color: #ffffff;
    font-size: 18pt;
    height: 1.8em;
    width: 100%;
    padding: 4px;
    text-align: center;

    img {
        margin-right: 10px;
        width: 1.4em;
    }
}

.menu {
    background: #87a8de;
    padding: 8px 4px 2px 4px;
    text-align: center;

    .nav-item {
        border-color: #ffffff;
        padding: 3px 6px;
        font-size: 18pt;
        width: 2em;

        span {
            color: #ffffff;
        }
    }

    .nav-item:hover {
        border-color: #000000;
    }
}

#scrollcontent {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-color: #87a8de #4a6da7;
    scrollbar-gutter: auto;
    flex: 1 1 auto;
}

#maincontent {
    padding: 1em;

    .page-options {
        display: flex;
        width: 100%;
        flex-flow: row wrap;
        align-content: flex-start;
        gap: 1em;
        margin-bottom: 1rem;
        align-items: baseline;
    }

    .page-table {
        display: flex;
        width: 100%;
        flex-flow: row wrap;
        align-content: flex-start;
        gap: 1em;
        margin-bottom: 1rem;
        

        .location, .congregation {
            width: 24%;
            min-width: 20em;
            border: solid 1px #000000;

            table {
                margin-bottom: 0px;
            }
            tr:hover {
                background-color: #87a8de;
            }
        }

        .schedule {
            width: 24%;
            min-width: 20em;

            h3 {
                font-size: 120%;
                padding: 0.5em 0.75em;
                margin-bottom: 0px;
                color: #ffffff;
            }
            table {
                margin-bottom: 0px;
            }
            tr:hover {
                background-color: #87a8de;
            }
        }
        .highlight {
            tbody tr:hover {
                background-color: #87a8de;
            }
        }
        .available, .rota {
            h3 {
                font-size: 120%;
                padding: 0.5em 0.75em;
                margin-bottom: 0px;
                color: #ffffff;
            }
            table {
                margin-bottom: 0px;
            }
            tr.person td:hover, tr.loc td:hover {
                background-color: #87a8de;
            }
        }

        .page-item.rota {
            /* width: 100%; */
            table {
                tr *:nth-child(1) {
                    width: 5em;
                }
                tr *:nth-child(n+2) {
                    min-width: max(6em, calc((100vw - 8em) / 12));
                    max-width: 16em;
                    /* min-width: 8em; */
                }
            }
        }

        div.day1 {
            border: solid 1px hsl(186, 49%, 35%);
            h3 {
                background-color: #2e7c85;
            }
            th {
                background-color: hsl(186, 49%, 70%);
            }
        }
        div.day2 {
            border: solid 1px hsl(74, 31%, 34%);
            h3 {
                background-color: #64703b;
            }
            th {
                background-color: hsl(74, 31%, 68%);
            }
        }
        div.day3 {
            border: solid 1px hsl(25, 73%, 47%);
            h3 {
                background-color: #ce6820;
            }
            th {
                background-color: hsl(25, 73%, 94%);
            }
        }
        .table-btn {
            background-color: #007bff;
            color: #ffffff;
        }
    }
}

#footer {
    background: #4a6da7;
    color: #ffffff;
    font-size: 6pt;
    /* height: 18px; */
    width: 100%;
    padding: 4px;
    text-align: center;
}

.modal-content {
    box-shadow: 4px 4px 10px #00000048;
}

.modal-header {
    background: #4a6da7;
    color: #ffffff;
    border-radius: 0px; /* override bootstrap because it leaves a white edge */
}

.modal-backdrop.show {
    opacity: 0.2;
}

.modal-body {
    /* this is not the best way of spacing but it works */
    table {
        width: 100%;
        table-layout: fixed;
        border-spacing: 0.5em;
        border-collapse: separate;

        tr {
            /* border-bottom: solid 0.5rem #ffffff00; */

            th {
                /* border-right: solid 1em #ffffff00; */
                width: max-content;
                min-width: 7em;
                word-break: break-word;
            }

            td {
                input[type=text] {
                    width: 100%;
                }
                select {
                    max-width: 100%;
                }
            }
        }
    }

    .attendants {
        display: flex;
        width: 100%;
        flex-flow: row wrap;
        align-content: flex-start;
        gap: 0.5em;
    }
}

#extra-buttons {
    display: flex;
    flex-flow: row wrap;
    gap: 0.5em 0.25em;
    margin-top: 6px;
}

@media screen and ((max-height: 500px) or (max-width: 700px)) {
    body {
        font-size: 10pt;
    }

    .header {
        font-size: 12pt;
    }

    .menu {
        font-size: 12pt;

        .nav-item {
            font-size: 12pt;
        }
    }
    
}