@import "https://unpkg.com/open-props";

:root {
    --closed-nav-height: 67px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Open Sans', sans-serif;
    padding: 0;
    margin: 0;
    min-height: 100vh; /* required to make footer stick to bottom*/
}

header {
    margin-block-start: var(--size-3);
}

footer {
    position: sticky;
    top: 100%;
    background-color: #1b1b1b;
    color: white;
    padding: 1em 0.5em;
}

footer .footer-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

footer .footer-list li {
    padding: 0.2em 0;
}

footer p {
    font-size: 0.8rem;
}

footer a {
    color: white;
}

footer a:hover {
    color: DarkTurquoise;
}

.container-footer {
    display: flex;
    flex-direction: column;
    gap: 1em;
}

.container-footer .footer-column:not(:last-child) {
    margin-bottom: 1em;
}

#league-table-replay-layout {
    display: grid;
    column-gap: var(--size-3);
    grid-template-columns: 1fr;
}

main.find-a-fixture {
    display: grid;
    gap: var(--size-3);
    grid-template-columns: minmax(0, 1fr);
}

.filters-section {
    height: max-content;
    background-color: white;
}

#table-container {
    position: relative;
}

.info-bar {
    border-top: 1px solid var(--gray-6);
    background-color: var(--gray-5);
    padding: 0.5em;
    transition: all 0.4s;
    position: fixed;
    left: 0;
    right: 0;
    bottom: -25vh;
    /*height: 25vh;*/
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.info-bar-message-container {
    padding-block-start: 0.2em;
}

.info-bar-error {
    border-top: 1px solid var(--red-7);
    background-color: var(--red-5);
}

@media screen and (min-width: 768px) {
    .container-footer {
        flex-direction: row;
        align-items: center;
    }

    #league-table-replay-layout {
        grid-template-columns: [col-first] 2fr [col-inner] 1fr [col-end];
        grid-template-rows: [row-start] auto [row-league-controls] auto [row-season-replay-controls] 3fr [row-end];
    }

    #league-controls {
        grid-column-start: col-first;
        grid-column-end: col-end;
        grid-row-start: row-start;
        grid-row-end: row-league-controls;
    }

    #season-replay-controls {
        grid-column-start: col-first;
        grid-column-end: col-end;
        grid-row-start: row-league-controls;
        grid-row-end: row-season-replay-controls;
    }

    #table-container {
        grid-column-start: col-first;
        grid-column-end: col-inner;
        grid-row-start: row-season-replay-controls;
        grid-row-end: row-end;
    }

    #fixtures {
        grid-column-start: col-inner;
        grid-column-end: col-end;
        grid-row-start: row-season-replay-controls;
        grid-row-end: row-end;
    }

    .info-bar {
        bottom: -15vh;
        /*height: 15vh;*/
        padding-inline: 5vw;
    }

    .playoffs-semis-container {
        display: grid;
        grid-template-columns: 1fr 1fr;
        column-gap: 1em;
    }

    .playoffs-final-container {
        display: flex;
        justify-content: center;
    }

    .playoffs-final-container > article:first-child {
        width: calc(50% - 0.5em);
    }

    .filters-section {
        position: sticky;
        top: var(--closed-nav-height);
    }
}

.info-bar-show {
    bottom: 0;
}

header,
main {
    margin-inline: 0.5em;
}

main {
    margin-block-end: 1em;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

h1, h2, h3, h4 {
    margin-block-start: 0;
    margin-block-end: 0.25em;
}

p {
    margin: 0 0 1rem;
    line-height: 1.5em;
}

h1, h2, h3, h4, #table-find-a-fixture :where(th) {
    font-weight: 600;
}

table {
    border-collapse: collapse;
}

table th {
    font-weight: 600;
}

table :where(th, td) {
    padding: 8px;
    border-collapse: collapse;
}


#table-find-a-fixture :where(th, td) {
    padding: 4px;
}

#table-find-a-fixture :where(tr.odd) {
    background-color: var(--gray-2);
}

.form-controls .form-field {
    margin-bottom: 1em;
}

.field-help-text {
    margin-block-end: 0;
    font-size: var(--font-size-0);
}

.form-controls-league-table, .button-group-league-table {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--size-2);
    margin-block-end: var(--size-3);
}

.form-controls-vertical {
    grid-template-columns: 1fr;
}

.button {
    cursor: pointer;
    border-radius: var(--size-1);
    padding: 0.5em;
    font-weight: 600;
}

a.button {
    display: inline-block;
    text-decoration: none;
    text-align: center;
}

.button-sm {
    padding: 0.1em;
}

.button.button-default {
    background-color: var(--gray-6);
    border: 2px solid var(--gray-5);
    color: white;
}

.button.button-default:hover {
    background-color: var(--gray-8);
}

.button.button-primary {
    background-color: var(--blue-6);
    border: 2px solid var(--blue-5);
    color: white;
}

.button.button-primary:hover {
    background-color: var(--blue-8);
}

.button.button-dark {
    background-color: var(--gray-8);
    border: 2px solid var(--gray-7);
    color: white;
}

