html {
  background: #000;
}

body {
  font-family: sans-serif;
  color: grey;
  background: black;
  overflow-y: scroll;
  font-size: 16px;
}

.clearfix:before, .clearfix:after {
  content: " ";
  display: table;
}

.clearfix:after {
  clear: both;
}

a {
  text-decoration: none;
  color: white;
}

p {
  margin: 1em 0;
  color: lightgray;
  line-height: 1.4;
}

.header {
  position: fixed;
  height: 26px;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  z-index: 10;
  top: 0;
  left: 0;
  right: 0;
  padding: 8px 10px;
  color: white;
  text-shadow: 1px 0 black;
  background: rgba(50, 50, 50, 0.9);
  text-align: center;
  border-bottom: 1px solid black;
}

h1 {
  font-size: 1.5rem;
}

h2 {
  font-size: 1.15rem;
}

h3 {
  font-size: 1.1rem;
}

.header h1 {
  position: absolute;
  left: 0;
  right: 0;
  margin-top: 2px;
  padding: 0 .5em;
  text-align: center;
  color: white;
  font-size: 140%;
  font-weight: bold;
}

.header h1 small {
  font-weight: normal;
  font-size: 80%;
}

.header .button {
  padding: 5px 10px;
  margin: 0 10px;
  float: left;
  z-index: 10;
}

.header .button.first, .header .button:first-child {
  margin-left: 25px;
}

.header > span {
  padding: 6px 0;
}

.header .button.right {
  float: right;
}

.header input {
  font-size: 120%;
  padding: 3px 20px 3px 6px;
  border: none;
  border-radius: 4px;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.6);
  z-index: 9;
}

.header .button:active {
  margin-top: 1px;
  margin-bottom: -1px;
}

.header .button img {
  position: relative;
  height: 16px;
  width: 16px;
  margin: -2px 3px -3px 0;
}

#content {
  width: 100%;
  margin: 60px auto;
  padding: 0 .5em;
  box-sizing: border-box;
  opacity: 1;
  transition: opacity 1s;
}

#content.faded {
  opacity: 0;
}

#album-long-content {
  position: relative;
  column-width: 32em;
  column-gap: 4em;
}

#album-long-content h1, #album-long-content h2 {
  column-span: all;
}

#album-long-content.closed {
  max-height: 15em;
  overflow: hidden;
}

#album-long-content:after {
  content: '▲ Show less';
  display: block;
  cursor: pointer;
  color: white;
  font-size: 1.2rem;
  margin-top: 1em;
  column-span: all;
}

#album-long-content.closed:after {
  content: '▼ Read more';
  position: absolute;
  display: inline-block;
  bottom: 0.5em;
  left: 0;
  right: 0;
}

#album-long-content.closed:before {
  content: '';
  display: block;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4em;
  background: linear-gradient(transparent, black);
  cursor: pointer;
}

.left {
  float: left;
}

.clear {
  clear: both;
}

.hidden {
  display: none;
}

#content h1 {
  color: white;
  font-size: 180%;
}

#content h2 {
  padding-top: 6px;
}

#content a {
  text-decoration: underline;
}

.thumbs a {
  box-sizing: border-box;
  float: left;
  width: 144px;
  height: 144px;
  margin: 5px;
  position: relative;
  overflow: hidden;
  text-align: center;
}

.thumbs a .loader {
  width: 80% !important;
  height: 80% !important;
  margin: 0;
}

.thumbs.albums a {
  width: 212px;
  height: 212px;
}

.thumbs a img {
  border: 3px solid #313131;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
}

.thumbs a:hover img {
  border-color: #616161;
}

.albums a .title {
  position: absolute;
  bottom: 2.5px;
  left: 3px;
  right: 2.5px;
  height: 50px;
  background: rgba(0, 0, 0, 0.5);
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.9) 100%);
  color: white;
  text-shadow: 1px 1px black;
}

.albums a .title > .text {
  position: absolute;
  left: 5px;
  right: 5px;
  bottom: 8px;
}

.albums a .title > .info {
  position: absolute;
  right: 5px;
  bottom: 7px;
  color: gray;
  display: none;
}

#map {
  float: right;
  width: 434px;
  height: 434px;
  margin: 5px;
  border: 3px solid #313131;
  box-sizing: border-box;
  position: relative;
}

#photo-wrapper {
  display: none;
  background: black;
  background: rgba(0, 0, 0, 0.9);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 666;
}

