@-ms-viewport{
  width: device-width;
}

body {
  position: relative;
}

body,
html {
  min-height: 100vh;
  width: 100%;
  margin: 0;
}

.global {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.popup {
  top:0;
  bottom:0;
  left:0;
  right:0;
  background: rgba(20, 20, 20, 0.8);
  /* background: radial-gradient(circle closest-side, rgba(20, 20, 20, 0.9), rgba(60, 60, 60, 0)), rgba(20, 20, 20, 0.8);
  transform: translate(0); */
  position: absolute;
  z-index: 9;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.popup_container {
  align-self: center;
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  box-shadow: 10px 10px 30px 1px rgba(40, 40, 40, 1);
}

.popup_main,
.popup_footer {
  /* font-family: Open Sans, sans-serif; */
  z-index: 11;
  width: 500px;
}

.popup_main {
  font-size: 16px;
  font-family: 'Open Sans', sans-serif;
  padding: 15px 15px 8px 15px;
  /* border-radius: 10px 10px 0 0; */
  background: rgba(255, 255, 255, 1);
}

.popup_footer {
  font-size: 13px;
  font-family: 'Open Sans', sans-serif;
  color: rgba(255, 255, 255, 1);
  padding: 8px 15px 15px 15px;
  /* border-radius: 0 0 10px 10px; */
  /* background: rgba(40, 40, 40, 1); */
  background: linear-gradient(50deg, #7eb4c4, rgba(40, 40, 40, 1));
}

div.popup p {
  margin: 0;
  line-height: 1.5;
}

button {
  margin-top: 20px;
}

.not_saved {
  visibility: hidden;
  text-align: center;
}

.not_saved .popup_container {
  width: 300px;
  display: flex;
  flex-direction: row;
  justify-content: space-evenly;
  flex-wrap: wrap;
  box-shadow: none;
}

.not_saved .popup_main {
  width: 300px;
  padding: 15px;
  flex: 1 0 300px;
  box-shadow: 10px 10px 30px 1px rgba(40, 40, 40, 1);
}

.not_saved .popup_container button {
  width: 50px;
}

.text_code {
  visibility: hidden;
  display: flex;
  height: 100%;
}

.text_code .popup_container {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  box-shadow: none;
}

.text_code .popup_main {
  flex: 1;
  display: flex;
  flex-direction: row;
  justify-content: space-evenly;
  width: auto;
  box-shadow: 10px 10px 30px 1px rgba(40, 40, 40, 1);
}

.text_code .popup_main code {
  flex: 0 1 400px;
  max-width: 400px;
  height: 85vh;
  overflow: auto;
  text-align: justify;
  font-size: 12px;
  border: 1px solid darkgray;
  margin: 0 10px;
}

.text_code .popup_container button {
  margin: 20px 0 0 0;
  flex: 1;
} 

#name {
  text-decoration: underline;
}

.container {
  font-family: Arial;
  height: 100%;
  display: flex;
  flex: 1;
  position: relative;
}

.header {
  flex: 0 0 450px;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: rgb(211, 211, 211);
  border: 1px solid rgba(169, 169, 169, 1);
  border-radius: 10px;
  box-shadow: 10px 10px 30px 1px rgba(94,94,94,1);
  text-align: center;
  margin: 15px 0 15px 15px;
  cursor: default;
  font-family: 'Open Sans', sans-serif;
}

.swatches {
  margin: 5px 0 0 0;
  width: 200px;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}

.swatch_slot {
  flex: 0 0 25px;
  height: 25px;
  box-sizing: border-box;
  border: 1px solid rgb(88, 88, 88);
  display: flex;
}

.swatch_slot:hover {
  border: 2px solid black;
}

.swatch_color {
  flex: 1;
  background-color: #FFFFFF;
}

.canvas_space {
  text-align: center;
  flex: 1;
  align-self: center;
}

.gallery {
  background-color: gray;
  flex: 0 0 200px;
  display: flex;
  flex-direction: column;
  margin: 15px 15px 15px 0;
  border-radius: 10px;
  box-shadow: 10px 10px 30px 1px rgba(94,94,94,1);
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  cursor: default;
}

.gallery .save_slot {
  margin: 0 15px 15px 15px;
  background-color: lightgray;
  order: 0;
}

.save_slot:first-child {
  margin-top: 15px;
}

.save_slot {
  flex: 1;
  background-image: url('assets/gallery.png');
  background-size: 50px;
  background-position: center;
  background-repeat: no-repeat;
  background-blend-mode: overlay;
  display: flex;
  justify-content: center;
  align-items: center;
}

.save_slot:hover {
  box-shadow: 6px 6px 20px 1px rgba(94,94,94,1);
  animation-name: grow;
  animation-duration: .8s; 
  animation-timing-function: ease; 
  animation-iteration-count: 1;
  animation-fill-mode: forwards;
}

@keyframes grow {
  from {
    transform: scale(1);
  }

  to {
    transform: scale(1.15);
  }
}

.save_slot table {
  margin: 0;
  border: .1px solid gray;
}

.save_slot table tr,
.save_slot table td {
  height: 1px;
  width: 1px;
  border: none;
}

/* .save_slot table td {
  width: .7px;
  height: auto;
} */

.app_footer {
  flex: none;
  width: 100%;
  font-size: 13px;
  font-family: 'Open Sans', sans-serif;
  color: rgba(255, 255, 255, 1);
  background: linear-gradient(50deg, #7eb4c4, rgba(40, 40, 40, 1));
  text-align: center;
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  align-items: center;
}

.app_footer a {
  box-sizing: border-box;
  text-decoration: none;
  color: black;
  background-color: white;
  border: 1px solid black;
  padding: 5px 8px;
  margin-right: 15px;
}

.app_footer a:hover {
  color: white;
  background-color: black;
}

.app_footer p {
  flex: 1;
}

.title {
  text-shadow: 3px 3px rgba(80, 80, 80, 0.5);
}

#save_functionality {
  margin-top: 10px;
}

h1 {
  font-family: 'Monoton';
  font-size: 70px;
  margin: 0.2em;
}

h2 {
  margin: 10px 0 5px 0;
}

h2:first-of-type {
  margin-top: 0.5em;
}

.header p {
  margin: 5px 0;
}

#canvas_header {
  color: lightgray;
  text-align: center;
  font-size: 30px;
}

table,
td {
  border: 1px solid gray;
  box-sizing: content-box;
}

td {
  background-color: rgb(255, 255, 255);
}

tr {
  border: 0px;
}

table {
  border-collapse: collapse;
  margin: 0 auto 30px auto;
  box-shadow: 5px 5px 20px 1px rgba(94,94,94,1);
}

tr,
td {
  height: 15px;
  width: 15px;
}

input[type=number] {
  width: 6em;
  text-align: center;
  -moz-appearance: textfield;
}

/* Disable input fields arrows */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

#colorString {
  color: rgba(255, 255, 255, 1);
  background: #000000;
}

