body {
  background-color: white;
  color: #555;
  box-sizing: border-box;
  font-family: "Lucida Sans", "Lucida Sans Regular", "Lucida Grande", "Lucida Sans Unicode", Geneva, Verdana, sans-serif;
}

body.dark {
  background: #181818;
  color: #eee;
}

body > div {
  width: 100%;
}

h1,
h2,
h3 {
  margin: 2px;
  user-select: none;
}

h3#motd {
  cursor: default;
}

h1#title {
  font-size: 300%;
  transition: font-size 2s;
}

h1#title:hover {
  font-size: 350%;
  transition: font-size 1s;
  transition-timing-function: ease-out;
}

a {
  color: currentColor;
  text-decoration-line: underline;
  text-decoration-color: transparent;
}

a:hover {
  text-decoration-line: underline;
  text-decoration-color: currentColor;
  transition: text-decoration-color 50ms;
}

body #head {
  text-align: center;
}

.row {
  display: flex;
  flex-direction: row;
}

.col {
  display: flex;
  flex-direction: column;
}

.hidden {
  display: none !important;
}

.fixed-width {
  max-width: 1000px;
  margin-left: calc((100% - 1000px) / 2);
  margin-right: calc((100% - 1000px) / 2);
}

.noselect {
  -webkit-touch-callout: none; /* iOS Safari */
  -webkit-user-select: none; /* Safari */
  -khtml-user-select: none; /* Konqueror HTML */
  -moz-user-select: none; /* Old versions of Firefox */
  -ms-user-select: none; /* Internet Explorer/Edge */
  user-select: none; /* Non-prefixed version, currently
                                  supported by Chrome, Edge, Opera and Firefox */
}

/* #region display image */
#display-image {
  position: fixed;
  top: 0;
  left: 0;

  display: flex;
  justify-content: center;
  align-items: center;

  width: 100%;
  height: 100%;

  background: rgba(0, 0, 0, 0.4);

  cursor: pointer;

  opacity: 0;
  transition: opacity linear 80ms;
  pointer-events: none;
}
#display-image.visible {
  opacity: 1;
  pointer-events: all;
}
#display-image > img {
  max-width: 80%;
  max-height: 80%;
}
#display-image span {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translate(-50%, 0);

  display: flex;
  justify-content: center;
  align-items: center;

  width: 100%;
  padding: 6px 12px;

  background: rgba(0, 0, 0, 0.8);

  font-size: 1.4rem;
}

/* #endregion */

/* #region inputs */
@media screen and (max-width: 1000px) {
  #filters {
    display: none;
  }
}
button,
input,
optgroup,
select,
textarea {
  padding: 0;
  line-height: inherit;
  color: inherit;
}
button,
input,
optgroup,
select,
textarea {
  font-family: inherit;
  font-size: 100%;
  line-height: 1.15;
  margin: 0;
}
input[type="checkbox"]:checked {
  background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M5.707 7.293a1 1 0 0 0-1.414 1.414l2 2a1 1 0 0 0 1.414 0l4-4a1 1 0 0 0-1.414-1.414L7 8.586 5.707 7.293z'/%3e%3c/svg%3e");
  border-color: transparent;
  background-color: currentColor;
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
}
input[type="checkbox"] {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  -webkit-print-color-adjust: exact;
  color-adjust: exact;
  display: inline-block;
  vertical-align: middle;
  background-origin: border-box;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  flex-shrink: 0;
  height: 1em;
  width: 1em;
  color: #4299e1;
  background-color: #fff;
  border: 1px solid rgba(0, 0, 0, 0.25);
  border-radius: 0.25rem;
  margin-right: 8px;
}
/* #endregion */

/* #region table */
.table {
  border: 1px solid rgba(229, 231, 235, 1);
  border-radius: 10px;
  margin: 24px;

  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);

  overflow: hidden;
}
body.dark .table {
  box-shadow: none;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.table .head {
  display: flex;
  background: #f8f8f8;
  color: #666;
}
body.dark .table .head {
  background: #333;
  color: white;
}

.table .head > * {
  width: 100%;

  padding: 12px 24px;

  text-transform: uppercase;
  font-weight: 500;
  font-size: 0.75rem;
}

.table .row {
  width: 100%;
  display: flex;
  border-top: 1px solid rgba(229, 231, 235, 1);
}
.table .row:hover {
  background: rgba(0, 0, 0, 0.02);
}
body.dark .table .row {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  background: #212121;
}
body.dark .table .row:hover {
  background: #333;
}

.table .row .item {
  width: 100%;
  padding: 12px 24px;
}

.table .row .item > label {
  cursor: pointer;
}
.table .row .item > label:hover {
  text-decoration: underline;
}
/* #endregion */

/* #region image grid */
.image-grid {
  display: flex;
  flex-wrap: wrap;
  /* width: calc(100% - 96px); */
  margin: 24px;
  --height: 340; /* Minimal row height */
  --ratio: 1; /* Default aspect ratio for photos that are not loaded yet */
}

.image-grid .item {
  flex: calc(var(--height) / var(--ratio));
  min-width: calc(var(--height) / var(--ratio) * 1px);
  margin: 6px;
  font-size: 0;
  cursor: pointer;
}

.image-grid .item img {
  width: 100%;
}

.image-grid .item img.fade-out {
  animation: fade-out 200ms forwards;
}

.image-grid .item img.fade-in {
  animation: fade-in 200ms forwards;
}

@keyframes fade-out {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}
@keyframes fade-in {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

.image-grid .placeholder {
  flex-grow: 99999;
}
/* #endregion */

/* #region theme switcher */
#theme-switcher > div {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 64px;
  height: 64px;
  border-radius: 20px;
  cursor: pointer;
}
#theme-switcher .dark-theme {
  display: none;
}
#theme-switcher .light-theme {
  display: flex;
}
#theme-switcher .light-theme:hover {
  background: rgba(0, 0, 0, 0.05);
}
#theme-switcher .light-theme > svg {
  fill: #222;
}
body.dark #theme-switcher .dark-theme {
  display: flex;
}
body.dark #theme-switcher .dark-theme > svg {
  fill: #ccc;
}
body.dark #theme-switcher .dark-theme:hover {
  background: rgba(255, 255, 255, 0.1);
}
body.dark #theme-switcher .light-theme {
  display: none;
}
/* #endregion */

/* #region header */
#head {
  margin-bottom: 24px;
  margin-top: 24px;
}
/* #endregion */