.button.button-dark:hover {
    background-color: var(--gray-10);
}

.button.button-danger {
    background-color: var(--red-8);
    border: 2px solid var(--red-7);
    color: white;
}

.button.button-danger:hover {
    background-color: var(--red-10);
}

.button.button-back-to-top {
    position: fixed;
    bottom: 5%;
    right: 5%;
    z-index: 10;
}

.float-right {
    float: right;
}

.form-input {
    background-color: var(--gray-0);
    border-radius: var(--size-1);
    padding: 0.5em;
    border: .2em solid var(--gray-7);
    width: 100%;
    font-size: 1rem;
}

button:focus-visible, .form-input:focus-visible, .form-input:focus {
    border: .2em solid var(--blue-3);
    outline: 1px auto;
}

@media screen and (min-width: 768px) {
    nav#neso-nav-dark.neso-nav.neso-nav-dark div.nav-container,
    header,
    main {
        margin-inline: 5vw;
    }

    footer {
        padding-inline: 5vw;
    }

    .form-controls-league-table {
        grid-template-columns: repeat(3, 1fr);
    }

    .button-group-league-table {
        grid-template-columns: repeat(6, 1fr);
    }

    #season-replay-controls.button-group-league-table > button {
        grid-row-start: 1;
        grid-row-end: 2;
    }

    .button.button-back-to-top {
        bottom: 10%;
    }
}

@media screen and (min-width: 1100px) {
    nav#neso-nav-dark.neso-nav.neso-nav-dark div.nav-container,
    header,
    main {
        margin-inline: 15vw;
    }

    footer {
        padding-inline: 15vw;
    }
}

.form-controls-league-table label {
    display: block;
}

.fixtures-container {
    height: 35rem;
    overflow-y: scroll;
}

.fixture-set, .playoff-fixture-set {
    padding: 0.5em;
    background-color: var(--gray-2);
}

.fixture-set:not(:last-child) {
    margin-block-end: 1em;
}

.playoff-fixture-set {
    margin-block-end: 1em;
}

.fixture-set-header h4 {
    text-decoration: underline;
}

table.fixtures {
    width: 100%;
    font-size: 0.8rem;
}

table.fixtures:not(:last-child) {
    margin-block-end: 1em;
}

table.fixtures caption {
    text-align: left;
    font-weight: 600;
}

table.fixtures td, table.upcoming-fixtures caption {
    padding: var(--size-2) var(--size-1);
}

table.fixtures tbody .tr-fixture td {
    font-size: 0.9rem;
    border-top: 1px solid var(--gray-4);
}

table.fixtures tbody .tr-fixture-description + tr.tr-fixture td,
table.fixtures tbody .tr-fixture:nth-child(1) td {
    border-top: 0;
}

table.fixtures tbody .tr-penalty-row td {
    font-size: 0.9em;
    padding-top: 0;
}

table.fixtures tbody .tr-penalty-row td.td-home-team {
    text-align: right;
}

table.fixtures tbody tr:not(:last-of-type) td.td-fixture-description {
    border-bottom: 0;
    font-size: 0.9rem;
    text-decoration: underline;
}

table.fixtures :where(.td-home-team, .td-away-team) {
    width: 35%;
}

table.fixtures :where(.td-home-goals, .td-away-goals) {
    width: 12.5%;
    text-align: center;
}

table.fixtures tbody tr.tr-fixture td.td-fixture-time {
    font-weight: var(--font-weight-4);
    background-color: var(--blue-1);
    color: var(--blue-11);
    width: 10%;
}

table.fixtures.upcoming-fixtures tr.tr-fixture td.td-home-team {
    padding-inline-end: var(--size-4);
}

table.fixtures.upcoming-fixtures tr.tr-fixture td.td-away-team {
    padding-inline-start: var(--size-4);
}

table.fixtures :where(.playoffs-team-name) {
    width: 50%;
}

table.fixtures :where(.playoffs-result) {
    min-width: 12.5%;
    text-align: center;
}

table.fixtures :where(.playoffs-result-final) {
    min-width: 25%;
}

table.fixtures.playoffs caption {
    text-align: left;
}

table.fixtures :where(.td-vs) {
    width: 5%;
    text-align: center;
}

table.fixtures :where(h2, h3, h4) {
    margin-block-end: 0;
}

table.upcoming-fixtures caption {
    background-color: var(--gray-4);
}

table.upcoming-fixtures .td-fixture-description {
    background-color: var(--gray-3);
}

table.fixtures.upcoming-fixtures tbody .tr-playoff  td {
    padding-block: var(--size-1);
    text-decoration: underline;
}

table.fixtures.upcoming-fixtures tbody .tr-playoff + .tr-fixture td {
    border-top: 0;
}

table.league-table {
    width: 100%;
    font-size: 0.8rem;
    margin-block-end: var(--size-3);
}

table.league-table thead tr {
    background-color: var(--gray-2);
}

#table-find-a-fixture_wrapper {
    max-width: 100%;
    width: 100%;
    overflow-x: auto;
    font-size: 0.8rem;
}

