/* Styles for the "my school users" list for teachers, staff and admins */

:root {
    --page-background: #f0eee1;

    --generic-border: #ccc;
    --generic-border-darker: #888;

    --search-background-color: #fff;

    --footer-fore: #777;

    --header-background: #fe9749;
    --header-background-hover: #ffa850;
    --button-border-hi: #fff;
    --button-border-lo: #888;
    --button-back: #ccc;
    --button-fore: #000;
    --button-back-hover: #ddd;
    --button-fore-hover: #000;

    --users-header-back: #41786b;
    --users-header-fore: #fff;
    --users-row-odd-back: #5cb59f;
    --users-row-even-back: #6dc6af;
    --users-row-hover-back: #7ed7bf;

    --fonts: "Noto Sans", "Roboto", "Ubuntu", "DejaVu Sans", "Arial", sans-serif;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
}

#wrapper {
    margin: 0;
    padding: 1em;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: var(--fonts);
    background: var(--page-background);
}

header {
    text-align: center;
    margin: 0;
    padding: 10px 0;
    border-top: 1px solid var(--generic-border-darker);
    border-bottom: 1px dashed var(--generic-border-darker);
}

header h1 {
    margin: 0;
    padding: 0;
}

header h2 {
    font-size: 100%;
    margin: 0;
    padding: 0;
}

main {
    flex-grow: 1;
}

#searchArea {
    margin-top: 20px;
    display: block;
}

#searchArea input {
    display: block;
    font-family: var(--fonts);
    font-size: 110%;
    margin: 0 auto;
    padding: 5px 5px 5px 32px;
    border: 1px solid var(--generic-border);
    background: url("/v3/img/search.svg") no-repeat 1% center var(--search-background-color);
    background-size: 24px;
}

#searchArea #numMatches {
    text-align: center;
    display: none;
    font-style: italic;
}

#searchArea ::placeholder {
    font-style: italic;
}

#searchArea .users {
    margin-top: 20px;
}

.groupHeader {
    font-size: 150%;
    font-weight: bold;
    padding: 5px 10px;
    margin-top: 20px;
    background: var(--header-background);
    display: flex;
    align-items: center;
}

.groupHeader:hover {
    background: var(--header-background-hover);
    cursor: pointer;
}

.groupHeader h1 {
    font-size: inherit;
    padding: 0;
    margin: 0;
    pointer-events: none;
}

.groupHeader .count {
    font-size: 75%;
    padding: 0 10px;
}

.groupHeader span {
    pointer-events: none;
}

.tableWrapper {
    display: none;
    padding: 10px 0 0 50px;
}

.users {
    border-collapse: collapse;
    width: 100%;
}

.users th, td {
    padding: 10px;
}

.users th {
    background: var(--users-header-back);
    color: var(--users-header-fore);
    text-align: left;
}

.users tr:nth-child(odd) {
    background: var(--users-row-odd-back);
}

.users tr:nth-child(even) {
    background: var(--users-row-even-back);
}

.users tr:hover {
    background: var(--users-row-hover-back);
}

.button {
    background: var(--button-back);
    color: var(--button-fore);
    border-width: 2px;
    border-style: solid;
    border-color: var(--button-border-hi) var(--button-border-lo)
                  var(--button-border-lo) var(--button-border-hi);
    padding: 3px 10px;
    text-decoration: none;
}

.button:hover {
    background: var(--button-back-hover);
}

.button:active {
    border-color: var(--button-border-lo) var(--button-border-hi)
                  var(--button-border-hi) var(--button-border-lo);
}

.button img {
    padding-right: 5px;
    width: 16px;
    height: 16px;
}

footer.public {
  text-align: center;
  font-size: 75%;
  color: #888;
  min-width: 600px;
  max-width: 800px;
  margin: 0 auto;
  padding-top: 10px;

  display: flex;
  flex-direction: column;
  gap: 5px;
}

footer > * {
  padding: 0;
  margin: 0;
}

/* Clumsy media queries. No idea if these actually work on mobile. */
@media (max-width: 800px) {
    #wrapper {
        padding: 0.5em;
        font-size: 90%;
    }

    .groupHeader {
        font-size: 120%;
        font-weight: bold;
        padding: 2px 5px;
    }

    .tableWrapper {
        padding: 10px 0 0 0;
    }

    .users th, td {
        padding: 5px;
    }

    .button {
        background: var(--button-back);
        color: var(--button-fore);
        border: 1px solid var(--button-border-lo);
        padding: 2px 5px;
        text-decoration: none;
    }

    .button:active {
        border: 1px solid var(--button-border-lo);
        background: var(--button-back-hover);
    }
}

@media (max-width: 500px) {
    .users {
        font-size: 80%;
    }
}
