.content {
    display: flex;
    flex-direction: column;
}

.container {
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-gap: 20px;
    padding: 20px 15%;
}

.footer {
    display: flex;
    justify-content: center;
    padding-bottom: 8px;
    gap: 8px;
    span {
        font-size: small;
        text-decoration: underline;
        cursor: pointer;
    }
}

.grid-item {
    position: relative;
    box-shadow: 2px 2px 2px 2px rgba(100, 100, 100, 0.2);
    cursor: pointer;
}

.darkmode .grid-item {
    box-shadow: 2px 2px 2px 2px rgba(0, 0, 0, 0.2);
}


.grid-item-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.grid-item-content .inner-wrap {
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
}

.grid-item-content .inner-div {
    top: 10%;
    padding: 8px 16px;
    background-image: linear-gradient(to left, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.6));
}

.grid-item-content .title {
    display: flex;
    text-decoration: none;
    color: white;
    font-size: 2rem;
    font-weight: 500;
}

.grid-item-content .description {
    width: 100%;
    display: flex;
    flex-grow: 1;
    align-items: center;
    opacity: 0;
    font-size: 1.5rem;
    font-weight: 500;
    color: white;
    padding: 5%;
    background: rgba(0,0,0,0.6);
    box-sizing: border-box;
}

.grid-item-content:hover .inner-div {
    opacity: 1;
    transition-property: opacity;
    background: rgba(0,0,0,0.6);
}

.grid-item-content:hover .description {
    opacity: 1;
    transition-property: opacity;
}

.span-row-6 {
    grid-row: span 6 / auto;
}

.span-col-2 {
    grid-column: span 2 / auto;
}

#terms-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #333;
    color: white;
    padding: 8px 16px;
    align-items: center;
    justify-content: center;
    display: none;
}

#terms-banner a {
    color: #f4a261;
    text-decoration: underline;
}

#accept-btn {
    margin: 8px 0 0 8px;
    background: #f4a261;
    border: none;
    padding: 8px 16px;
    cursor: pointer;
    color: #fff;
    border-radius: 5px;
    font-weight: 500;
    font-size: large;
}

@media (max-width: 675px) {
    #terms-banner {
        flex-direction: column;
    }
}

@media (max-width: 800px) {
    .container {
        height: auto;
        grid-template-columns: repeat(1, 1fr);
        overflow-y: auto;
        padding: 5%;
    }
    .grid-item {
        height: 300px;
    }
}

@media (max-width: 1200px) {
    .container {
        padding: 5%;
    }
    .grid-item-content .title {
        font-size: 1.5rem;
    }
}

.firebase-emulator-warning {
    display: none !important;
}

main {
    height: calc(100dvh - 54px);
}

.content {
    height: 100%;
}

header {
    display: flex;
    background-color: var(--base-color);
    border-bottom: 1px solid var(--text-color);
}

header .title {
    color: var(--text-color);
    font-weight: 500;
    text-transform: uppercase;
    margin-right: auto;
    padding: 1em;
    cursor: pointer;
    user-select: none;
}

header .material-icons {
    user-select: none;
    cursor: pointer;
}

nav ul {
    list-style: none;
    display: flex;
}

nav li {
    display: flex;
}

nav .link {
    display: flex;
    text-decoration: none;
    color: var(--text-color);
    padding: 1em;
    font-weight: 500;
    transition: background-color 500ms ease;
    user-select: none;
}

nav .link.hide {
    display: none;
}

nav .link:hover {
    background-color: var(--hover-color);
    cursor: pointer;
}

nav .active-link .link {
    color: darkred;
}

.darkmode nav .active-link .link {
    color: red;
}

nav .accent-link { 
    color: var(--active-text-color);
    background-color: var(--accent-color);
}

nav .download-link {
    display: none;
}

@media (max-width: 559px) {
    .link.download-link {
        display: flex;
    }
}

.drawer-button-open {
    display: none;
    color: var(--text-color);
    padding: 0.5em;
}

.drawer-button-close {
    display: none;
    color: var(--text-color);
    padding: 0.5em;
    margin-left: auto;
}

.overlay {
    background: rgba(0, 0, 0, 0.5);
    position: fixed;
    inset: 0;
    z-index: 9;
    display: none;
}

