:root {
    --color-scheme: light dark;
    --chessreg-blue: #4485ab;
    --important-text: rgb(255, 100, 0);
    --background-color: light-dark(#fff, #1e1d1d);
    --h1-color: light-dark(#0f3c56, #268eca);
    --form-label-color: light-dark(#09222f, #78bade);
    --fee-text-color: light-dark(darkred, red);
    --def-term: light-dark(#3c3b3b, #dfd8d8);
    --form-description-color: light-dark(#555, #c4bebe);
    --a-color: light-dark(blue, #cfd3ea);
    --error-text-color: light-dark(rgb(194, 62, 62), rgb(202, 108, 108));
    --net-income-color: light-dark(darkgreen, rgb(42, 197, 42));

    /* Color themes (for the ColorThemeWidget) */
    --ocean-blue: light-dark(#005bbd, #4da3ff);
    --forest-green: light-dark(#1d7f36, #56e887);
    --bright-red: light-dark(#c62828, #ff6b6b);
    --sunset-orange: light-dark(#e65100, #ffab40);
    --royal-purple: light-dark(#6a1b9a, #d28cff);
    --goldenrod: light-dark(#b8860b, #ffd85e);
    --teal: light-dark(#00796b, #5df2d6);
    --raspberry: light-dark(#ad1457, #ff77a9);
    --slate-gray: light-dark(#455a64, #b0bec5);
    --chocolate: light-dark(#4e342e, #bcaaa4);

}

html.light {
    color-scheme: light;
}

html.dark {
    color-scheme: dark;

    body {
        background-blend-mode: color-burn;
    }

    :root {
        --dt-row-stripe-alpha: .83;
    }

    .select2-results {
        background-color: var(--background-color);
    }

    .select2-container--default .select2-selection--multiple .select2-selection__choice {
        background-color: var(--background-color);
    }
}

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    margin: 0;
}

body {
    font-family: sans-serif;
    background: var(--background-color);
}

label {
    display: block;
}

input[type=submit].disabled {
    pointer-events: none;
    /* Prevents the button from being clickable */
    opacity: 0.5;
    /* Makes the button look disabled */
}

#theme-toggle-button {
    border: none;
    border-radius: 9999px;
    padding: 0.2em .5em;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
    font-size: 1.2em;
}

.required label::after {
    color: #e32;
    content: '*';
    display: inline;
}

.watermark-development {
    background-image: url("../img/watermark_development.gif");
    background-repeat: repeat
}

.watermark-staging {
    background-image: url("../img/watermark_staging.gif");
    background-repeat: repeat;
}

.layout {
    display: flex;
    flex-flow: column nowrap;
    height: 100%;
    gap: 10px;
}

.layout__header {
    display: flex;
    flex-flow: column nowrap;
    align-items: center;
    background-color: var(--chessreg-blue);
    flex: 0 1 auto;
}

.layout__content {
    padding: 0 5px;
    flex: 1 1 auto;
}

.layout__footer {
    background-color: var(--chessreg-blue);
    flex: 0 1 100px;
    padding: 10px 0px;
    display: flex;
    flex-flow: column wrap;
    gap: 10px;
    align-items: center;
    color: white;
}

h1 {
    color: var(--h1-color);
    margin: 0;
    padding: 0;
}

h2 {
    font-size: 1.1em;
    border-bottom: 1px solid var(--chessreg-blue);
}

h3 {
    margin: 0;
}

a {
    text-decoration: none;
    color: var(--a-color);
}

a:hover {
    text-decoration: underline;
}

.flash-message {
    margin: auto 0;
    white-space: pre;
    padding: 5px;
    width: 100%;
    text-align: left;
    font-size: 1.1em;
    box-shadow: 0px -1px 1px black;
}

.flash-message--success {
    color: #fff;
    font-weight: bold;
    background-color: #357c1f;
}

.flash-message--error {
    background: darkred;
    color: white;
}

.flash-message--warning {
    background: rgb(69, 45, 7);
    color: white;
}

.important-text {
    color: var(--important-text);
    font-weight: bold;
}

.noselect {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.nav-overlay {
    display: none;
    position: fixed;
    opacity: .5;
    background-color: #000;
    width: 100%;
    height: 100%;
}

.nav-overlay--open {
    display: block;
}

.nav-menu {
    position: fixed;
    display: none;
    top: 0;
    bottom: 0;
    z-index: 5001;
    background-color: #0e1b23;
    border-right: 1px solid #070d11;
    box-shadow: 2px 1px 10px black;
    overflow-y: scroll;
    overflow-x: hidden;
    padding: 20px;
    color: white;
}

@media (max-width: 1024px) {
    .nav-menu {
        width: 80%;
    }
}

@media (min-width: 851px) {
    .nav-menu {
        width: 20%;
    }
}

.nav-toggle {
    position: fixed;
    top: 0;
    cursor: pointer;
    z-index: 5000;
    user-select: none;
    background-color: black;
    border: none;
}

.nav-toggle--public {
    border-bottom-left-radius: 5px;
    right: 0;
    color: white;
}

.nav-toggle--auth {
    border-bottom-right-radius: 5px;
    left: 0;
}

.nav-menu__hamburger-icon {
    fill: white;
    cursor: pointer;
}

.nav-menu--public {
    text-align: right;
    right: 0;
}

.nav-menu--open {
    display: block;
}

.nav-menu__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-flow: column nowrap;
    gap: 10px;
}

.nav-menu__separator {
    opacity: .2;
}

.nav-menu__list--level2 {
    padding-left: 20px;
}

.nav-menu__item {
    padding-left: 20px;
}

@media (max-width: 1024px) {
    .nav-menu__list {
        gap: 25px;
    }
}

.nav-menu__header {
    font-weight: bold;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.nav-menu__link {
    color: #fff;
    text-decoration: none;
    transition: color .3s;
}

.nav-menu__link--current {
    color: #949292;
    text-decoration: none;
    transition: color .3s;
}

.nav-menu nav.navigation-div ul li a:hover {
    color: #dedae7ce;
}

.collapsible {
    cursor: pointer;
    transition: color 0.3s ease;
    padding-bottom: 5px;
}

.collapsible:hover::before {
    color: #a0a0a0;
}

.collapsible::before {
    content: "▶";
    display: inline-block;
    margin-right: 0.5em;
    font-size: 0.9em;
    line-height: .9;
    transform: rotate(90deg);
    transition: transform 0.2s ease;
}

.collapsible.collapsed::before {
    transform: rotate(0deg);
}

.collapsible.collapsed {
    border-bottom: 1px solid #222e37;
}

@media only screen and (min-width: 1025px) {
    .squeeze {
        margin: 0 auto;
        width: 60%;
    }

    .squeeze-no-flex {
        margin: 0 auto;
        width: 60%;
    }
}

.squeeze {
    display: flex;
    flex-flow: column wrap;
    gap: 20px;
}

.checkerboard {
    background-color: var(--chessreg-blue);
    background-image:
        linear-gradient(45deg, #4c8cb1 25%, transparent 25%),
        linear-gradient(-45deg, #4c8cb1 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #4c8cb1 75%),
        linear-gradient(-45deg, transparent 75%, #4c8cb1 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0;
}

.cookies-disabled-message {
    padding: 10px;
    background-color: red;
    color: white;
    font-weight: bold;
    font-size: 1.2em;
    text-align: center;
    display: none;
}

.roster-button {
    text-shadow: 0 -1px rgba(0, 0, 0, 0.4);
    text-align: center;
    font-size: 1.5em;
    border-radius: 4px;
    outline: 0;
    padding: 10px 40px;
    margin: 5px;
    box-shadow: inset 0px 1px 2px rgba(255, 255, 255, 0.4);
    cursor: pointer;
    border: solid 1px rgb(0, 19, 128);
    background-color: #78b4b7;
    color: #1d271b;
    width: fit-content;
    display: inline-block;
}

.register-button {
    display: inline-block;
    text-shadow: 0 -1px rgba(0, 0, 0, 0.4);
    text-align: center;
    font-size: 1.5em;
    border-radius: 4px;
    outline: 0;
    padding: 10px 40px;
    margin: 5px;
    box-shadow: inset 0px 1px 2px rgba(255, 255, 255, 0.4);
    cursor: pointer;
    width: fit-content;
}

.register-button--open {
    border: solid 1px green;
    background-color: #82b778;
    color: #1d271b;
}

.register-button--wait-list {
    border: solid 1px #aaa;
    background-color: #ccc;
    color: #4e4e4e;
}

.roster-button:hover,
.roster-button:focus,
.register-button:hover,
.register-button:focus {
    text-decoration: none;
    box-shadow: inset 0px 1px 2px rgba(255, 255, 255, 0.6);
}

.roster-button:active,
.register-button:active {
    box-shadow: inset 0px 1px 4px rgba(0, 0, 0, 0.6);
}

.roster-button--small,
.register-button--small {
    padding: 5px;
    font-size: .9em;
}

.tab-widget__panels {
    padding: 10px;
    border: 1px solid #ccc;
    border-top-right-radius: 3px;
    border-bottom-right-radius: 3px;
    border-bottom-left-radius: 3px;
}

.tab-widget__tabs {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 10px;
    margin-bottom: -1px;
}

.tab-widget__link {
    text-decoration: none;
    padding: 8px 16px;
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
    border-left: 1px solid #ccc;
    border-right: 1px solid #ccc;
    border-top: 1px solid #ccc;
    display: inline-block;
    background-color: #ccc;
    color: black;
}

.tab-widget__link:hover {
    text-decoration: none;
}

.tab-widget__link--active {
    text-shadow: 0px -1px rgba(0, 0, 0, 0.4);
    background-color: #fff;
    color: black;
    transition: all .1s linear;
}

.tab-widget__panels {
    display: flex;
}

.tab-widget__panel {
    display: none;
    gap: 10px;
    flex-flow: column nowrap;
    width: 100%;
}

.tab-widget__panel--active {
    display: flex;
    transition: all .1s linear;
}

.home-page-links {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-flow: column nowrap;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    margin-bottom: 10px;
}

.events {
    margin: 0;
    width: 100%;
    display: flex;
    flex-flow: column nowrap;
    gap: 10px;
}

.events__timezone-label {
    font-weight: normal;
}

.header__list,
.events__list {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-flow: column nowrap;
    gap: 15px;
}

.events__search {
    width: 100%;
    background: url('/img/icons/zoom_icon&16.png') no-repeat scroll 7px center;
    box-shadow: inset 0px -1px 0px #ccc;
    border: none;
    margin: 0;
    padding: 5px;
    padding-left: 34px;
    border-bottom: 1px solid black;
}

.header__item,
.events__item {
    display: flex;
    flex-flow: row nowrap;
    justify-content: space-between;
    gap: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #a0a0a0;
}

.events__image {
    max-width: 100%;
    max-height: 100%;
}

.header__date,
.events__date-and-image {
    flex: 1;
    display: flex;
    flex-flow: column nowrap;

    align-items: center;
}

.header__details,
.events__details {
    flex: 5;
    display: flex;
    flex-flow: column wrap;
    justify-content: center;
    gap: 10px;
}

.events__link {
    display: flex;
    flex-flow: column wrap;
    gap: 10px;
}

.header__controls,
.events__controls {
    flex: 1;
    display: flex;
    flex-flow: column nowrap;
    align-items: flex-start;
    gap: 5px;
    justify-content: center;
}

.header__item {
    font-weight: bold;
    padding: 5px;
}

.events__timezone-control {
    display: flex;
    flex-flow: row nowrap;
    gap: 10px;
    justify-content: center;
}


@media (max-width: 1024px) {
    .header {
        display: none;
    }

    .events__item {
        flex-flow: column wrap;
    }

    .events__date-and-image,
    .events__controls,
    .events__details {
        justify-content: center;
        align-items: center;
        text-align: center;
        flex: 1;
    }

    .events__image {
        max-height: 200px;
    }

    .events__roster-button a,
    .events__register-button a {
        font-size: 1.1em;
        padding: 5px;
        width: 100%;
        flex: 1;
    }

    .events__buttons-container {
        display: flex;
        flex-flow: row nowrap;
        gap: 5px;
        width: 100%;
        justify-content: center;
    }
}

@media (min-width: 1025px) {
    .events {
        margin: 0 auto;
        width: 80%;
    }

    .events__buttons-container {
        display: flex;
        flex-flow: column nowrap;
        gap: 5px;
        align-items: flex-start;
    }

    .events__controls a {
        font-size: .9em !important;
        padding: 5px !important;
        margin: 0;
    }
}

.events__timezone-control {
    display: flex;
    flex-flow: row nowrap;
    gap: 10px;
    justify-content: center;
}

.table-tabs__list {
    list-style: none;
    margin: 0;
    padding: 0 0 0 10px;
    display: flex;
    flex-flow: row nowrap;
    gap: 10px;
    border-bottom: 1px solid var(--chessreg-blue);
}

.table-tabs__item {
    padding: 0px 7px;
    margin: 0;
    border: 1px solid var(--chessreg-blue);
    border-bottom: none;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
    background-color: var(--chessreg-blue);
    color: white;
}

.table-tabs__item--current {
    color: black;
    background-color: white;
    border-bottom: none;
    margin-bottom: -1px;
}

.table-tabs__link {
    color: white;
}

.table-tabs__item--current .table-tabs__link {
    color: black;
}

.table-tabs__link:hover {
    text-decoration: none;
}

.unimportant-text {
    color: #a0a0a0;
}

.page-data {
    display: none;
}

.dt-button {
    padding: 5px !important;
    line-height: .8em !important;
    margin: 0 !important;
}

.disabled-search-row-input {
    visibility: hidden;
}

.column-search-input {
    border: 1px solid #a0a0a0;
}

.column-search-header {
    padding: 2px !important;
}

.custom-layout {
    display: flex;
    flex-flow: row nowrap;
    gap: 10px;
    align-items: center;
}

.dtr-control {
    white-space: nowrap;
}

.event-image {
    display: flex;
    flex-flow: column nowrap;
    gap: 10px;
    align-items: center;
}

.event-image__constrainer {
    max-width: 400px;
    text-align: center;
}

.server-side-instant-iso8601-string {
    white-space: nowrap;
}

.format-client-side-instant {
    visibility: hidden;
    white-space: nowrap;
}

.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
}

.modal-content {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 20px;
    width: 100%;
    height: 100%;
}

.spinner {
    display: inline-block;
    width: 60px;
    height: 60px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.home-page-intro {
    display: flex;
    flex-flow: column nowrap;
    align-items: center;
    gap: 5px;
}

.home-page-intro__text {
    text-align: center;
}

.control-and-description {
    display: flex;
    flex-flow: row nowrap;
    width: fit-content;
    align-items: stretch;
}

.control-and-description__control {
    padding: 10px;
    display: flex;
    align-items: center;
    border-top: 1px solid light-dark(#d4d1d1, #111);
    border-left: 1px solid light-dark(#d4d1d1, #111);
    border-bottom: 1px solid light-dark(#d4d1d1, #111);
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
    background-color: light-dark(#fff, #777);
}

.control-and-description__description {
    padding: 10px;
    background-color: light-dark(#d4d1d1, #000);
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
    border-top: 1px solid light-dark(#d4d1d1, #111);
    border-right: 1px solid light-dark(#d4d1d1, #111);
    border-bottom: 1px solid light-dark(#d4d1d1, #111);
}

.events__not-visible-indicator {
    user-select: none;
}