button,
input[type="submit"] {
  border: 1px solid #000000;
  padding: 2px 5px 2px 5px;
  background: #FFFFFF;
  color: #000000;
}

button:hover,
input[type="submit"]:hover {
  color: #FFFFFF;
  background: #000000;
}

input[disabled="true"] {
  border: 1px solid gray;
  color: gray;
}

input[disabled="true"]:hover {
  border: 1px solid gray;
  background: #FFFFFF;
  color: gray;
}

input[type="color"] {
  border: 1px solid #000000;
  padding: 2px 5px 2px 5px;
  background: #FFFFFF;
  color: #000000;
}

textarea {
  display: block;
  position: relative;
  margin: 10px auto 0 auto;
}

/* Tool icons */
.tool_icon {
  border: 0.5px solid #FFFFFF;
  border-radius: 5px;
}

.tool_icon:hover {
  background-color: gray;
}

/* Class for the active tool */
.active{
  background-color: #FFFFFF;
}

/* Tooltips */
.tool {
  position: relative;
  display: inline-block;
}

.tooltip {
  visibility: hidden;
  width: 120px;
  background-color: black;
  color: #FFFFFF;
  text-align: center;
  padding: 5px 0;
  border-radius: 6px;
  /* Position the tooltip text */
  position: absolute;
  z-index: 1;
  width: 120px;
  top: 100%;
  left: 50%;
  /* Use half of the width (120/2 = 60), to center the tooltip */
  margin: 0 0 0 -60px;
}

.tool .tooltip::after {
  content: " ";
  position: absolute;
  bottom: 100%;  /* At the top of the tooltip */
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: transparent transparent black transparent;
}

/* Show the tooltip text when you mouse over the tooltip container */
.tool:hover .tooltip {
    visibility: visible;
}

.cell_position {
  margin: 0 0 5px 0;
}

/* @media (max-width: 950px) {
  body,
  html {
    height: auto;
  }

  div.container {
    height: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }

  .header {
    height: 750px;
    width: auto;
    margin-top: 15px;
    margin-left: 0;
    flex-grow: 0;
    flex-shrink: 1;

  }

  .canvas_space {
    height: 600px;
    flex-grow: 1;
    width: 100%;
    box-sizing: content-box;
    position: relative;
  }

  #canvas_header {
    margin: 0;
    position: relative;
    top: 50%;
  }

  .app_footer button {
    visibility: none;
  }  
} */