@media (max-width: 697px) {
    .drawer-button-open, .drawer-button-close {
        display: block;
    }

    nav {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: min(15em, 100%);
        z-index: 10;
        border-left: 1px solid var(--text-color);
        transition: right 300ms ease-in-out;
        background-color: var(--base-color);
    }
    
    nav.show {
        right: 0;
    }

    nav.show ~ .overlay {
        display: block;
    }

    nav ul {
        width: 100%;
        flex-direction: column;
    }
      
    nav .link {
        width: 100%;
        padding-left: 2.5em;
    }

    nav .active-link {
        border-bottom: none;
    }

    nav .link.accent-link{ 
        margin-left: 0px;
    }
}

.marquee {
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
    a {
        color:#2196F3;
    }
}

.marquee .message {
    display: inline-block;
    font-size: small;
    padding-left: 100%;
    animation: marquee 20s linear infinite;
}

.grid-custom-toolbar-bottom:hover .marquee .message {
    animation-play-state: paused;
}

@media (max-width: 600px) {
    .marquee .message {
        animation-duration: 10s;
    }
}

@media (max-width: 800px) {
    .marquee .message {
        animation-duration: 15s;
    }
}

@keyframes marquee {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(-100%, 0);
    }
}

.mdc-dialog {
    z-index: 11;
}

.mdc-text-field .mdc-text-field__input {
    caret-color: var(--text-color);
}

.mdc-text-field--filled:not(.mdc-text-field--disabled) {
    background-color: var(--base-variant);
}

.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__input {
    color: var(--text-color);
}

.mdc-text-field:not(.mdc-text-field--disabled) .mdc-floating-label {
    color: var(--text-color);
}

.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-line-ripple::before {
    border-bottom-color: var(--text-color);
}

.mdc-text-field--filled .mdc-line-ripple::after {
    border-bottom-color: var(--text-color);
}

.mdc-select-disabled {
    pointer-events: none;
}

.mdc-select .mdc-list-item--disabled .mdc-list-item__text {
    color: gray;
}

.mdc-select-disabled .mdc-select__dropdown-icon {
    display: none;
}

.mdc-select--filled:not(.mdc-select--disabled) .mdc-select__anchor {
    background-color: var(--base-variant);
}

.mdc-select:not(.mdc-select--disabled).mdc-select--focused .mdc-floating-label {
    color: var(--text-color);
}

.mdc-select:not(.mdc-select--disabled) .mdc-floating-label {
    color: var(--text-color);
}

.mdc-select:not(.mdc-select--disabled) .mdc-select__selected-text {
    color: var(--text-color);
}

.mdc-select:not(.mdc-select--disabled) .mdc-select__dropdown-icon {
    fill: var(--text-color);
}

.mdc-select:not(.mdc-select--disabled).mdc-select--focused .mdc-select__dropdown-icon {
    fill: var(--text-color);
}

.mdc-select__menu {
    color: var(--text-color);
    background-color: var(--base-color);
}

.mdc-select__menu li:hover {
    background-color: var(--hover-color);
}

.mdc-list-item--selected {
    background-color: var(--hover-color);
}

.mdc-snackbar__surface {
    min-width: unset;
    background-color: var(--text-color);
}

.mdc-snackbar__label {
    color: var(--base-color);
}

.dropdown {
    position: relative;
    display: inline-block;
    width: 69px;
    height: 36px;
    font-size: 20px;
    text-align: center;
    color: var(--text-color);
    background-color: var(--base-variant);
}

.dropdown .dropdown-selected {
    height: 100%;
    align-content: center;
    cursor: pointer;
}

.dropdown .dropdown-items {
    position: fixed;
    width: inherit;
    background-color: var(--base-variant);
    box-shadow: 0 4px 8px rgba(0, 0, 0, .12);
    z-index: 8;
    max-height: 160px;
    user-select: none;
    overflow-y: auto;
}

.dropdown .dropdown-items div {
    padding: 4px;
    cursor: pointer;
}

.dropdown .dropdown-items div:hover {
    background-color: var(--hover-color);
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    -webkit-transition: .4s;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 12px;
    width: 12px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    -webkit-transition: .4s;
    transition: .4s;
}

input:checked + .slider {
    background-color: var(--accent-color);
}

