/************************************************************
 GENERAL STYLINGS
*************************************************************/
body{
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #FFF;
  background-color: #333;
  margin: auto;
  overflow-y: scroll;
  align-items: center;
}
  
.container {
  display: flex;
  margin: auto;
  width: fit-content;
}
  
.vramgrid {
  width: fit-content;
}
  
.spacing {
  width: 30px;
}

.playfieldgrid {
  text-align: center;
}

.tooltip-container {
  display: flex;
  align-items: center;
  margin: auto;
  width: fit-content;
}

#config-container {
  display: flex;
  align-items: center;
  margin: auto;
  width: fit-content;
  flex-direction: column;
}

/************************************************************
 VRAM GRID
*************************************************************/
.vramgrid {
    display: grid;    
    grid-template-columns: repeat(16, 32px); /***************************************/
    grid-template-rows: repeat(16, 32px); /***************************************/
    gap: 0px;
    width: fit-content;
    height: fit-content;
    border: 30px solid rgb(158, 210, 144);
    border-radius: 20px; /************************************* 50 **/
    cursor: pointer;
}

.cell, .playfieldcell {
    width: 32px; /***************************************/
    height: 32px; /***************************************/
    border: 2px solid #999;
    background-size: cover;
    box-sizing: border-box;
}

/* the minos that are normally used */
.standard {
    border: 2px solid rgb(117, 150, 252);
}

/* the selected mino */
.selected {
  border: 2px solid rgb(255, 157, 0);
  box-sizing: border-box;
}

/* hovering a mino */
.cell:hover {
    border: 2px solid rgb(0, 255, 17);
}

/************************************************************
 TOOLTIP 
*************************************************************/
.tooltip {
    position: relative;
    display: inline-block;
}

#tooltip-image{
    width: 2em; 
    height: 2em;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 600px;
    background-color: rgb(255, 255, 255);
    color: rgb(0, 0, 0);
    text-align: left;
    border-radius: 6px;
    padding: 20px;
    font-size: medium;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
    
    /* Position the tooltip */
    position: absolute;
    z-index: 1;
    top: 100%;
    left: 50%;
    margin-left: -500px;
}
  
.tooltip:hover .tooltiptext {
    visibility: visible;
}

/************************************************************
 TOAST ANIMATION
*************************************************************/
.toast {
  visibility: hidden;
  min-width: 250px;
  background-color: #FFF;
  color: #000;
  text-align: center;
  border-radius: 2px;
  padding: 16px;
  position: fixed;
  z-index: 1;
  left: 50%;
  bottom: 30px;
  font-size: 17px;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
  transform: translate(-50%, 0);
}

.toast.red {
  background-color: lightpink;
}

.toast.green {
  background-color: lightgreen;
}

.toast.show {
  visibility: visible;
  -webkit-animation: fadein 0.5s, fadeout 0.5s 3.0s;
  animation: fadein 0.5s, fadeout 0.5s 3.0s;
}
  
@-webkit-keyframes fadein {
  from {bottom: 60px; opacity: 0;} 
  to {bottom: 30px; opacity: 1;}
}
  
@keyframes fadein {
  from {bottom: 60px; opacity: 0;}
  to {bottom: 30px; opacity: 1;}
}
  
@-webkit-keyframes fadeout {
  from {top: 60px; opacity: 1;} 
  to {top: 30px; opacity: 0;}
}
  
@keyframes fadeout {
  from {top: 60px; opacity: 1;}
  to {top: 30px; opacity: 0;}
}

/************************************************************
 PLAYFIELD
*************************************************************/
  li img{
    width: 100%;
    height: 100%;
  }

  #selectable .mino{
    background-repeat: no-repeat;
    background-size: 32px 32px; /***************************************/
    background-image: url('images/green/2F.png');
  }
  
  #selectable {
    list-style-type: none;
    margin: 0;
    padding: 0;
    width: 320px; /************************************** 320 */
    height: 576px; /************************************** 576 */
    border: 3px solid rgb(255, 255, 255);
  }
  
  #selectable li {
    margin: 0px;
    padding: 0px;
    float: left;
    width: 32px; /***************************************/
    height: 32px;/***************************************/
    box-sizing: border-box;
  }
  
  li.stack:hover{
    border: 3px solid rgb(0, 255, 17);
  }
 
  li.mino:hover{
    border: 3px solid red;
  }

  li.stack{
    cursor: pointer;
  }

  #selectable .mino:hover img{
    opacity: 10%;
    background-color: rgb(0, 0, 0);
  }

  #selectable li.mino.ui-selecting:hover{
    opacity: 10%;
    background-color: rgb(0, 0, 0);
  } 

  .ui-selecting img{
    opacity: 10%;
    background-color: white;
  }

  /* the part of the playfield that can't be edited */
.noStack, .noStack:hover{
    background-color: #999;
    border: 0px;
}

.stack{
    background-color: #FFF;
}

.stack.clear::before {
    content: "";
    position: absolute;
    width: 32px; /***************************************/
    height: 32px; /***************************************/
    background-color: lightsalmon;
    opacity: 0.5; /* adjust the value to control the opacity */
  }

  /************************************************************
 INPUT STYLINGS: BUTON, CHECKBOX AND RADIO BUTTON
*************************************************************/
  input:where([type="checkbox"], [type="radio"]){
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    margin: calc(0.75em - 11px) 0.25rem 0 0;
    vertical-align: top;
    border: 2px solid #ddd;
    border-radius: 4px;
    background: #fff no-repeat center center;
  }

  input[type="radio"]{
    border-radius : 50%;
  }
  
  input:where([type="checkbox"], [type="radio"]):where(:active:not(:disabled), :focus){
    border-color : #696;
    outline      : none;
  }
  
  input:where([type="checkbox"], [type="radio"]):disabled{
    background : #eee;
  }
  
  input[type="checkbox"]:checked{
    background-image : url('images/checkbox.svg');
  }
  
  input[type="radio"]:checked{
    background-image : url('images/radio.svg');
  }

  .button {
    background-color: lightgrey;
    border: 2px solid lightgray;
    color: black;
    padding: 10px 20px 10px 20px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    margin: 4px 2px;
    cursor: pointer;
    border-radius: 12px;
  }

  .button:hover {
    background-color: grey;
    border: 2px solid white;
  }

.dropdown {
  appearance: none;
  background-color: #fff;
  color: #333;
  padding: 10px 15px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background-image: url("images/arrow_down.png");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: auto 50%;
  cursor: pointer;
  width: 250px;
}

.dropdown.small{
  width: 70px;
}

.dropdown::-ms-expand {
  display: none;
}

.dropdown option {
  color: #333;
  background-color: #fff;
}

/************************************************************
 PIECE SEQUENCE
*************************************************************/
#pieceContainer{
  height: 576px; 
  overflow-y: scroll; 
  overflow-x: hidden; 
  width: contain;
  border: 1px solid rgb(255, 255, 255);
  background-color: #FFF;
}

#piecesGrid {
    border-collapse: collapse;
}

#piecesGrid td {
    border: 1px solid black;
    padding: 8px;
    text-align: center;
    width: 2em;
}

.first-column, .third-column{
    background-color: lightgrey;
    color: black;
}

.second-column{
  background-color: #FFF;
  color: black;
}

.third-column{
    cursor: pointer;
    font-size: large;
}

.third-column:hover{
    background-color: rgb(138, 138, 138);
    color: white;
}

.tetromino{
  width:100%;
  height:100%;
  position: relative;
  cursor: pointer;
}

.tetromino:hover{
    transform: scale(1.3);
}