:root {
    --bg-color: #557f47;
    --link-green: #ccffcc;
    --link-green-hover: #eeffee;
    --link-green-active: var(--link-green-hover);
    --light-green: #55aa55;
    --dark-green: #1C261F;
    --header-buttons: #557f47;
    --menu-dark-green: #1C261F;
    --menu-light-green: #336633;
    --menu-item-bg-hover: #385231;
    --table-row-light: #1C261F;
    --table-row-dark: #151D18;
    --table-row-highlight: #29352d;
    --table-hdivider: #151D18;
    --table-vdivider: #304336;
    --table-header-text: #9dbf98;
    --table-text: #eefae3;
    --header-height: 50px;
}

[hidden] {
    display: none !important;
}

html {
    font-size: 14px;
    position: relative;
    height: 100%;
    min-height: 100%;
    margin: 0;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
        position: relative;
        min-height: 100%;
    }
}

html, body {
    /* stop the page from being dragged horizontally, especially on mobile browsers */
    max-width: 100vw;
    max-width: 100dvw;
    overflow-x: hidden;
    touch-action: pan-y;
    overscroll-behavior-x: none;
}

/*@media (max-width: 768px) {
    div.container {
        width: 100%;
        margin: 0;
        padding: 0;
    }
}*/

body {
    font-family: "Roboto", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400; /* 100: thin, 400: regular, 700: bold */
    font-style: normal;
    font-variation-settings: "wdth" 75; /* 75: condensed, 100: normal */
    height: 100%;
    margin: 0;
    background: var(--bg-color) url("../images/grass_tile.png") repeat;
    background-size: 90.2703px 90.2703px;
    color: #fff;
    display: flex;
    flex-direction: column;
}

.body-game {
    height: 100%;
    margin-bottom: 0px;
    background: var(--bg-color) url("../images/grass_tile.png") repeat;
    background-size: 90.2703px 90.2703px;
    color: #fff;
}

.text-center {
    text-align: center;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}

.game-page {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh; /* if browser supports dvh, it'll use this. We want this for mobile chrome and safari */
}

.container {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--link-green);
    text-decoration: none;
}

    a:hover {
        color: var(--link-green-hover);
    }

    a:active {
        color: var(--link-green-active);
    }

button {
    font-family: "Roboto", sans-serif;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

header {
    height: var(--header-height);
    background-color: var(--dark-green);
    position: sticky;
    top: 0;
    z-index: 50;
    flex-shrink: 0; /* don't allow to flex */
}

.footer {
    position: absolute;
    bottom: 0;
    display: flex;
    justify-content: flex-start;
    width: 100%;
    white-space: nowrap;
    line-height: 60px;
    padding: 0 0 0 30px;
}

.footer-game {
    display: flex;
    justify-content: flex-start;
    width: 100%;
    white-space: nowrap;
    line-height: 60px;
    padding: 0 0 0 50px;
}

#header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 100%;
}

.header-button {
    background-color: var(--dark-green);
    border-radius: 4px;
    border: none;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    cursor: pointer;
    margin: 5px 5px;
    padding: 0 3px;
}

    .header-button[aria-expanded="false"] {
        background-color: var(--dark-green);
    }

    /* Make sure this hover rule comes AFTER the [aria-expanded="false"] so that the hover overrides the behaviour */
    .header-button:hover,
    .header-button[aria-expanded="true"] {
        background-color: var(--menu-item-bg-hover);
    }

.header-logo {
    padding-top: 2px;
    padding-left: 12px;
}

.home-icon {
    width: 40px;
    fill: var(--header-buttons);
}

.burger-icon {
    width: 36px;
    height: 36px;
    fill: none;
    stroke: var(--header-buttons);
    stroke-width: 2;
    stroke-linecap: round;
}

.burger-holder {
    position: relative; /* So that the dropdown menu can position itself underneath */
}

.burger-menu {
    position: fixed; /* so that we can position this on top of the page, right below the button */
    display: flex;
    flex-direction: column;
    justify-content: space-between;  
    width: 170px;
    top: var(--header-height);
    bottom: 0px;
    right: 0;
    margin: 0;
    padding: .5rem 0;
    background: var(--menu-dark-green);
    border: none;
    box-shadow: 0px 4px 8px #00000030;
    z-index: 100; /* make sure this draws in front of everything else. Note: if a parent element has "overflow: hidden/auto/scroll", it can clip this menu! */
}

    .burger-menu [hidden] {
        display: none;
    }

    .burger-menu .item-holder {
        display: flex;
        flex-direction: column;
    }

    .burger-menu .item {
        width: 100%;
        padding: 0.5rem 1rem;
        text-align: left;
        background: none;
        cursor: pointer;
    }

    @media (max-width: 768px) {
        .burger-menu .item {
            padding: 1rem 1rem;
            font-size: 1.2rem;
        }
    }

    .burger-menu .item:hover {
        background: var(--menu-item-bg-hover);
    }

    .burger-menu .item-copyright {
        font-weight: 100;
        font-size: 0.8rem;
        color: rgba(255, 255, 255, 0.75);
        padding: 0.5rem 1rem;
    }

.next-match {
    margin: 0 auto;
    margin-top: 1rem;
    color: var(--table-text);
    max-width: 70%;
}

table {
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 15px;
    width: 100%;
    max-width: 940px;
    margin: 0 auto;
}

    table .left-align {
        text-align: left;
        padding-left: 1rem;
    }

    table .right-align {
        text-align: right;
        padding-right: 1rem;
    }

@media (max-width: 940px) {
    table .left-align {
        padding-left: 0.5rem;
    }

    table .right-align {
        padding-right: 0.25rem;
    }
}

