body {
  background-color: #15304E;
  /*color: #01d2ff;*/
  font-family: 'Expletus Sans', sans-serif;
  font-size: 16px;
}
input, select, button {
  font-family: 'Expletus Sans', sans-serif;
  font-size: 16px;
}
h1, h2, h3, h4, h5, h6 {
  font-family: sans-serif;
}

#logo {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 11px 16px;
  box-shadow: 0 0 4px 4px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  background-color: #535d6c;
  opacity: 1;
  transition: opacity 0.5s linear;
}

#logo:empty {
  opacity: 0;
}

#mono {
  position: fixed;
  top: 10%;
  left: -8vh;
  right: 0;
}
#mono img {
  height: 40vh;
}

#tlControls {
  position: fixed;
  top: 0;
  left: 0;
  font-size: 16px;
  height: 1em;
  width: 1em !important;
  line-height: 1em;
  color: #CCC;
}

#tlControls:hover {
  color: #FFF;
}

#bg {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.5s linear;
}
.blurBackground #bg {
  filter: blur(25px);
}

#container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 10em;
  padding-top: 5vh;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: auto;
  justify-items: center;

  vertical-align: middle;
  text-align: justify;
  -ms-text-justify: distribute-all-lines;
  text-justify: distribute-all-lines;
  overflow: hidden; /* hides stuff off the right in normal view */
  overflow-y: auto; /* for grid view */
  user-select: none;
}

#container .imgBox {
  text-align: center;
  opacity: 1;
  transition: left 0.5s ease-in-out, right 0.5s ease-in-out, filter 0.5s linear, opacity 0.5s linear;
}

#container .imgBox.prev,
#container .imgBox.next,
#container .imgBox.current,
#container .imgBox.past,
#container .imgBox.future,
#container .imgBox.new {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  margin: auto;
  height: 90%;
}

.imgBox.grid {
  float: left;
  position: relative;
  height: 30vh;
  width: 0vh;
  margin: 5vh;
}
.imgBox.grid img {
  transform: translate(-50%, 0);
}

@media only screen and (max-aspect-ratio: 9/16) {
  /* If the screen is too narrow to show the image at 90% screen height, switch to height relative to width. The 9:16 ratio is coincidental (image 9:13.6, 90% height 9:15.1, 90% width 9:~16). */
  #container .imgBox {
    height: 140vw;
  }

  #container .imgBox.grid {
    height: 50vw;
  }
}

@media only screen and (max-aspect-ratio: 2.5) { /* 1.96 */
  #container {
    grid-template-columns: repeat(5, 1fr);
  }
}
@media only screen and (max-aspect-ratio: 2.0) { /* 1.63 */
  #container {
    grid-template-columns: repeat(4, 1fr);
  }
}
@media only screen and (max-aspect-ratio: 1.5) { /* 1.31 */
  #container {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media only screen and (max-aspect-ratio: 1.0) { /* 0.98 */
  #container {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media only screen and (max-aspect-ratio: 0.5) { /* 0.65 */
  #container {
    grid-template-columns: repeat(1, 1fr);
  }
}

.imgBox.prev {
  right: 65% !important;
}

.imgBox.next {
  left: 65% !important;
}

.imgBox.past {
  left: -100% !important;
  right: 100% !important;
}

.imgBox.future {
  left: 100% !important;
  right: -100% !important;
}

.imgBox.new {
  opacity: 0 !important;
}

.imgBox img {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  margin: auto;
  height: 100%;
  z-index: 0;
  transition: height 0.5s ease-in-out;
  box-shadow: 0 0 8px 8px white;
  background-color: white;
}

.imgBox.current img {
  z-index: 3;
}

.imgBox.prev img, .imgBox.next img, .imgBox.past img, .imgBox.future img {
  height: 50% !important;
  z-index: 1 !important;
}

.blurFuture .imgBox.next img, .blurFuture .imgBox.future img {
  filter: blur(25px);
}
.imgBox img.hover {
  transition: opacity 1s ease-in-out !important;
  box-shadow: none;
}

.ui {
  position: absolute;
  top: calc(100% - 8em);
  left: 0;
  right: 0;
  bottom: 0;
  /*border-top: 2px solid #e2d8a3;*/
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.5);
}

#uiContainer, #tagContainer {
  color: black;
  padding: 1em calc(100% - 120em);
  background-color: white;
}
#uiContainer {
  min-height: 100%;
}
#tagContainer {
  margin-bottom: 2em;
}
#tagContainer h3 {
  font-family: 'Expletus Sans', sans-serif;
  text-align: center;
}
@media only screen and (max-width: 90em) {
  #uiContainer {
    padding: 1em;
  }
}

#uiContainer h2 {
  font-size: 24px;
  font-weight: normal;
  margin-bottom: 0;
}
#uiContainer h2 a {
  color: black;
  text-decoration: none;
}

/* Move the next few to a gaia.css file */
#uiContainer .postDate {
  font-size: small;
  font-style: italic;
}

#uiContainer .donation_table_outer {
  border: 1px solid #AAAAAA;
  border-spacing: 6px;
  margin-bottom: 10px;
  margin-top: 14px;
  width: 100%;
}

#uiContainer .donation_table_inner {
  background-color: #F2F2F2;
  border-spacing: 6px;
  width: 100%;
}
#uiContainer .donation_table_inner td {
  font-size: 12px;
}

#tagContainer {
  overflow: hidden;
}

#tags li {
  cursor: pointer;
}

.controls {
  position: absolute;
  top: calc(100% - 8em);
  left: 0;
  right: 0;
  bottom: 8em;
  height: 4em;
  line-height: 4em;
  width: 39em;
  margin: -2em auto;
  text-align: center;
  line-height: 4em;
}
.controls input, .controls button {
  height: 2em;
  line-height: 2em;
}
.controls input {
  border: none;
  padding: 6px;
  padding-left: 1em;
  background-color: #F2F2F2;
  vertical-align: middle;
  border-radius: 1em 0 0 1em;
}
.controls button {
  border: none;
  padding: 6px 10px;
  font-size: 16px;
  background-color: #CCCCCC;
  vertical-align: middle;
  border-radius: 0 1em 1em 0;
}

.button {
  text-decoration: none;
  display: inline-block;
  border-radius: 50%;
  background-color: white;
  width: 2em;
  font-size: 2em;
  cursor: pointer;
  color: #800;
  background-color: #F2F2F2;
}

.button:hover {
  background-color: #ddd;
  color: #006080;
}

.button.goprev {
  background-color: #F2F2F2;
  color: black;
}

.button.gonext {
  background-color: #4CAF50;
  color: white;
}

#gowhere {
  width: 16em;
}

#tags {
  list-style: none;
  margin: 0;
  padding: 0;
  text-align: center;
}

#tags li {
  display: inline-block;
  font: 200 20px/1.5 Helvetica, Verdana, sans-serif;
  width: 200px;
  text-align: center;
}

#tags li.selected {
  background: #4CAF50;
}

#tags li {
  text-decoration: none;
  color: #000;

  -webkit-transition: font-size 0.3s ease, background-color 0.3s ease;
  -moz-transition: font-size 0.3s ease, background-color 0.3s ease;
  -o-transition: font-size 0.3s ease, background-color 0.3s ease;
  -ms-transition: font-size 0.3s ease, background-color 0.3s ease;
  transition: font-size 0.3s ease, background-color 0.3s ease;
}

#tags li:hover {
  font-size: 30px;
  background: #f6f6f6;
}

#tags li.selected:hover {
  font-size: 30px;
  background: #86f6a6;
}