@media screen and (max-width: 599px) {
    table.league-table :where(
    th:nth-child(7),
    td:nth-child(7),
    th:nth-child(8),
    td:nth-child(8)
    ) {
        display: none;
    }
}

@media screen and (min-width: 1000px) {
    .form-controls-fixture-search {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: var(--size-3);
    }

    table.league-table {
        font-size: initial;
    }
}

table.league-table thead th:nth-child(2) {
    text-align: left;
}

table.league-table thead :not(th:nth-child(2)) {
    text-align: right;
}

table.league-table tbody tr {
    background-color: var(--gray-7);
}

table.league-table tbody tr td:not(:nth-child(2)) {
    text-align: right;
}

table.league-table tbody tr.promotion,
table.league-table tbody tr.champions-league {
    background-color: var(--green-5);
    color: var(--gray-9);
}

table.league-table tbody tr.relegation {
    background-color: var(--red-5);
    color: var(--gray-9);
}

table.league-table tbody tr.europa-league {
    background-color: var(--blue-5);
    color: var(--gray-9);
}

table.league-table tbody tr.playoffs {
    background-color: var(--yellow-5);
    color: var(--gray-9);
}

table.league-table tbody tr:not(.promotion, .relegation, .champions-league, .europa-league, .playoffs) {
    color: var(--gray-3);
}

/*///*** VUE LIST ANIMATIONS ***\\\*/
.table-truffle-shuffle-move, /* apply transition to moving elements */
.table-truffle-shuffle-enter-active,
.table-truffle-shuffle-leave-active {
    transition: all 0.5s ease;
}

.table-truffle-shuffle-enter-from,
.table-truffle-shuffle-leave-to {
    opacity: 0;
    transform: translateX(30px);
}

/* ensure leaving items are taken out of layout flow so that moving
   animations can be calculated correctly. */
.table-truffle-shuffle-leave-active {
    position: absolute;
}

.fixture-fade-enter-active,
.fixture-fade-leave-active {
    transition: opacity 0.5s ease;
}

.fixture-fade-enter-from,
.fixture-fade-leave-to {
    opacity: 0;
}

.position-changed {
    animation-name: positionChanged;
    animation-duration: 1s;
    animation-timing-function: ease;
    animation-delay: 0.5s;
}

@media (prefers-reduced-motion) {
    .table-truffle-shuffle-move { /* turn off tr translate transition when user prefers reduced motion */
        transition: none;
    }

    .position-changed {
        animation-delay: 0s;
    }
}

@keyframes positionChanged {
    from {
        opacity: 0.9;
    }
    to {
        opacity: 1;
    }
}

.modal-backdrop {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal {
    background: #FFFFFF;
    box-shadow: 2px 2px 20px 1px;
    overflow-x: auto;
    display: flex;
    flex-direction: column;
    border-radius: 1em;
    margin-inline: 0.5em;
}

.modal-header,
.modal-footer {
    padding: 15px;
    display: flex;
}

.modal-header {
    position: relative;
    border-bottom: 1px solid #eeeeee;
    color: #4AAE9B;
    justify-content: space-between;
}

.modal-footer {
    border-top: 1px solid #eeeeee;
    flex-direction: column;
    justify-content: flex-end;
}

.modal-body {
    position: relative;
    padding: 20px 10px;
}

.btn-close {
    position: absolute;
    top: 0;
    right: 0;
    border: none;
    font-size: 20px;
    padding: 10px;
    cursor: pointer;
    font-weight: bold;
    color: #4AAE9B;
    background: transparent;
}

.modal-fade-enter,
.modal-fade-leave-to {
    opacity: 0;
}

.modal-fade-enter-active,
.modal-fade-leave-active {
    transition: opacity .5s ease;
}

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.neso-nav div.nav-container div.nav-head a.nav-brand {
    padding: 0;
}

fieldset {
    padding: 1em;
    border-radius: 0.5em;
    margin: 0;
}

#upcoming-fixtures-layout {
    display: grid;
    gap: var(--size-3);
}

@media screen and (min-width: 768px) {
    #upcoming-fixtures-layout {
        grid-template-columns: 1fr 2fr;
    }
}

p.autocomplete-error-message {
    color: var(--red-10);
    margin-block-end: 0;
}

.legend-list {
    padding-inline-start: 2em;
    margin: 0;
}

.legend-list li {
    color: var(--gray-9);
}

.legend-list li::marker {
    font-size: 1.5em;
}

.legend-list li:is(.promotion, .champions-league)::marker {
    color: var(--green-5);
}

.legend-list li.europa-league::marker {
    color: var(--blue-5);
}

.legend-list li.playoffs::marker {
    color: var(--yellow-5);
}

.legend-list li.relegation::marker {
    color: var(--red-5);
}

.text-underline {
    text-decoration: underline;
}

.point-deduction-cite {
    text-decoration: underline;
    text-underline-offset: 0.2em;
    color: white;
}

#footnotes {
    font-size: 0.8rem;
}

#footnotes ol {
    padding-inline-start: 2em;
}