td, tr {
    color: var(--table-text);
    font-weight: 300;
    border-bottom: 1px solid var(--table-hdivider);
    padding: 0.5rem 0.25rem;
}

th {
    color: var(--table-header-text);
    font-weight: 300;
    background-color: var(--table-row-light);
    border-color: #fff;
    border-bottom-width: 1px;
    padding: 1.5rem 0.25rem 0.5rem;
}

table tr:first-child th:first-child {
    border-top-left-radius: 15px;
}

table tr:first-child th:last-child {
    border-top-right-radius: 15px;
}

table tr:last-child td:first-child {
    border-bottom-left-radius: 15px;
}

table tr:last-child td:last-child {
    border-bottom-right-radius: 15px;
}

@media (max-width: 940px) {
    table tr:first-child th:first-child {
        border-top-left-radius: 0;
    }

    table tr:first-child th:last-child {
        border-top-right-radius: 0;
    }

    table tr:last-child td:first-child {
        border-bottom-left-radius: 0;
    }

    table tr:last-child td:last-child {
        border-bottom-right-radius: 0;
    }
}

.table-holder {
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.2);
    padding: 0.5rem 0 2rem 0;
    flex: 1 1 auto;
}

.table-title {
    font-size: 1.5rem;
    font-weight: 300;
    padding: 1rem 0 0.5rem 0;
}

table.standings {
    vertical-align: middle;
}

    table.standings .pos {
        width: 5%;
    }

    table.standings .jersey {
        width: 40px;
    }

        table.standings .jersey img {
            margin-top: 3px;
        }

    table.standings .team-name {
        text-align: left;
        padding-left: 0.5rem;
        width: auto;
    }

    table.standings .stat {
        width: 7%;
    }

    table.standings .points {
        width: 10%;
    }

.border-right {
    border-right: 1px solid var(--table-vdivider);
}

.border-left {
    border-left: 1px solid var(--table-vdivider);
}

/* Set the row background to none, but the td background colour so that the corners of the table can be rounded */
tbody.standings tr:nth-child(odd),
tbody.standings tr:nth-child(even) {
    background: none;
}

    tbody.standings tr:nth-child(odd) td {
        background: var(--table-row-dark);
    }

    tbody.standings tr:nth-child(even) td {
        background: var(--table-row-light);
    }


tbody.standings tr.curmatch td {
    background: var(--table-row-highlight);
}

table.history {
    width: 100%;
    table-layout: fixed;
    border-bottom-width: 1px;
}

    table.history .flex {
        width: auto;
    }

    table.history .jerseycol {
        width: 60px;
    }

    table.history .middlecol {
        width: 100px;
    }

    table.history .left {
        text-align: right;
        padding: 0 0 0 1rem;
    }

    table.history .jersey {
        padding: .5rem .75rem;
    }

        table.history .jersey img {
            margin-top: 2px;
        }

    table.history .middle {
        padding: 0.35rem 0.35rem 0.5rem;
        vertical-align: middle;
    }

    table.history .right {
        text-align: left;
        padding: 0 1rem 0 0;
    }

table.players .name {
    padding-left: 1rem;
}

table.players .pos {
    width: 25%;
}

table.players .stat {
    width: 10%;
}

table.players .role {
    width: 26px;
    padding-left: 0.5rem;
}

    table.players .role img {
        margin-top: 3px;
        margin-left: -2px;
    }


table.match {
    vertical-align: middle;
}

    table.match .time {
        width: 15%;
    }

    table.match .jersey {
        width: 40px;
    }

        table.match .jersey img {
            margin-top: 2px;
        }

    table.match .team-name {
        text-align: left;
        width: auto;
    }

    table.match .name {
        text-align: left;
        width: 25%;
    }

td.scores {
    background: var(--dark-green);
    color: #fff;
}

.day-text {
    font-size: 10pt;
    padding: 0;
}

.score-text {
    font-weight: bold;
    font-size: 18pt;
}

td.futureday {
    background: #9b9;
    color: #fff;
}

a.daylink {
    color: #fff;
}

.consent-button {
    font-size: inherit;
    background: none;
    border: none;
    color: var(--link-green);
}

    .consent-button:hover {
        color: var(--link-green-hover);
    }

.kl-tooltip {
    position: relative;
    display: inline-block;
    cursor: help;
}

    .kl-tooltip .kl-tooltiptext {
        visibility: hidden;
        max-width: 200px;
        background-color: var(--table-row-highlight);
        color: #fff;
        text-align: center;
        line-height: 1.25rem;
        border-radius: 6px;
        padding: 0.45rem 1rem 0.45rem 1rem;
        position: absolute;
        z-index: 1;
        bottom: 135%;
        left: 50%;
        transform: translateX(-50%);
        opacity: 0;
    }

        .kl-tooltip .kl-tooltiptext::after {
            content: "";
            position: absolute;
            top: 100%;
            left: 50%;
            transform: translateX(-50%);
            border-width: 5px;
            border-style: solid;
            border-color: var(--table-row-highlight) transparent transparent transparent;
        }

    .kl-tooltip:hover .kl-tooltiptext {
        visibility: visible;
        opacity: 1;
    }

.flex-center {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.padding20 {
    padding: 20px;
}

/* ---------------------- */
/* Handle the home page hiding/showing content based on whether the player has played today's match yet */
/* Hide both divs by default */
.hideable {
    display: none;
}

/* Show the correct one based on html’s class */
html.played-state-false .flex-played-false {
    display: flex;
}

html.played-state-true .flex-played-true {
    display: flex;
}

html.played-state-false .table-played-false {
    display: block;
}

html.played-state-true .table-played-true {
    display: block;
}
/* ---------------------- */