#photo-wrapper .loader {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100px;
  height: 100px;
  margin-top: -50px;
  margin-left: -50px;
  z-index: 1000;
}

#photo-wrapper img.photo {
  position: absolute;
  outline: 2px solid #313131;
}

#photo-wrapper .title-wrapper {
  position: absolute;
  left: 50%;
  bottom: 20px;
}

#photo-wrapper .title-wrapper .title {
  position: relative;
  left: -50%;
  z-index: 777;
  text-align: center;
  padding: 5px 10px;
  border-radius: 5px;
  color: white;
  text-shadow: 1px 1px 1px black;
  background: rgba(0, 0, 0, 0.3)
}

#photo-exif {
  position: absolute;
  top: 5px;
  left: 5px;
  color: #555;
  text-shadow: 1px 1px 1px black;
}

#photo-exif td {
  padding: 2px;
}

#photo-comments {
  position: absolute;
  bottom: -5px;
  left: 0;
  padding: 10px;
  border-radius: 5px;
  transition: 0.3s;
}

#photo-comments:hover {
  z-index: 1000;
  color: white;
  background: black;
  background: rgba(0, 0, 0, 0.3);
  transition: 0.3s;
}

#photo-comments .comment {
  margin-bottom: 10px;
  text-shadow: 1px 1px 1px black;
  clear: both;
}

#photo-comments .comment img {
  float: left;
  height: 48px;
  margin-right: 7px;
  margin-bottom: 7px;
  border-radius: 5px;
  opacity: 0.4;
  transition: 0.3s;
}

#photo-comments:hover img {
  opacity: 1;
  transition: 0.3s;
}

#photo-comments .comment a {
  font-style: italic;
  color: inherit;
  margin-bottom: 5px;
}

#photo-map {
  position: absolute;
  width: 140px;
  height: 140px;
  right: 0;
  bottom: 0;
  background: transparent;
  opacity: 0.5;
  transition: 0.3s;
}

#photo-map:hover {
  height: 200px;
  width: 260px;
  z-index: 1000;
  opacity: 1;
  transition: 0.3s;
  border: 2px solid #666;
}

#footer {
  clear: both;
  padding-top: 20px;
  text-align: center;
  color: #666;
}

#footer a {
  color: #aaa;
}

#photo-controls {
  position: relative;
  top: -50px;
  width: 100%;
  z-index: 1000;
  cursor: auto;
  padding-bottom: 50px;
  transition: top 0.5s;
}

#photo-controls .header {
  position: relative;
}

#photo-controls:hover, #photo-controls.visible {
  top: 0;
  transition: top 0.5s;
}

#photo-controls h1 {
  position: relative;
  left: -130px;
  z-index: -1;
}

.button {
  position: relative;
  display: inline-block;
  text-align: center;
  cursor: pointer;
  border: 1px solid #666;
  background-color: #666;
  background-color: rgba(128, 128, 128, 0.75);
  border-radius: 4px;
  color: #fff;
  font-weight: bold;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
  box-shadow: rgba(0, 0, 0, 0.3) 0 1px 1px;
}

.button:hover {
  background-color: rgba(128, 128, 128, 0.9);
}

.button:active {
  box-shadow: none;
}

#sharing {
  position: fixed;
  left: 0;
  width: 32px;
  top: 35%;
  z-index: 1000;
}

#sharing > a {
  display: inline-block;
  width: 32px;
  height: 32px;
  filter: grayscale(1);
  opacity: 0.4;
}

#sharing > a:hover {
  filter: none;
  opacity: 1;
}

#sharing .pinterest {
  background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2032%2032%22%3E%3Cpath%20fill%3D%22%23BD081C%22%20d%3D%22M0%200h32v32H0z%22%2F%3E%3Cpath%20fill%3D%22%23FFF%22%20d%3D%22M10.046%2030.548l-.016-.15c-.13-1.288-.226-3.115.082-4.44.296-1.272%201.913-8.106%201.913-8.106s-.488-.977-.488-2.422c0-2.268%201.314-3.96%202.95-3.96%201.392%200%202.065%201.044%202.065%202.296%200%201.4-.89%203.492-1.35%205.43-.385%201.624.813%202.948%202.414%202.948%202.9%200%205.127-3.057%205.127-7.47%200-3.904-2.806-6.635-6.813-6.635-4.64%200-7.365%203.48-7.365%207.077%200%201.402.54%202.905%201.214%203.722.132.16.152.302.112.467-.124.515-.4%201.623-.453%201.85-.072.3-.237.362-.546.218-2.037-.948-3.31-3.926-3.31-6.32%200-5.144%203.737-9.87%2010.776-9.87%205.658%200%2010.055%204.033%2010.055%209.42%200%205.622-3.544%2010.146-8.464%2010.146-1.652%200-3.205-.858-3.737-1.872%200%200-.818%203.114-1.016%203.877-.365%201.403-1.342%203.157-2.007%204.243-.002.003-.454.833-.568%201h-.457c-.058%200-.118-1.445-.12-1.45z%22%2F%3E%3C%2Fsvg%3E');
}