input:focus + .slider {
    box-shadow: 0 0 1px var(--text-color);
}

input:checked + .slider:before {
    -webkit-transform: translateX(26px);
    -ms-transform: translateX(26px);
    transform: translateX(26px);
}

.slider.round {
    border-radius: 20px;
}

.slider.round:before {
    border-radius: 50%;
}

.hide {
    display: none !important;
}

.invisible {
    visibility: hidden;
}
.mdc-dialog .mdc-dialog__title, .mdc-dialog .message {
    color: var(--text-color);
}

.mdc-dialog .mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__icon--trailing {
    color: var(--text-color);
}

.mdc-dialog .mdc-select__selected-text, .mdc-dialog .mdc-text-field__input, .mdc-dialog .mdc-list-item__text {
    font-size: 14px;
}

.mdc-dialog .mdc-button:not(:disabled) {
    color: var(--text-color);
}

.mdc-dialog .mdc-button:not(.mdc-button--raised):hover {
    background-color: var(--hover-color);
}

.mdc-dialog .mdc-dialog__button.delete {
    display: none;
    margin-right: auto;
    color: darkred;
}

.mdc-dialog .mdc-form-field {
    color: var(--text-color);

    .mdc-checkbox .mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background {
        background-color: var(--text-color);
        border-color: var(--text-color);
    }

    .mdc-checkbox .mdc-checkbox__native-control:enabled:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background {
        border-color: var(--text-color);
        background-color: transparent;
    }

    .mdc-checkbox .mdc-checkbox__native-control:enabled~.mdc-checkbox__background .mdc-checkbox__checkmark {
        color: var(--base-color);
    }

    label {
        margin-right: 0;
        padding-right: 4px;
        cursor: pointer;
        user-select: none;
    }

    .mdc-checkbox--disabled ~ label {
        cursor: default;
    }
}

.darkmode .mdc-dialog .mdc-dialog__button.delete {
    color: red;
}

.dialog-confirm {
    z-index: 12;
}

.dialog-input .mdc-text-field {
    width: 300px;
}

.mdc-dialog .mdc-select .mdc-list {
    max-height: 200px;
}

.dialog-input .mdc-dialog__content, .dialog-athlete .mdc-dialog__content, .dialog-meet .mdc-dialog__content, .dialog-meet-request .mdc-dialog__content, .dialog-result .mdc-dialog__content, .dialog-export .mdc-dialog__content {
    display: flex;
    flex-direction: column;
}

.dialog-athlete .mdc-text-field, .dialog-athlete .mdc-select, .dialog-meet .mdc-text-field, .dialog-meet-request .mdc-text-field, .dialog-meet .mdc-select, .dialog-login .mdc-text-field, .dialog-export .mdc-text-field {
    width: 300px;
}

.mdc-dialog i {
    cursor: pointer;
    user-select: none;
}

.dialog-login i {
    display: none;
}

.dialog-login .mdc-dialog__header {
    display: flex;
    padding: 0 0px 9px 24px;
}

.dialog-login .mdc-dialog__title {
    font-size: 1.5em;
    padding: 0;
    flex-grow: 1;
}

.dialog-login .mdc-icon-button {
    color: var(--text-color);
    padding: 4px;
}

.dialog-login .mdc-dialog__footer {
    display: flex;
    justify-content: end;
    gap: 8px;
    padding-bottom: 16px;
}

.dialog-login .mdc-dialog__content {
    display: flex;
    flex-direction: column;
    line-height: normal;
}

.dialog-login .mdc-text-field:hover > i {
    display: inline-block;
}

.dialog-login .form-login, .dialog-login .form-recover {
    display: flex;
    flex-direction: column;
}

.dialog-login .recover-instructions {
    display: inline-block;
    max-width: 300px;
    color: var(--text-color);
    overflow-wrap: break-word;
    padding-bottom: 16px;
}

.dialog-login .mdc-button {
    min-width: 88px;
}

.dialog-login .mdc-button--raised .mdc-button__label {
    color: var(--base-color);
}

.darkmode .dialog-login .mdc-button--raised {
    background-color: var(--text-color);
}

.dialog-ms-roster .mdc-dialog__surface {
    height: calc(100% - 128px);
}

