/* * {
    outline: 1px solid red;
} */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    -webkit-clip-path: inset(50%);
            clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

body {
    margin: 0;
    background: black url('/gfx/bg.jpg') top left;
    background-size: cover;
    background-attachment: fixed;
    color: white;
    font-family: proxima-nova-medium, system-ui, sans-serif;
    font-weight: 300;
}

img {
    max-width: 100%;
    border-radius: 1em;
}

#page {
    display: flex;
    flex-direction: column-reverse;
    padding-top: calc(37px + 1em);
}

#container {
    margin: 0 auto 0 auto;
    padding: .5em;
    max-width: 40em;
    width: calc(100% - 1em);
    min-height: 100vh;
}

body.admin #container {
    max-width: 100%;
}

body.admin .constrain {
    margin: 0 auto 0 auto;
    padding: .5em;
    max-width: 40em;
    width: calc(100% - 1em);
}

#logo {
    background: black url('/gfx/logo.svg');
    background-size: 219px 37px;
    background-repeat: no-repeat;
    background-position: center;
    height: 37px;
    width: calc(100% - 1em);
    padding: .5em;
    position: absolute;
    z-index: 10;
}


nav#main-navigation {
    background: black;
    padding: .5em;
    position: -webkit-sticky;
    position: sticky;
    bottom: 0;
}

nav#main-navigation ul {
    margin: 0 auto 0 auto;
    min-height: 53px;
    list-style: none;
    max-width: 40em;
    padding: 0 1em;
    padding: 0 calc(env(safe-area-inset-bottom, 1em) + .5em) env(safe-area-inset-bottom, 0);
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}


nav#main-navigation a {
    display: block;
    position: relative;
    text-align: center;
    padding-top: 32px;
    color: white;
    text-decoration: none;
    font-size:  .875em;
    min-width: 5em;
}


nav#main-navigation a:visited {
    color: white;
}

nav#main-navigation a:hover {
    color: rgba(8, 166, 196, 1.00);
}

nav#main-navigation a:hover::after {
    background-color: rgba(8, 166, 196, 1.00);
}

nav#main-navigation a.active, nav#main-navigation a.active:visited {
    color: #DF5C0D;
}

nav#main-navigation a.active::after {
    background-color: #DF6C0D;
}

nav#main-navigation a::after {
    -webkit-mask-position: center -4px;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center -8px;
            mask-position: center -8px;
    mask-repeat: no-repeat;
    content: " ";
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    background-color: white;
}

.pagination {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    list-style: none;
    margin: 0 auto;
    padding: 0;
}

.pagination span, .pagination a, .pagination a:visited {
    display: block;
    padding: .25em;
    text-decoration: none;
    color: white;
}

.pagination a:hover {
    background: rgb(8, 166, 196);
}

.pagination .active span {
    color: rgb(8, 166, 196);
    font-weight: bold;
}

@media screen and (min-width: 30em) {
    #logo {
        width: 219px;
        background-position: .5em .5em;
    }
    #page {
        flex-direction: column;
        padding-top: 0;
    }

    nav#main-navigation a, nav#main-navigation a:visited {
        padding-top: 0;
        padding-left: 44px;
        text-decoration: none;
        font-size: .875em;
        min-width: 5em;
        line-height: 3em;
    }

    nav#main-navigation a::after {
        -webkit-mask-position: left -5px;
    }

}

#menu_races::after {
    -webkit-mask-image:url('/gfx/races_icon.svg');
    mask-image: url('/gfx/races_icon.svg');
}

#menu_ranking::after {
    -webkit-mask-image:url('/gfx/ranking_icon.svg');
    mask-image:url('/gfx/ranking_icon.svg');
}

#menu_profile::after {
    -webkit-mask-image:url('/gfx/profile_icon.svg');
    mask-image:url('/gfx/profile_icon.svg');
}

#menu_register::after {
    -webkit-mask-image:url('/gfx/register_icon.svg');
    mask-image:url('/gfx/register_icon.svg');
}

#menu_more::after {
    -webkit-mask-image:url('/gfx/more_icon.svg');
    mask-image:url('/gfx/more_icon.svg');
}
h1 .date {
    font-weight: 100;
}

p {
    margin: 0;
}

p + p {
    margin-top: 1em;
}

table {
    width: 100%;
    border-collapse: separate;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
}

th, td {
    text-align: left;
    padding: 0.125em .5em;
    border: none;
}

td.align-end, th.align-end {
    text-align: right;
}

fieldset {
    border: none;
    margin: 0;
    padding: 0;
}
legend {
    font-weight: bold;
    font-size: 1.4em;
    padding-top: 1em;
    padding-bottom: .25em;
}

.multiple {
    display: flex;
}

.multiple > * {
    width: 100%;
}

.multiple input:first-of-type {
    border-right: 1px solid white;
}

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

input, button {
    width: 100%;
}