#sharing .twitter {
  background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2032%2032%22%3E%3Cpath%20fill%3D%22%2355ACEE%22%20d%3D%22M0%200h32v32H0z%22%2F%3E%3Cpath%20fill%3D%22%23FFF%22%20d%3D%22M28%208.557c-.884.39-1.833.656-2.828.775%201.017-.608%201.798-1.573%202.166-2.725-.953.567-2.006.976-3.13%201.194-.896-.956-2.176-1.554-3.593-1.554-2.72%200-4.924%202.206-4.924%204.925%200%20.387.045.763.13%201.125-4.094-.208-7.724-2.168-10.15-5.147-.423.726-.667%201.573-.667%202.476%200%201.71.87%203.214%202.19%204.1-.806-.027-1.564-.25-2.23-.616v.06c0%202.39%201.7%204.378%203.952%204.83-.414.113-.85.172-1.297.172-.317%200-.625-.03-.927-.086.63%201.956%202.447%203.38%204.6%203.42-1.685%201.318-3.808%202.107-6.114%202.107-.398%200-.79-.023-1.175-.068%202.18%201.396%204.768%202.213%207.55%202.213%209.056%200%2014.01-7.506%2014.01-14.012%200-.213-.005-.426-.015-.637.96-.694%201.795-1.56%202.455-2.55z%22%2F%3E%3C%2Fsvg%3E');
}

#sharing .facebook {
  background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2032%2032%22%3E%3Cpath%20fill%3D%22%233B5998%22%20d%3D%22M0%200h32v32H0z%22%2F%3E%3Cpath%20fill%3D%22%23FFF%22%20d%3D%22M17.78%2027.5V17.008h3.522l.527-4.09h-4.05v-2.61c0-1.182.33-1.99%202.026-1.99h2.166V4.66c-.375-.05-1.66-.16-3.155-.16-3.123%200-5.26%201.905-5.26%205.405v3.016h-3.53v4.09h3.53V27.5h4.223z%22%2F%3E%3C%2Fsvg%3E');
}

@media screen and (max-width: 900px) {
  #photo-controls h1 {
    position: static;
    float: left;
  }

  #photo-controls #photo-controls-title {
    display: none;
  }

  #photo-controls h1 small {
    margin-left: 20px;
  }

  #photo-controls #time-remaining {
    font-size: 10px;
    line-height: 16px;
  }

  .header .button.first, .header .button:first-child {
    margin-left: 20px;
  }
}

@media screen and (min-device-width: 1024px) {
  .albums a:hover .title > .info {
    display: block;
  }
}

@media screen and (max-width: 568px) {
  .header .button:first-child .text {
    display: none;
  }

  .header .button:first-child {
    margin-left: 0;
  }

  .header .button:first-child::after {
    content: '‹';
  }

  #content {
    width: 100% !important;
  }

  #album-long-content {
    column-width: auto;
  }

  .thumbs {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    width: 100%;
  }

  .thumbs.albums {
    margin-top: 270px;
  }

  .thumbs a {
    float: none;
    margin: 0 0 2px;
    width: 31vw !important;
    height: 31vw !important;
  }

  #map {
    margin: 0;
    position: absolute !important;
    top: 43px;
    left: 0;
    width: 100%;
    height: 290px;
    border: none;
  }

  #sharing > a {
    opacity: 0.8;
  }

  #photo-controls #close {
    display: none;
  }

  #photo-controls #slideshow.button {
    margin-left: 0;
  }

  #photo-controls .button {
    margin: 0 5px;
  }

  #photo-controls #position {
    margin-left: 0;
  }
}

@media screen and (max-width: 700px) {
  #sharing {
    top: initial;
    bottom: 0;
    height: 32px;
    width: auto;
    left: 50%;
    transform: translateX(-50%);
  }
}
