:root {
    --background-color: white;
    --menu-background-color: white;
    --text-color: black;
    --heading-color: cornflowerblue;
    --icons-color: white;
    --menu-highlight-color: lightgoldenrodyellow;
    --shimmer-color-1: rgba(255, 255, 255, 0.0);
    --shimmer-color-2: rgba(255, 255, 255, 0.75);
}
[theme="dark"] {
    --background-color: black;
    --menu-background-color: #202020;
    --text-color: lightgray;
    --heading-color: darkblue;
    --icons-color: gray;
    --menu-highlight-color: #403000;
    --shimmer-color-1: rgba(250, 250, 210, 0.0);
    --shimmer-color-2: rgba(250, 250, 210, 0.75);
}

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

body {
    background-color: var(--background-color);
    display: flex;
    flex-direction: column;
}

#header {
    height: 12vmin;
    z-index: 1;
    background-color: var(--heading-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#board {
    flex-grow: 1;
    padding-top: 2vh;
    padding-bottom: 2vh;
}

#appName {
    font-size: 7vmin;
    font-family: Montserrat, Arial, sans-serif;
    color: var(--icons-color);
    user-select: none;
}

label {
    cursor: inherit;
}

.svgButton {
    cursor: pointer;
}
.svgButton > path {
    stroke: var(--icons-color);
}
.svgButton > polygon {
    fill: var(--icons-color);
}

#openMenu {
    height: 70%;
}

#menuButton {
    margin-left: 2vmin;
    height: 100%;
}

#newGame {
    visibility: hidden;
    margin-right: 3vmin;
    height: 70%;
}

#menuToggle {
    display: none;
}

#menu {
    display: none;
    cursor: initial;
}
#menuToggle:checked + #menu {
    display: block;
    position: fixed;
    top: 12vmin;
    left: 0;
    margin: 0;
    bottom: 0;
    padding-right: 3vmin;
    background: linear-gradient(to left,
        transparent,
        rgba(0, 0, 0, 0.0125) 0.5vmin,
        rgba(0, 0, 0, 0.05) 1vmin,
        rgba(0, 0, 0, 0.2) 2vmin,
        rgba(0, 0, 0, 0.3125) 2.5vmin,
        rgba(0, 0, 0, 0.5) 3vmin,
        var(--menu-background-color) 3vmin);
    color: var(--text-color);
}

.menuItem {
    display: block;
    cursor: pointer;
    margin: 0.1em;
    padding: 0.6em;
    padding-top: min(0.6em, 1.25vh);
    padding-bottom: min(0.6em, 1.25vh);
    font-family: Arial, Helvetica, sans-serif;
    font-size: min(5vw, 4vh);
    text-align: left;
}

/* conditioning on span since mobile browsers like to keep the hover property after toggling checkboxes */
span.menuItem:hover {
    background-color: var(--menu-highlight-color);
}

.selectedMenuItem {
    font-weight: bold;
}

hr {
    margin: 2vmin;
}

#mark_fixed {
    display: none;
}

#mark_fixed + span::before {
    content: "☐ ";
}

#mark_fixed:checked + span::before {
    content: "☑ ";
}

#light_mode {
    display: none;
}

#light_mode + span::before {
    content: "🌛";
}

#light_mode:checked + span::before {
    content: "🌞";
}

@keyframes shimmer {
    0% {background-position: 100% 0%;}
    100% {background-position: 0% 100%;}
}

#shimmer {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: linear-gradient(60deg, var(--shimmer-color-1) 30%, var(--shimmer-color-2) 50%, var(--shimmer-color-1) 70%);
    background-size: 300% 300%;
    background-position: 0% 100%;
}

#shimmer.animate {
    display: block;
    animation-delay: 1s;
    animation: shimmer 6s;
}

.draggedElement {
    pointer-events: none;
}

.dropTarget {
    opacity: 0.6;
}

.fix_mark {
    fill: black;
}

#board[mark_fixed_pieces="false"] .fix_mark {
    display: none;
}

#helpButton {
    position: absolute;
    right: 3vmin;
    bottom: 4vmin;
    width: 12vmin;
    height: 12vmin;
    z-index: 1;
    background-color: var(--heading-color);
    border-radius: 50%;
    box-shadow: 0.1vmin 0.25vmin 0.5vmin -0.1vmin rgba(0, 0, 0, 0.5), 0 0.1vmin 3vmin 0 rgba(0, 0, 0, 0.25);
}

#helpModal {
    display: none;
    position: fixed;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    z-index: 2;
}

#thumb {
    position: fixed;
    width: 6vmin;
    height: 6vmin;
    border-radius: 3vmin;
    background: radial-gradient(var(--text-color) 0.5vmin, transparent 3vmin);
}

#thumb.pressed {
    background: radial-gradient(var(--text-color) 2vmin, transparent 3vmin);
}