input[type="number"],
input[type="date"],
input[type="time"],
input[type="text"],
input[type="password"],
select,
textarea {
    -moz-appearance: none;
    -webkit-appearance: none;
    appearance: none;
    display: block;
    background: rgba(0,0,0,.5);
    color: white;
    border: none;
    margin: 0;
    font-size: 1.75em;
    padding: .25em 0;
    text-align: center;
    font-weight: 100;
    min-height: 1.2em;
}

input[type="number"]:focus,
input[type="date"]:focus,
input[type="time"]:focus,
input[type="text"]:focus,
input[type="password"]:focus,
select:focus {
    box-shadow: 0 0 14px rgba(8, 166, 196, 1.00) inset;
}

input[type=submit], .racelist li.active a, button, a.button  {
    background-image: linear-gradient(270deg, #4234FF 0%, #00B6BD 100%);
    border-radius: .5em;
    font-size: 2em;
    font-weight: 200;
    color: #fff;
    text-align: center;
    border: none;
    transition: background 0.2s ease-in-out;
    padding: .25em .5em .4em .5em;
}

textarea {
    text-align: left;
    padding: .5em;
    min-height: 5em;
}

.racelist li.active a {
    padding: .5em 2em .75em 1em;
    background-image: url('/gfx/chevron-right.svg'), linear-gradient(270deg, #4234FF 0%, #00B6BD 100%);
    background-position: center right;
    background-repeat: no-repeat;
}

input[type=submit]:hover, .racelist li.active a:hover, button:hover, a.button:hover {
    background-image: linear-gradient(270deg, #4234FF 20%, #00B6BD 120%);
    transition: background 0.2s ease-in-out;
}

.racelist li.active a:hover {
    background-image: url('/gfx/chevron-right.svg'), linear-gradient(270deg, #4234FF 0%, #00B6BD 100%);
    transition: background 0.2s ease-in-out;
    background-position: center right -.25em, center center;
}

input[type=submit]:active, .racelist li.active a:active, button:active, a.button:active  {
    background-color: white;
    background-image: none;
    color: #4234FF;
}

select {
    font-size: 1.5em;
    padding: .33em .66em;
    border-radius: 0;
    background-image: url('/gfx/chevron-down.svg');
    background-position: center right .5em;
    background-repeat: no-repeat;
}

.formfield {
    background: rgba(255, 255, 255, 0.5);
    color: black;
    padding: 0;
    margin: .25em 0 1em;
    border: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-radius: 1em;
    overflow: hidden;
}

.formfield.checkbox {
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
}

.formfield.checkbox.multiselect {
    background: transparent;
    color: white;
    margin: 0;
}

.formfield.checkbox input {
    font-size: 2em;
    width: auto;
    margin: .25em 0 .25em .5em;
}

input {
    margin-right: -1em;
}

label {
    display: block;
    font-size: 1.25em;
    margin: .5em;
    padding: .25em;
    width: calc(100% - 1.5em);
}
a, a:visited {
    color: rgba(8, 166, 196, 1.00);
}

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

.racelist li {
    margin: .25em 0;
}

.racelist li a {
    display: block;
    padding: .5em;
    border-radius: .5em;
}

.racelist li.active a {
    font-size: 1em;
    text-align: left;
}

.racelist li a > div {
    display: flex;
    justify-content: space-between;
    max-width: 40em;
}

.racelist li.active a > div {
    justify-content: flex-start;
}

.racelist a {
    text-decoration: none;
    color: white;
}

.racelist a:hover {
    background: rgba(255,255,255, .5);
    color: #333;
}

.racelist .title {
    color: white;
    text-decoration: none;
    font-size: 2em;
}

ol.racelist time {
    font-weight: 100;
    font-size: 2em;
    margin-left: .5em;
}

.notice, .content, .overlay {
    font-size: 1.25em;
    margin: 1em 0;
    border-radius: 16px;
    padding: 1em;
    background: rgba(0,0,0, .5);
}

.hasoverlay {
    position: relative;
}

.overlay {
    position: absolute;
    bottom: .25em;
    margin: 0;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    font-size: 1em;
    padding-top: .5em;
}


.ranking li {
    display: flex;
    justify-content: space-between;
    padding: .25em .5em;
}

.notice.error {
    background-image: linear-gradient(270deg, #E14747 0%, #6C0808 99%);
}

ul.error_list {
    list-style: none;
    font-size: 1.2em;
    padding: .5em;
    border-left: 5px solid #E14747;
    border-radius: 1em;
    margin: 1em 0 0 0;
    background: rgba(0,0,0,.5);
}

tr.ranking-1 {
    background: gold;
    color: black;
    border-radius: 1em;
}

tr.ranking-2 {
    background: silver;
    color: black;
    border-radius: 1em;
}

tr.ranking-3 {
    background: orange;
    color: black;
    border-radius: 1em;
}

tr.ranking-1 td:first-child,
tr.ranking-2 td:first-child,
tr.ranking-3 td:first-child {
    border-top-left-radius: 1em;
    border-bottom-left-radius: 1em;
}

tr.ranking-1 td:last-child,
tr.ranking-2 td:last-child,
tr.ranking-3 td:last-child {
    border-top-right-radius: 1em;
    border-bottom-right-radius: 1em;
}