.span-decimal, .span-colon, .span-unit {
    font-size: 20px;
    padding: 0px 8px;
    color: var(--text-color);
}

.div-inputs {
    display: flex;
    justify-content: center;
    align-items: center;
}

.dialog-export .mdc-select__menu {
    width: 300px;
}

.dialog-export .mdc-select .mdc-list {
    max-height: 200px;
}

.dialog-meet-request .requester {
    color: var(--text-color);
    padding: 8px;
    font-size: small;
}

.helper-text {
    display: inline-block;
    max-width: 300px;
    color: darkred;
    margin: 8px 0;
    font-size: small;
    font-weight: 500;
    overflow-wrap: break-word;
}

.darkmode .helper-text {
    color: red;
}

.helper-pass {
    color: #2196F3;
    font-size: small;
    cursor: pointer;
    margin: 8px auto 8px 0;
}

.dialog-policy {
    margin-top: auto;
    max-width: 300px;
}

.tos-ppo {
    font-size: 12px;
    color: var(--text-color);
}

.tos-ppo a {
    color: #2196F3;
}
.dialog-performance .mdc-dialog__content {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding-bottom: 64px;
}

.dialog-performance .mdc-select__anchor, .dialog-performance .mdc-select__menu {
    width: 300px;
    user-select: none;
}

.dialog-performance .mdc-text-field {
    width: 100%;
}

.dialog-performance .div-inputs {
    padding-top: 16px;
}

.time input, .measure input {
    width: 52px;
    height: 36px;
    font-size: 20px;
    border: none;
    text-align: center;
    color: var(--text-color);
    background-color: var(--base-variant);
}

.measure input:focus, .time input:focus {
    outline: none;
    border: solid 2px var(--text-color);
    border-radius: 4px;
}

@media (width <= 500px) {
    .dialog-performance .mdc-select__anchor, .dialog-performance .mdc-select__menu {
        width: 100%;
    }
}
.dialog-individual .time, .dialog-individual .measure {
    display: none;
}

.dialog-individual .dates {
    display: none;
}

@media (width <= 500px) {
    .dialog-individual .mdc-dialog__content {
        min-width: unset;
        width: calc(100vw - 32px);
    }
    .dialog-individual .events .mdc-select__menu {
        width: 332px;
    }
}
.dialog-multi .mdc-dialog__surface {
    height: calc(100% - 32px);
}

