main {
    background-color: rgba(29, 187, 255, 0.616);
}

#open-btn {
  width: 100%;
  aspect-ratio: 1/1;
  border: 1px solid white;
}


#display-canvas{
    background-color: white;
    image-rendering: pixelated; 
    image-rendering: crisp-edges;
    width: 100%;
    height: auto;
    aspect-ratio: 1/1;
    padding: 0;
}

#pixel-count {
  background-color: white;
  border: 1px solid black;
  border-radius: 25px;
  height: fit-content;
  width: fit-content;
  padding: 5px;
}



.color-picker {
  display: grid;
  padding: 10px;
  grid-template-columns: repeat(8, 1fr);
  place-self: center;
  /* grid-template-rows: 1fr 1fr; */
  /* gap: 12px; */
}

.color-picker input[type="radio"] {
  display: none;
}

.color-option {
  width: clamp(10px, 4vw, 40px);
  aspect-ratio: 1/1;
  display: inline-block;
  cursor: pointer;
  border-radius: 2px;
  border: 3px solid transparent;
  transition: 0.2s;
}

/* Colors
:root{
    --color-0: #ffffff;
    --color-1: #000000;
    --color-2: #e74c3c;
    --color-3: #3498db; 
    --color-4:  #ff8336; 
    --color-5:  #f1c40f; 
    --color-6:  #ff69fd; 
    --color-7: #cd60ff; 
    --color-8: #fff12b; 
    --color-9: #18dcff; 
    --color-10: #2ecc71; 
    --color-11: #fffadb;
} */

.color-0 { background: var(--color-0) }
.color-1 { background: var(--color-1) }
.color-2 { background: var(--color-2) }
.color-3 { background: var(--color-3) }
.color-4 { background: var(--color-4) }
.color-5 { background: var(--color-5) }
.color-6 { background: var(--color-6) }
.color-7 { background: var(--color-7) }
.color-8 { background: var(--color-8) }
.color-9 { background: var(--color-9) }
.color-10 { background: var(--color-10) }
.color-11 { background: var(--color-11) }
.color-12 { background: var(--color-12) }
.color-13 { background: var(--color-13) }
.color-14 { background: var(--color-14) }
.color-15 { background: var(--color-15) }



/* Selected state */
.color-picker input[type="radio"]:checked + .color-option {
  border-color: rgb(230, 230, 230);
  transform: scale(1.1);
}

#drawing-overlay {
    position: fixed;
    inset: 0;
    background-image: url("/assets/images/water.jpg");
    z-index: 10000;

    display: grid;
    grid-template-rows: 20% 1fr;

    padding: 1rem;
    box-sizing: border-box;

    touch-action: none;
}

.closed {
    display: none;
}

.open {
  display: block;
}

#drawing-canvas{
    background-color: rgb(255, 255, 255);
    /* height: min(calc(90vw - 4rem), calc(90dvh - 4rem), 1024px); */
    height: 100%;
    /* width: min(calc(80vw), calc(80dvh), 1024px); */
    aspect-ratio: 1/1;
    image-rendering: pixelated; 
    image-rendering: crisp-edges;

    align-self: start;
    justify-self: center;


}

.toolbar {
  display: grid;
  grid-template-columns: 15% 70% 15%;
  /* max-height: px; */
}

#close-btn {
  max-width: 40px;
  max-height: 40px;
  aspect-ratio: 1/1;
  background: none;
  border: none;
  color: black;
  justify-self: right;
  font-size: 2rem;
}

#close-btn:hover {
  color: red;
}

#option-picker{
  display: none;
}

#pix-left{
  color: white;
  font-weight: bold;
}

@media (max-width:768px){

  #drawing-overlay {
    grid-template-rows: 20% 1fr 10%;
  }

  #drawing-canvas {
    width: min(calc(95vw - 1rem), calc(95dvh - 1rem), 1024px);
    height: auto;
    margin: 0;
  }


  #option-picker{
    display: block;
    justify-self: center;
    align-self: start;
    background-color: white;
    border: 1px solid black;
    border-radius: 25px;
    padding: 1rem;
  }

}



