@import url('https://fonts.googleapis.com/css2?family=PT+Serif&display=swap');

body {
  font-family: PT Serif;
  font-size: 16px;
  color: #FFFFFF;
  background-color: #2D2D2D;
  box-sizing: border-box;
}

.container {
  display: flex;
  flex-flow: column nowrap;
  align-items: center;
  margin-top: 1em;
}

.progress {
  margin-bottom: 1em;
  width:  500px;
  display: none;
}

.progressbar {
  position: relative;
  width: 492px;
  border: 1px solid black;
  color: #FFFFFF;
  background-color: #2D2D2D;
  padding: 5px;
  margin: 3px 0px;
  border-radius: 3px;
}

.progresstext {
  position: absolute;
  width: 492px;
  margin: 3px 0px;
  text-align: center;
  font-size: 0.8em;
}

.progressfill {
  height: 20px;
  background-color: #CC5500;
  width: 0%;
  border-radius: 3px;
}

.sorter {
  margin: 0px auto;
  display: grid;
  grid-template-columns: 138px 1fr 138px;
  grid-gap: 11px;
  width: 500px;
}

.button {
  border: 0px solid black;
  color: #000000;
  background-color: #FFFAEE;
  text-align: center;
  padding: 5%;
  grid-column: 2 / 3;
  cursor: pointer;
  border-radius: 3px;
}

.starting.start.button {
  grid-row: span 6;
}

.starting.load.button {
  grid-row: span 3;
  display: none;
}

.sorting.button, .finished.button {
  grid-row: span 2;
  display: none;
}

.loading.button {
  grid-row: span 6;
  display: none;
}

.loading.button > div {
  width: 15px;
  height: 15px;
  margin: 50px auto;
  background-color: #333;

  border-radius: 100%;  
  -webkit-animation: sk-scaleout 1.0s infinite ease-in-out;
  animation: sk-scaleout 1.0s infinite ease-in-out;
}

/* Animation taken from: http://tobiasahlin.com/spinkit/ */

.loading.button > span {
  margin: auto auto 20%;
  font-size: 0.7em;
}

@-webkit-keyframes sk-scaleout {
  0% { -webkit-transform: scale(0) }
  100% {
    -webkit-transform: scale(1.0);
    opacity: 0;
  }
}

@keyframes sk-scaleout {
  0% { 
    -webkit-transform: scale(0);
    transform: scale(0);
  } 100% {
    -webkit-transform: scale(1.0);
    transform: scale(1.0);
    opacity: 0;
  }
}

.sorter > .image {
  width: 136px;
  height: 136px;
  margin: auto;
  grid-row: 1 / 7;
  cursor: pointer;
}

.sorter > .text {
  width: 136px;
  height: 34px;
  display: none;
  background-color: #232321;   
  border-radius: 3px;
}

.sorter > .text > p {
  margin: 0.5em 1px 0.5em;
  width: calc(100%-10px);
  text-align: center;
  font-size: 1em;
  line-height: 1em;
  color: #FFFFFF;
}

.sorter > .left {
  grid-column: 1 / 2;
  border: 1px solid #000000;
}

.sorter > .right {
  grid-column: 3 / 4;
  border: 1px solid #000000;
}

.options {
  margin: 1.2em auto;
  display: grid;
  text-align: left;
  grid-template-columns: repeat(3, 1fr);
  grid-gap: 10px;
  width: 500px;
}

.options > div {
  font-size: 1em;
}

label {
  cursor: pointer;
}

label:hover {
  color: #E66E19;
}

.options > .large.option, .options > hr {
  grid-column: span 3;
  text-align: center;
  width: 100%;
}

.image.selector {
  margin-top: 1em;
  width: 500px;
  display: none;
  text-align: center;
  font-size: 1em;
}

.time.taken {
  margin-top: 1.2em;
  width: 500px;
  display: none;
  text-align: center;
  font-size: 1em;
}

.results {
  font-size: 0.875em;
  display: flex;
  align-content: flex-start;
  width: 80%;
  margin: 2em auto;
}

@media all and (min-width: 600px) {
  .results {
    flex-flow: column wrap;
    max-height: calc(5 * (160px + 2px) + 1 * (30px + 2px));
    /* 2px for borders */
  }
}

@media all and (max-width: 600px) {
  .results {
    flex-flow: column nowrap;
  }
}

.result {
  height: 30px;
  margin-bottom: -1px;
  display: grid;
  width: 170px;
  grid-template-columns: repeat(2, 1fr);
  border: 1px solid #000;
  margin-right: 10px;
  /*
  background-color: #232321;
  */
  background-color: #FFFAEE;
  color: #000000;
  
}

.result.image {
  height: 160px;

}

.result.image img {
  height: 136px;
  margin-top: -6px;
  margin-bottom: 4px;
}

.result.spacer {
  height: 1px;
  background-color: #000;
}

.result.head {
  background-color: #000;
  color: #FFF;
}

.result > .left {
  width: 32px;
  padding: 6px 0em 6px 0em;
  grid-column: 1 / 2;
  text-align: center;
}

.result.image .left {
  position: relative;
}

.result.image > .left span {
  position: relative;
  top: 45%;
  text-align: center;
}

.result > .right {
  width: 136px;
  padding: 6px 0em 6px 0em;
  grid-column: 2 / 3;
  border-left: 1px solid #000;
  text-align: center;
}

.info {
  margin: 1em auto 1em;
  display: block;
  text-align: center;
  font-size: 1em;
  width: 80%;
  line-height: 1.2em;
}

a {
  color: #CC5500;
  font-weight: bold;
  text-decoration: none;
  cursor: pointer;
}

a:hover {
  color: #E66E19;
}

a:visited {
  color: #33AAFF;
}