.dialog-multi .mdc-dialog__content {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.dialog-multi .tab {
    display: flex;
}

.dialog-multi .tab button {
    flex: 1;
    align-items: center;
    color: gray;
    background-color: color-mix(in srgb, var(--base-variant) 50%, white);
    border: none;
    outline: none;
    cursor: pointer;
    font-size: large;
    font-weight: 500;
    padding: 8px 16px;
    transition: 0.3s;
    border-bottom: 1px solid var(--text-color);
}

.darkmode .dialog-multi .tab button {
    background-color: color-mix(in srgb, var(--base-variant) 50%, var(--base-variant));
}

.dialog-multi .tab button:hover {
    color: var(--text-color);
    background-color: var(--hover-color);
}

.dialog-multi .tab button.active {
    color: var(--text-color);
    background-color: var(--hover-color);
} 

.dialog-multi .tabcontent {
    display: none;
    background-color: var(--base-variant);
    flex: 1;
    overflow-y: auto;
}

.dialog-multi .tabcontent.active {
    display: flex;
    flex-direction: column;
}

.li-multi {
    display: flex;
    flex-direction: column;
}

.li-multi:nth-child(even) {
    background-color: rgba(0, 0, 0, 0.1);
}

.li-multi:not(:last-child) {
    border-bottom: solid 1px rgba(201, 201, 201, 0.2);
}

.darkmode .li-multi:not(:last-child) {
    border-color: rgba(201, 201, 201, 0.1);
}

.li-multi .mdc-select--filled:not(.mdc-select--disabled) .mdc-select__anchor, .li-multi .mdc-text-field {
    background-color: transparent;
}

.li-multi-header {
    display: flex;
    padding: 0px 16px;
}

.li-multi-footer {
    display: flex;
    padding: 0px 16px;
}

.li-multi-info {
    display: flex;
}

.composite {
    width: 500px;
}

.mdc-dialog--fullscreen .composite {
    width: 100%;
    .mdc-select__selected-text {
        font-size: small;
    }
}

.composite .meets {
    width: 60%;
}

.composite .date, .composite .dates {
    width: 40%;
}

.mdc-dialog--fullscreen .composite .meets, .mdc-dialog--fullscreen .composite .date, .mdc-dialog--fullscreen .composite .dates {
    width: 50%;
}

.composite .dates {
    display: none;
}

.actual {
    width: 400px;
}

.actual .mdc-select__menu {
    width: 100%;
}

.mdc-dialog--fullscreen .active {
    width: 100%;
}

.multi-event, .multi-result, .multi-points, .multi-total {
    height: 100%;
    color: var(--text-color);
    user-select: none;
    padding: 8px 0;
} 

.multi-event {
    flex-grow: 1;
    font-weight: 500;
}

.multi-result {
    width: 30%;
    font-size: medium;
    text-align: center;
    cursor: pointer;
    border: none;
    outline: none;
    background-color: inherit;
}

.multi-result:hover {
    background-color: var(--hover-color);
}

.multi-points {
    width: 15%;
    text-align: end;
}

.li-multi-footer .multi-points {
    font-weight: 500;
}

.multi-note {
    font-size: small;
    color: var(--text-color);
    background-color: var(--base-color);
    text-align: center;
    user-select: none;
}

.multi-total {
    flex: 1;
    font-weight: 500;
}

@media (min-width: 592px) {
    .dialog-view-multi .mdc-dialog__surface {
        max-width: unset;
    }
}
.dialog-relay .mdc-dialog__surface {
    height: 704px;
}

.dialog-relay .mdc-dialog__content {
    display: flex;
    flex-direction: column;
    overflow-x: auto;
    width: 400px;
}

.dialog-relay.mdc-dialog--fullscreen .mdc-dialog__content {
    width: 100%;
}

.dialog-relay .mdc-dialog--fullscreen {
    .leg {
        width: 100%;
    }
}
.dialog-result .mdc-dialog__content {
    padding-bottom: 0;
}

.dialog-result .div-inputs input {
    width: 52px;
    height: 36px;
    font-size: 20px;
    border: none;
    text-align: center;
    color: var(--text-color);
    background-color: var(--base-variant);
}

.dialog-result input:focus {
    outline: none;
    border: solid 2px var(--text-color);
    border-radius: 4px;
}

.dialog-result-points input {
    width: 100%;
}

.dialog-result .clear {
    margin-right: auto;
}

.metric {
    display: none;
}

.unit-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 16px;
}

.unit-container label {
    color: var(--text-color);
    font-size: small;
    cursor: pointer;
    padding: 4px 16px 4px 8px;
}

.unit-container input[type='radio'] {
    accent-color: var(--text-color);
}

.unit-container input[type='radio']:not(:checked) {
    appearance: none;
    background-color: transparent;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    border: 1px solid var(--text-color);
}
.dialog-title {
    display: flex;
    align-items: center;
}

.dialog-view .mdc-dialog__title {
    flex: 1;
    padding-bottom: 0;
}

.dialog-view .mdc-dialog__subtitle {
    padding: 0 24px 8px 24px;
    text-align: center;
    color: var(--accent-color);
    font-weight: 500;
}

.dialog-view .mdc-dialog__content {
    padding-top: 0;
}

.dialog-title .material-icons {
    padding: 16px;
    cursor: pointer;
    user-select: none;
}

.dialog-view table {
    width: 100%;
    color: var(--text-color);
    border-collapse: collapse;
}

.dialog-view-multi table tr:first-child, .dialog-view-multi table tr:nth-child(7) {
    font-weight: 500;
    font-size: medium;
    color: var(--base-color);
    background-color: var(--text-color) !important;
}

.dialog-view table td {
    padding: 4px 8px;
    white-space: nowrap;
}

.dialog-view tr:nth-child(odd) {
    background: rgba(0, 0, 0, 0.05);
}

.darkmode .dialog-view tr:nth-child(odd) {
    background: rgba(255, 255, 255, 0.02);
}

.dialog-view tr:hover {
    background: rgba(0, 0, 0, 0.1);
}

.darkmode .dialog-view tr:hover {
    background: rgba(255, 255, 255, 0.1);
}
