:root {
    --border: #e1e6ef;

    --blue: #1f4fd8;
    --blue-soft: #f0f2ff;
    --neutral: #dddddd;
    --shadow: #808080;

    --cbsize: 640;

}

@font-face {
  font-family: "Roboto Condensed";
  src: url(../fonts/RobotoCondensed-Regular.ttf) format('truetype');
}

body {
  font-weight: normal;
  font-family: Roboto Condensed;
}

h2 {
    color: var(--blue);
    text-align: center;
}

h3 {
    text-align: center;
    font-size: x-large;
}

h4 {
  text-align: center;
  font-size: large;
  margin: 0px 0px 8px 0px;
}

canvas.chessBoard {
  width: calc(var(--cbsize) * 1px);
  height: calc(var(--cbsize) * 1px);
}

header {
  position: sticky;
  top: 0;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  background-color: #f0f0ff;
}

header strong {
    font-size: x-large;
    color: var(--blue, blue);
}

.header-inner{
  height: 60px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

img.logout {
    margin-left: auto;
    cursor: pointer;
}

div.modal {
    position: fixed;
    display: none;
    top: 0px;
    left: 0px;
    width: 100%;
    height: 100%;
    z-index: 200;
    background-color: #808080b0;
    place-items: center;
}

div.dialog {
    display: none;
    border-radius: 12px;
    padding: 12px;
    border: 2px solid var(--blue, blue);
    background-color: var(--blue-soft, white);
    z-index: 300;
}

div.buttonBox {
    display: flex;
    justify-content: flex-end;
}

div.buttonBoxOne {
    display: flex;
    justify-content: center;
}

div.container {
    display: flex;
    align-items: flex-start;
    padding: 12px;
    gap: 20px;
}

div.bottomToolbar {
  width: calc(var(--cbsize) * 1px);
}

div.alignRight {
  background-color: var(--blue-soft);
  margin-left: auto;
  width: 140px;
  height: 70px;
  border-radius: 6px;
  border: black 2px solid;
  box-shadow: 6px 6px 12px var(--shadow);
}

div.notationRow {
  display: grid;
  grid-template-columns: 80px auto;
  align-items: center;
  margin-bottom: 6px;
}

div.piecesContainer {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: repeat(2, auto);
}

div.captured {
  display: grid;
  height: 36px;
  width: 100%;
  grid-template-columns: repeat(15, 1fr);
  grid-template-rows: repeat(1, auto);
}

div.hidden {
  display: none;
}

.promotionGrid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 10px;
}

.endGameGrid {
  width: 100%;
  display: grid;
  place-items: center;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(1, 1fr);
  gap: 10px;
}

button {
    min-height: 30px;
    min-width: 100px;
    font-size: large;
    padding: 6px;
    border-radius: 6px;
    border: 1px solid var(--blue, blue);
    background-color: white;
    cursor: pointer;
}

button:hover {
    background-color: var(--blue);
    color: var(--blue-soft);
    border: 1px solid white;
}

button.eye {
    max-height: 30px;
    position: absolute;
    right: 0px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

button.eye img {
    padding-right: 0px;
}

button.panel {
    display: flex;
    min-width: auto;
    justify-content: center;
    align-items: center;
    padding-right: 0px;
    padding-left: 12px;
    border: 1px solid var(--neutral);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

button.panel:active {
    transform: translateY(4px);
    box-shadow: 0 0 0 #fff;
}

button.panel img {
    display: block;
}

button.panel:hover {
    background-color: var(--neutral);
}

button.pulse {
  background: var(--blue);
  border: 1px solid var(--blue);
  color: white;
  border: none;
  padding: 12px 20px;
  cursor: pointer;
  transition: transform 0.2s ease;
  animation: pulseShadow 1.8s infinite;
}

button.pulse:hover {
  background: white;
  color: black;
  border: 1px solid var(--blue);
}

@keyframes pulseShadow {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.45);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(37, 99, 235, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
  }
}

img {
    padding-right: 12px;
}

input {
    min-width: 400px;
    height: 30px;
    background-color: white;
}

input[type="file"] {
  height: 22px;
}

input[type="radio"]{
  min-width: auto;
  width: auto;
  height: auto;
}

label.form {
    font-size: large;
    font-weight: bold;
    margin-bottom: 9px;
    margin-right: 6px;
    vertical-align: top;
}

label.radio {
    font-size: large;
    margin-bottom:9px; 
    display:block;
}

select {
    min-height: 30px;
    font-size: larger;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
select:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px white inset !important;
  -webkit-text-fill-color: #000 !important;
  caret-color: #000 !important;
  transition: background-color 9999s ease-in-out 0s;
}

canvas {
touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;}

.input-wrapper {
    position: relative;
    display: inline-block;
}

.input-wrapper input {
    padding-left: 32px;
}

.input-wrapper .icon {
    position: absolute;
    left: 4px;
    width: 24px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

input.notation {
  min-width: 2ch;
  max-width: 2ch;
}

p.error {
    color: #c00000;
    height: 24px;
}

textarea.display {
    width: 200px;
    height: 500px;
    
}

select {
    min-width: 150px;
}

p.centered {
    width: 100%;
    text-align: center;
}

p.evaluationScore {
  margin: 0px 0px 0px 0px;
  width: 100%;
  font-size: xx-large;
  text-align: center;
}

.menu-bar {
  display: flex;
  flex-direction: row;
  align-items: center;
  border-bottom: 1px solid #aaa;
  padding: 0 4px;
  height: 30px;
  font-family: sans-serif;
}

.menu-item {
  position: relative;
}

.menu-item > button {
  height: 28px;
  padding: 0 12px;
  border: none;
  background: transparent;
  cursor: pointer;
}

.menu-item > button:hover {
  background: var(--blue);
  color: var(--blue-soft);
}

.submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 140px;
  background: white;
  border: 1px solid #999;
  box-shadow: 2px 2px 6px rgba(0,0,0,0.15);
  z-index: 1000;
}

.menu-item:hover .submenu {
  display: block;
}

.submenu-item {
  padding: 8px 12px;
  white-space: nowrap;
  cursor: pointer;
}

.submenu-item:hover {
  background: #0a64d8;
  color: white;
}

.img-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.img-checkbox input {
  position: absolute;
  opacity: 0;
}

.box {
  width: 36px;
  height: 36px;
  background-image: url("../assets/off.png");
  background-size: cover;
  background-position: center;
}

.img-checkbox input:checked + .box {
  background-image: url("../assets/on.png");
}
