[hidden] {
  display: none !important;
}

body {
  font-family: 'Inter', Arial, Helvetica, sans-serif;
  font-size: 16px;
  color: #415066;
  background-color: #F1F3F0;
}

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

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

.progressbar {
  position: relative;
  width: 490px;
  border: 1px solid #8DB66A;
  margin-top: 5px;
  padding: 3px;
  background-color: #fff;
  border-radius: 5px;
}

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

.progressfill {
  height: 21px;
  background-color: #C5EEFE;
  width: 0%;
}

.sorter {
  margin: 0px auto;
  display: grid;
  grid-template-columns: 120px 1fr 120px;
  grid-gap: 5px;
  width: 420px;
}

.button {
  margin-left: 2px;
  border: 1px solid #8DB66A;
  border-radius: 5px;
  text-align: center;
  padding: 10%;
  grid-column: 2 / 3;
  cursor: pointer;
  background-color: white;
}

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

.button:hover{
  background-color: #F6E94B;
}

.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: 25px;
  height: 25px;
  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: 120px;
  height: 180px;
  margin: auto;
  grid-row: 1 / 7;
  cursor: pointer;
}

.sorter > .image:hover{
  border: 1px solid #FACC2F;
  box-shadow: 0 0 5px #FACC2F;
}

.sorter > .text {
  width: 120px;
  height: 60px;
  display: none;
  color: white;
  background-color: #315C15;
}

.sorter > .text > p {
  margin: 0.7em 5px 0px;
  width: calc(100%-10px);
  text-align: center;
  font-size: 0.8em;
  line-height: 1.5em;
  font-weight: bold;
}

.sorter > .left {
  grid-column: 1 / 2;
  border: 1px solid #8DB66A;
  border-radius: 5px;
}

.sorter > .right {
  grid-column: 3 / 4;
  border: 1px solid #8DB66A;
  border-radius: 5px;
}

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

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

label {
  cursor: pointer;
}

label:hover {
  color: #E64D6A;
}

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

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

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

.results {
  font-size: 0.75em;
  display: flex;
  align-content: flex-start;
  width: 80%;
  margin: 2em auto;
  background-color: #F1F3F0;
}

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

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

.result {
  height: 19px;
  margin-bottom: -1px;
  display: grid;
  width: 196px;
  grid-template-columns: repeat(2, 1fr);
  background-color: white;
  border: 1px solid #8DB66A;
  margin-right: 5px;
}

.result.image {
  height: 175px;
}

.result.image img {
  height: 160px;
  margin-top: -3px;
}

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

.result.head {
  background-color: #315C15;
  color: #FFF;
  font-weight: bold;
}

.result > .left {
  width: 18px;
  padding: 3px 3px 1px 0.5em;
  grid-column: 1 / 2;
  text-align: right;
}

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

.result.image > .left span {
  position: absolute;
  top: 50%;
  right: 3px;
  margin-top: -0.375em;
}

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

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

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

a:hover, a:visited:hover {
  color: #FA90A4;
}

a:visited {
  color: #9E42D1;
}

.restart-button:link, .restart-button:visited {
  background-color: #b1bca9;
  color: #315C15;
  padding: 6px 10px;
  border-radius: 5px;
  border: 1px solid #8DB66A;
  display: inline-block;
}

a.restart-button:hover, a.restart-button:active{
  color: #315C15;
  background-color: #F6E94B;
}

b, strong {
  font-weight: bold;
}

select {
  background-color: white;
  border: 1px solid #8DB66A;
  border-radius: 5px;
  color: #315C15;
}

hr{
  border: 1px solid #315c15;
}

.changes-table, .controls-table {
  margin-left: auto;
  margin-right: auto;
  max-width: 400px;
  width: 100%;
  border: 0.5px solid #315c15;
  border-collapse: collapse; 
}

.changes-table .head,
.controls-table .head {
  background-color: #315C15;
  color: #FFF;
  font-weight: bold;
}

.changes-table .left,
.controls-table .left {
  width: 40%
}

.changes-table .right,
.controls-table .right {
  width: 60%
}

.changes-table th, 
.changes-table td,
.controls-table th,
.controls-table td {
  padding: 2px;
  text-align: center;
  vertical-align: middle;
  border: 0.5px solid #315c15;
}

.app-title {
  text-align: center;
  margin-bottom: 25px;
}

.app-title > .title {
  font-size: 1.3em;
  font-weight: bold;
  font-family: 'Space Grotesk', Arial, Helvetica, sans-serif;
}

.shill-text {
  font-family: 'Syne Mono', Arial, Helvetica, sans-serif;
}

/* Mobile styles */
.sticky-nav {
  position: fixed;
  bottom: 0;
  
  left: 10px;
  right: 10px;
  width: auto;
  
  padding-bottom: calc(20px + env(safe-area-inset-bottom));
  
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-gap: 10px;
  
  z-index: 9999;
  pointer-events: none;
}

.nav-btn {
  height: 60px;
  background-color: white;
  border: 1px solid #8DB66A;
  border-radius: 15px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  
  color: #315C15;
  font-weight: bold;
  font-size: 14px;
  
  cursor: pointer;
  pointer-events: auto;
  
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-btn.top-row {
  grid-column: span 3;
}

.nav-btn.bot-row {
  grid-column: span 2;
}

.nav-btn:hover {
  background-color: #F6E94B;
}

.nav-btn:active {
  transform: translateY(2px);
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  background-color: #F6E94B;
}

.nav-btn.top-row {
  background-color: #315C15;
  color: white;
  border: 1px solid #315C15;
}

.nav-btn.top-row:hover {
  background-color: #F6E94B;
  color: #315C15;
  border-color: #8DB66A;
}

/* Active/Click Effect */
.nav-btn.top-row:active {
  background-color: #e5d840;
  transform: translateY(2px);
}

.nav-btn .icon {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  fill: none;
}

.top-row .icon {
  width: 28px;
  height: 28px;
}

@media screen and (max-width: 600px) {
  body {
    font-size: 15px;
  }
  
  .container, 
  .progress, 
  .sorter, 
  .options, 
  .image.selector, 
  .time.taken, 
  .changes-table, 
  .controls-table {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
    padding-left: 10px;
    padding-right: 10px;
  }

  .progressbar {
    width: 100% !important;
    box-sizing: border-box;
    padding: 3px !important;
  }

  .progresstext {
    width: 100% !important;
    left: 0;
  }

  .sorter {
    grid-template-columns: 1.1fr 1fr 1.1fr; 
    grid-gap: 4px;
    width: 95% !important;
    margin: 0 auto;
  }

  .sorter > .image {
    width: 100%;
    height: auto;
  }

  .sorter > .text {
    width: 100%;
    height: auto; 
    min-height: 60px;
  }

  .sorter > .text > p {
    font-size: 0.7em;
  }

  .button {
    padding: 5%;
    font-size: 0.8em;
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
  }
}
