:root {
    /* opaque version of rgba(111, 120, 135, 0.0375) */
    --pico-table-row-stripped-background-color: rgba(250, 250, 250, 1);
}

/* Login page ------------------------------------------------------------- */

.centered-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    text-align: center;
}

.logo {
    max-width: 200px;
    padding-bottom: 20px;
}

/* Nav -------------------------------------------------------------------- */

.nav-logo {
    max-width: 50px;
}

nav strong {
    font-size: 2rem;
}

/*These two make the nav dropdown look more aligned*/
nav details.dropdown {
    margin: 0px;
}
nav details.dropdown > summary:not([role]) {
    padding: calc(
            var(--pico-nav-link-spacing-vertical) - var(--pico-border-width)
        )
        var(--pico-nav-link-spacing-horizontal);
}

@media (max-width: 576px) {
    .wide-menu {
        display: none;
    }

    .narrow-menu {
        display: flex;
    }
}

@media (min-width: 576px) {
    .wide-menu {
        display: flex;
    }

    .narrow-menu {
        display: none;
    }
}

/* Landing page dashboard cards ------------------------------------------- */

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.dashboard-card {
    display: flex;
    flex-direction: column;
    margin: 0;
    height: 100%;
}

.dashboard-card p {
    flex-grow: 1;
}

.dashboard-card a {
    text-decoration: none;
}

/* Layout helpers --------------------------------------------------------- */

.section-container > * + * {
    padding-top: 2rem; /* Adds space above each child except the first */
}

.right-justify {
    margin-left: auto;
}

.tight {
    margin: 0px;
}

.fill-width {
    width: 100%;
}

.fit-width {
    width: fit-content;
}

.no-wrap {
    white-space: nowrap;
}

.big-center {
    font-size: 1.5rem;
    text-align: center;
    margin: 10px;
}

.flex-container {
    display: flex;
    flex-wrap: wrap;
}

.flex-container-align-center {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    align-content: center;
}

.flex-container-justify-center {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    align-content: center;
}

.flex-container-space {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    align-content: flex-start;
}

/* Tables ----------------------------------------------------------------- */

.table-container {
    overflow-x: auto;
    position: relative;
}

table {
    border-collapse: collapse;
}

th {
    vertical-align: bottom;
    text-align: center;
}

td {
    padding: 6px 3px;
    text-align: center;
}

td button {
    padding: 6px 6px;
}

/* See js/sort_table.js */
th[data-sort-direction="asc"]::after {
    content: " ▲";
}
th[data-sort-direction="desc"]::after {
    content: " ▼";
}

/* Dialogs ---------------------------------------------------------------- */

dialog article {
    width: inherit;
}

.dialog-button button {
    margin: 0px 6px;
}

footer.button-footer {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
}

button.button-footer {
    display: flex;
    width: fit-content;
    padding: 6px 8px;
    margin-bottom: 0px;
}

/* Misc ------------------------------------------------------------------- */

details {
    margin: var(--pico-form-element-spacing-vertical) 0;
}

.error-message {
    color: var(--pico-color-red-500);
}

.placeholder-note {
    color: var(--pico-muted-color);
    font-style: italic;
}
