:root {
  --header-color: #0000a1;
  --options-color: #ffffff;
  --cmenu-color: #c1c7c8;
  --border-size: 3px;
}

body {
  background-image: url("imgs/CHESS.BMP");
  image-rendering: pixelated;
}

* {
  -webkit-user-drag: none;
}

@font-face {
  font-family: msSansSerif;
  src: url("fonts/ms-sans-serif-2.ttf");
}

th {
  font-size: large;
  text-align: left;
  position: sticky;
  top: 0px;

  background-color: white;
  z-index: 5;
}

thead {
  background-color: white;
  z-index: 6;
}

:is(th, td):not(:last-child) {
  border-right: 1px solid black;
  padding: 0px 0.5rem 0px 0.5rem;
}

.leaderboard-table-container {
  max-height: 200px;
  overflow: scroll;
}

table {
  border-collapse: separate;
  border-spacing: 0;

  padding: 0px 10px 10px 10px;
}

.leaderboard-flex h1 {
  margin: 0.75rem 0px 0.75rem 2px;
}

.nopadding {
  padding: 0px !important;
}

.leaderboard-flex {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.game-container {
  position: absolute;

  top: 0px;
  left: 0px;

  width: fit-content;
  height: fit-content;

  filter: saturate(1);

  border: var(--border-size) solid black;

  box-sizing: border-box;
  background-color: white;
}

.window-header {
  width: 100%;
  height: 80px;

  background-color: var(--header-color);
  display: flex;
  flex-direction: column;

  font-family: msSansSerif;
}

.window-header:not(:has(.options-bar)) {
  height: 40px;
}

.window-header > div {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: row;
  border-bottom: var(--border-size) solid black;
}

.title-bar {
  justify-content: space-between;
  color: var(--options-color);

  user-select: none;
}

.title-bar h1 {
  padding-top: 2px;
}

.title-bar button {
  height: 100%;
  aspect-ratio: 1 / 1;
  border: none;
}

.options-bar h2:hover {
  background-color: var(--header-color);
  color: white;
}

/* Menu Bar */

.options-bar {
  justify-content: left;
  gap: 1em;

  background-color: var(--options-color);
  padding: 0px 1em 0px 1em;
  box-sizing: border-box;

  overflow: hidden;

  user-select: none;
}

.options-bar h2 {
  height: 80%;
  padding: 0.25em;
  padding-bottom: auto;
}

.options-bar h2::first-letter {
  text-decoration: underline;
}

/* Context Menus */

.context-menu > div {
  width: 13em;
  height: fit-content;

  display: flex;
  flex-direction: column;

  position: absolute;

  background-color: var(--cmenu-color);
  outline: 1px outset;
  margin: 0.5px;

  z-index: 100;
}

.context-menu {
  display: flex;
  flex-direction: row;

  font-family: msSansSerif;
  font-size: 20px;
  z-index: 100;

  user-select: none;
}

.context-menu hr {
  width: 100%;
  height: 3px;
  color: black;
  /* margin: 0.15em 0px 0.35em 0px; */
}

.context-menu > div > .shortcut {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  padding: 0px !important;
  padding-left: 2em !important;
  padding-right: 0.75em;
}

.context-menu > div > div *:last-child {
  padding-right: 1em !important;
}

.context-menu > div *:is(p, div:not(.cmenu-radio)) {
  padding: 0.25em 0px 0.15em 2em;
}

.shortcut p:first-child {
  padding-left: 0px !important;
}

.context-menu > div *:is(p, div:not(.cmenu-radio)):hover {
  background-color: var(--header-color);
  color: white;
}

.cmenu-radio > .selected::before {
  position: absolute;
  left: 0.6em;
  content: url("imgs/checkmark.svg");
  width: 5%;
  aspect-ratio: 1 / 1;
}

.cmenu-radio > .selected:hover::before {
  filter: invert(1);
}
/* 
.cmenu-radio > .selected {
    padding-left: 1.2em !important;
} */

/* Custom Field Options */

.customize {
  width: 800px !important;
  aspect-ratio: 1.5;
}

.custom-header {
  display: flex;
  flex-direction: row;
  justify-content: center;
  padding: 3em 0px 3em 0px;
  font-family: msSansSerif;

  user-select: none;
}

.custom-container {
  display: flex;
  flex-direction: row;
  justify-content: space-between;

  margin: 1%;
  /* height: 100%; */
  box-sizing: border-box;

  font-family: msSansSerif;
}

.custom-fields {
  font-size: 2em;
  display: flex;
  flex-direction: column;
  width: 350px;
  gap: 0.75em;
}

.custom-fields label {
  display: flex;
  flex-direction: row;
  gap: 1em;
}

.custom-fields input {
  font-family: msSansSerif;
  font-size: 1em;
  width: 50%;
}

.custom-fields label h2 {
  width: 50%;
}

.accept {
  width: 30%;
  font-size: 5em;
  font-family: msSansSerif;
}

/* Customize Menu */

.customize {
  position: absolute;
  left: 100px;
  top: 100px;
  background-color: var(--cmenu-color);

  display: none;
  visibility: hidden;
}

/* Buttons */

.minimize-button {
  height: 5%;
  width: 60%;

  margin-left: auto;
  margin-right: auto;

  color: white;
  outline: 2px solid black;
}

.down-button {
  width: 80%;
  height: 60%;

  margin: auto;
  margin-right: 2.5px;
  margin-bottom: 6.5px;
  padding: none;

  display: block;
  transform: rotate(225deg);
}
