/* Base css */

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    text-align: center;
    font-family: sans-serif, Arial, Helvetica;
}

/* The grid classes are used for css grid layout.*/

.gridContainer {
    display:grid;
    grid-template-areas:
        'control canvas';
    grid-template-columns: minmax(300px, 300px) minmax(400px, 1fr);
    grid-template-rows: auto;
    grid-gap: 15px;
}

.gridControl {
    grid-area: control;
    height: 410px;
    background: rgba(105, 105, 105, 0.85); /*dimgrey*/
    border-radius: 7px;
    margin: 0 15px 20px 15px;
    box-shadow: 2px 2px 5px rgba(77, 77, 77, 0.8);
}

.gridCanvas {
    grid-area: canvas;
    background: rgba(105, 105, 105, 0.85); /*dimgrey*/
    border-radius: 7px;
    margin: 0 15px 20px 15px;
    box-shadow: 2px 2px 5px rgba(77, 77, 77, 0.8);
}

h1 {
    font-family: 'Press Start 2P';
    font-size: 45px;
    color: dimgrey;
    padding-top:15px;
    text-shadow: 3px 3px 5px red;
    margin: 0.5em 0 0.75em 0;
}

h2 {
    margin: 0.5em 0 0.5em;
}

h2:nth-of-type(2) {
    display: inline;
}

h2:nth-of-type(3) {
    display: inline;
}
table,
tr,
td {
    border: 1px solid black;
    cursor: pointer;
}

table {
    border-collapse: collapse;
    background-color: white;
    margin: 0 auto;
    box-shadow: 2px 2px 4px red;
}

tr {
    height: 20px;
}

td {
    width: 20px;
}

p {
    margin: 1em 0 1em;
}

.noLegend {
    display: none;
}
.legend {
    display: block;
}

.gridSizeLabel {
    font-size: 18px;
}

.button {
    display: inline-block;
    margin-top: 0.5em;
    padding: 7px 20px;
    background: transparent;
    font-size: 18px;
    cursor: pointer;
    text-align: center;
    text-shadow: 2px 2px 4px #000000;
    outline: none;
    color: white;
    background-color: grey;
    border: none;
    border-radius: 5px;
    box-shadow: 0 3px red;
}

.button:hover {
    background-color: dimgrey;
}

.button:active {
    background-color: dimgrey;
    box-shadow: 0 3px lightcoral;
    transform: translateY(3px);
}

#createGrid,
#paintBtn {
    margin-right: 10px;
}

input[type=color] {
    margin: 1.5em 0 1em 0.25em;
    border: 1px solid darkgray;
    background-color: grey;
    cursor: pointer;
}

/* Range input thumb and track styling: browser specific */

input[type=range] {
    -webkit-appearance: none;
    width: 95%;
    margin: 16px 0;
    padding: 0; /* corrects spacing issue IE11 */
}

input[type=range]:focus {
    outline: none;
}

input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 10px;
    cursor: pointer;
    animate: 0.2s;
    box-shadow: 1px 1px 1px black, 0px 0px 1px #0d0d0d;
    background: red;
    border-radius: 2px;
    border: 0.5px solid #010101;
}

input[type=range]::-webkit-slider-thumb {
    box-shadow: 1px 1px 1px black, 0px 0px 1px #0d0d0d;
    border: 1px solid black;
    height: 24px;
    width: 12px;
    border-radius: 3px;
    background: grey;
    cursor: pointer;
    -webkit-appearance: none;
    margin-top: -9px;
}

input[type=range]:hover::-webkit-slider-thumb {
    background: dimgrey;
}

input[type=range]:focus::-webkit-slider-runnable-track {
    background: red;
}

input[type=range]::-moz-range-track {
    width: 95%;
    height: 10px;
    cursor: pointer;
    animate: 0.2s;
    box-shadow: 1px 1px 1px black, 0px 0px 1px #0d0d0d;
    background: red;
    border-radius: 1.3px;
    border: 0.2px solid #010101;
}

input[type=range]::-moz-range-thumb {
    box-shadow: 1px 1px 1px black, 0px 0px 1px #0d0d0d;
    border: 1px solid black;
    height: 24px;
    width: 12px;
    border-radius: 3px;
    background: grey;
    cursor: pointer;
}

input[type=range]:hover::-moz-range-thumb {
    background: dimgrey;
}

input[type=range]::-ms-track {
    width: 100%;
    height: 10px;
    cursor: pointer;
    animate: 0.2s;
    background: transparent;
    border-color: transparent;
    border-width: 10px;
    color: transparent;
    margin: -4px;
}

input[type=range]::-ms-fill-lower {
  background: red;
  border: 0.2px solid #010101;
  border-radius: 2.6px;
  box-shadow: 1px 1px 1px black, 0px 0px 1px #0d0d0d;
}

input[type=range]::-ms-fill-upper {
    background: red;
    border: 0.2px solid #010101;
    border-radius: 2.6px;
    box-shadow: 1px 1px 1px black, 0px 0px 1px #0d0d0d;
}

input[type=range]::-ms-thumb {
    box-shadow: 1px 1px 1px black, 0px 0px 1px #0d0d0d;
    border: 1px solid black;
    height: 19px;
    width: 10px;
    border-radius: 3px;
    background: grey;
    cursor: pointer;
    margin: 0;
}

input[type=range]:focus::-ms-fill-lower {
    background: red;
}

input[type=range]::-ms-tooltip {
    display: none;
}

input[type=range]:focus::-ms-fill-upper {
    background: red;
}

input[type=range]:hover::-ms-thumb {
    background: dimgrey;
}


/* text fly in effect */

.flyItIn {
    animation: flyin 1s ease forwards;
    opacity: 0;
    transform: scale(2);
    filter: blur(4px);
}

@keyframes flyin {
    to {
        filter: blur(0);
        transform: scale(1);
        opacity: 1;
    }
}

.flyItIn2 {
    animation: flyin2 1s ease forwards;
    opacity: 0;
    transform: scale(2);
    filter: blur(4px);
}

@keyframes flyin2 {
    to {
        filter: blur(0);
        transform: scale(1);
        opacity: 1;
    }
}

/* rotates the Design Canvas div */

.rotationTime {
  -webkit-transition: all 4s linear;
  -moz-transition: all 4s linear;
  -ms-transition: all 4s linear;
  -o-transition: all 4s linear;
  transition: all 4s linear;
}
.rotateCanvas { 
  -webkit-transform: rotateX(360deg) rotateY(360deg);
  -moz-transform: rotateX(360deg) rotateY(360deg);
  -ms-transform: rotateX(360deg) rotateY(360deg);
  -o-transform: rotateX(360deg) rotateY(360deg);
  transform: rotateX(360deg) rotateY(360deg); 
}

/* make adjustments for smaller devices */

@media (max-width: 700px) {
    .gridContainer {
        grid-template-areas:
            'control'
            'canvas';
        grid-template-columns: 1fr;
    }

    .squares-bg::before {
        background-size: 20px 20px;
    }

    h1 {
        font-size: 22px;
    }

    .gridControl {
        margin: 0 15px 20px 15px;
    }

    .gridCanvas {
        margin: 0 15px 20px 15px;
    }
}
