/*
Addd custom square font
*/
@font-face {
  font-family: "Square";
  src: url("./fonts/squarefont/Square.ttf");
}

@font-face {
  font-family: "Squareo";
  src: url("./fonts/squarefont/Squareo.ttf");
}

body {
  margin: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: start;
}

button {
  border: none;
  box-shadow: 6px 8px #999;
  cursor: pointer;
}

button:hover {
  filter: brightness(0.8);
}

button:active {
  box-shadow: 6px 4px #666;
  transform: translateY(4px);
}

.large-title {
  font-family: "Square";
  font-size: 80px;
  margin: 0;
}

#main-title {
  margin: 20px 0 20px 0;
}

.flex-row {
  display: flex;
  flex-direction: row;
}

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

#set-size-buttons-container {
  gap: 20px;

}

.grid-size-button {
  font-size: 40px;
  font-family: "Square";
}

.small-title {
  font-family: "Square";
  font-size: 60px;
  margin: 0;
}

#middle-container {
  width: 100vw;
  align-items: start;
}

#left-col {
  position: relative;
  justify-content: start;
  align-items: end;
  height: 100%;
  max-height: 576px;
}

#left-sub-col {
  margin: auto 30px auto auto;
  height: 100%;
  justify-content: space-between;
  align-items: center;
}

.box {
  flex: 1 0 0%;
  display: flex;
  justify-content: center;
}

#right-col {
  position: relative;
  justify-content: start;
  align-items: start;
  height: 100%;
}

.row-div {
  margin: 0;
  border: 0;
  padding: 0;
  display: flex;
  flex-direction: row;
}

.col-div {
  border: solid 1px rgb(204, 0, 0);
  box-sizing: border-box;
  width: 10px;
  height: 10px;
}

#color-buttons-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  place-items: center;
  row-gap: 25px;
}

.color-button {
  border: none;
  width: 50px;
  height: 50px;
  box-shadow: 6px 8px #999;
}

.color-button:hover {
  filter: brightness(0.8);
}

.color-button:active {
  box-shadow: 6px 4px #666;
  transform: translateY(4px);
}

/* vvvvv Button Colors vvvvv */
#color-red {
  background-color: red;
}

#color-blue {
  background-color: hsl(240, 100%, 50%);
}

#color-yellow {
  background-color: yellow;
}

#color-orange {
  background-color: #ffa500;
}

#color-black {
  background-color: black;
}

#color-rainbow {
  background: linear-gradient(45deg,
      rgba(255, 0, 0, 1) 0%,
      rgba(255, 154, 0, 1) 10%,
      rgba(208, 222, 33, 1) 20%,
      rgba(79, 220, 74, 1) 30%,
      rgba(63, 218, 216, 1) 40%,
      rgba(47, 201, 226, 1) 50%,
      rgba(28, 127, 238, 1) 60%,
      rgba(95, 21, 242, 1) 70%,
      rgba(186, 12, 248, 1) 80%,
      rgba(251, 7, 217, 1) 90%,
      rgba(255, 0, 0, 1) 100%);
}

/* ^^^^^ Button Colors ^^^^^ */


#eraser-container {
  width: 100%;
  margin: 25px 0 0 0;
  align-items: end;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  place-items: center;
  row-gap: 25px;
}

#eraser {
  width: 75px;
  grid-column: 3;
  filter: drop-shadow(6px 6px 0px #999);
  cursor: pointer;
  pointer-events:painted;
}

#eraser:hover {
  filter: drop-shadow(6px 6px 0px #999) brightness(0.8);  
  
}

#eraser:active {
  transform: translateY(3px);
  filter: drop-shadow(6px 3px 0px #666) brightness(0.8);  
}

#shadow-title {
  margin: 20px auto auto auto;
}

#shadow-buttons-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  place-items: center;
  row-gap: 25px;
}

.shadow-button {
  border: none;
  width: 50px;
  height: 50px;
  box-shadow: 6px 8px #999;
  font-size: 18px;
  font-family: "Square";
  text-align: center;
}

.shadow-button:hover {
  filter: brightness(0.8);
}

.shadow-button:active {
  transform: translateY(4px);
}

#button-minus-10 {
  background-color: #bbbaba;
}

#button-reset {
  background-color: #e0dfdf;
  background-image: url(./assets/reset.svg);
  background-size: 26px;
  background-repeat: no-repeat;
  background-position: center;
}

#button-plus-10 {
  background-color: #eeeeee;
}

#clear-button {
  margin: auto auto 8px auto;
  font-size: 40px;
  font-family: "Square";
}

#middle-buttons-container {
  justify-content: space-between;
  margin: 10px 20px auto 20px;
}

.link-buttons {
  font-family: "Square";
  font-size: 26px;
  background-color: rgb(239, 239, 239);
  color: rgb(0, 0, 0);
  text-decoration: none;
  box-shadow: 6px 8px #999;
  cursor: pointer;
}

.link-buttons div {
  align-items: center;
  padding: 1px 6px 1px 6px;
}
.link-buttons .flex-row p {
  padding-top: 2px;
  margin: 0;
}

.link-buttons:hover {
  filter: brightness(0.8);
}

.link-buttons:active {
  transform: translateY(4px);
  box-shadow: 6px 4px #666;
}

#help-popup-container {
  width: 400px;
  background-color: #e0dfdf;
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  /*transform: translate(-50%, -50%); */
  transform: translate(-50%, -50%) scale(0.1);
  text-align: center;
  padding: 30px;
  visibility: hidden;
  transition: transform 0.2s;
}

#help-popup-container.open-popup {
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.open-popup button {
  font-family: "Square";
  font-size: 26px;
}

.shake-grid {
  animation: shake 1s cubic-bezier(.36,.07,.19,.97) both;
}

.transition-background-color {
  animation: background-color 1s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes background-color {
  from {
    
  }
  to {
    background-color: rgb(231, 206, 166);
  }
}

@keyframes shake {
  
  10%, 90% {
    transform: translateX(-1px);
  }
  20%, 80% {
    transform: translateX(2px);
  }
  30%, 50%, 70% {
    transform: translateX(-4px);
  }
  40%, 60% {
    transform: translateX(4px);
  }
}

.animation-move-grid-away {
  animation: move-grid-away 0.4s cubic-bezier(0.3, 0.01, 0, 0.98) forwards;
}

@keyframes move-grid-away {
  from {
    transform: translateY(0px);
  }

  to {
    transform: translateY(-750px);
  }
}

.animation-move-grid-back {
  animation: move-grid-back 0.4s cubic-bezier(0.96, -0.01, 0.21, 1.01) forwards;
}

@keyframes move-grid-back {
  from {
    transform: translateY(-750px);
  }

  to {
    transform: translateY(0px);
  }
}

.keep-grid-away {
  transform: translateY(-750px);
}