/* Make clicks pass-through */
#nprogress {
  pointer-events: none;
}

#nprogress .bar {
  background: #29d;

  position: fixed;
  z-index: 1031;
  top: 0;
  left: 0;

  width: 100%;
  height: 2px;
}

/* Fancy blur effect */
#nprogress .peg {
  display: block;
  position: absolute;
  right: 0px;
  width: 100px;
  height: 100%;
  box-shadow: 0 0 10px #29d, 0 0 5px #29d;
  opacity: 1.0;
  transform: rotate(3deg) translate(0px, -4px);
}

/* Remove these to get rid of the spinner */
#nprogress .spinner {
  display: block;
  position: fixed;
  z-index: 1031;
  top: 15px;
  right: 15px;
}

#nprogress .spinner-icon {
  width: 18px;
  height: 18px;
  box-sizing: border-box;

  border: solid 2px transparent;
  border-top-color: #29d;
  border-left-color: #29d;
  border-radius: 50%;
  animation: nprogress-spinner 400ms linear infinite;
}

.nprogress-custom-parent {
  overflow: hidden;
  position: relative;
}

.nprogress-custom-parent #nprogress .spinner,
.nprogress-custom-parent #nprogress .bar {
  position: absolute;
}
@keyframes nprogress-spinner {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.noty_layout_mixin,
#noty_layout__centerRight,
#noty_layout__centerLeft,
#noty_layout__center,
#noty_layout__bottomRight,
#noty_layout__bottomCenter,
#noty_layout__bottomLeft,
#noty_layout__bottom,
#noty_layout__topRight,
#noty_layout__topCenter,
#noty_layout__topLeft,
#noty_layout__top {
  position: fixed;
  margin: 0;
  padding: 0;
  z-index: 9999999;
  transform: translateZ(0) scale(1, 1);
  backface-visibility: hidden;
  -webkit-font-smoothing: subpixel-antialiased;
  filter: blur(0);
  -webkit-filter: blur(0);
  max-width: 90%;
}

#noty_layout__top {
  top: 0;
  left: 5%;
  width: 90%;
}

#noty_layout__topLeft {
  top: 20px;
  left: 20px;
  width: 325px;
}

#noty_layout__topCenter {
  top: 5%;
  left: 50%;
  width: 325px;
  transform: translate(calc(-50% - 0.5px)) translateZ(0) scale(1, 1);
}

#noty_layout__topRight {
  top: 20px;
  right: 20px;
  width: 325px;
}

#noty_layout__bottom {
  bottom: 0;
  left: 5%;
  width: 90%;
}

#noty_layout__bottomLeft {
  bottom: 20px;
  left: 20px;
  width: 325px;
}

#noty_layout__bottomCenter {
  bottom: 5%;
  left: 50%;
  width: 325px;
  transform: translate(calc(-50% - 0.5px)) translateZ(0) scale(1, 1);
}

#noty_layout__bottomRight {
  bottom: 20px;
  right: 20px;
  width: 325px;
}

#noty_layout__center {
  top: 50%;
  left: 50%;
  width: 325px;
  transform: translate(calc(-50% - 0.5px), calc(-50% - 0.5px)) translateZ(0) scale(1, 1);
}

#noty_layout__centerLeft {
  top: 50%;
  left: 20px;
  width: 325px;
  transform: translate(0, calc(-50% - 0.5px)) translateZ(0) scale(1, 1);
}

#noty_layout__centerRight {
  top: 50%;
  right: 20px;
  width: 325px;
  transform: translate(0, calc(-50% - 0.5px)) translateZ(0) scale(1, 1);
}

.noty_progressbar {
  display: none;
}

.noty_has_timeout.noty_has_progressbar .noty_progressbar {
  display: block;
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 100%;
  background-color: #646464;
  opacity: 0.2;
  filter: alpha(opacity=10);
}

.noty_bar {
  -webkit-backface-visibility: hidden;
  transform: translate(0, 0) scale(1, 1);
  -webkit-font-smoothing: subpixel-antialiased;
  overflow: hidden;
}

.noty_effects_open {
  opacity: 0;
  transform: translate(50%);
  animation: noty_anim_in 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  animation-fill-mode: forwards;
}

.noty_effects_close {
  animation: noty_anim_out 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  animation-fill-mode: forwards;
}

.noty_fix_effects_height {
  animation: noty_anim_height 75ms ease-out;
}

.noty_close_with_click {
  cursor: pointer;
}

.noty_close_button {
  position: absolute;
  top: 2px;
  right: 2px;
  font-weight: bold;
  width: 20px;
  height: 20px;
  text-align: center;
  line-height: 20px;
  background-color: rgba(0, 0, 0, 0.05);
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.2s ease-out;
}

.noty_close_button:hover {
  background-color: rgba(0, 0, 0, 0.1);
}

.noty_modal {
  position: fixed;
  width: 100%;
  height: 100%;
  background-color: #000;
  z-index: 10000;
  opacity: 0.3;
  left: 0;
  top: 0;
}

.noty_modal.noty_modal_open {
  opacity: 0;
  animation: noty_modal_in 0.3s ease-out;
}

.noty_modal.noty_modal_close {
  animation: noty_modal_out 0.3s ease-out;
  animation-fill-mode: forwards;
}

@keyframes noty_modal_in {
  100% {
    opacity: 0.3;
  }
}

@keyframes noty_modal_out {
  100% {
    opacity: 0;
  }
}

@keyframes noty_anim_in {
  100% {
    transform: translate(0);
    opacity: 1;
  }
}

@keyframes noty_anim_out {
  100% {
    transform: translate(50%);
    opacity: 0;
  }
}

@keyframes noty_anim_height {
  100% {
    height: 0;
  }
}

.noty_theme__relax.noty_bar {
  margin: 4px 0;
  overflow: hidden;
  border-radius: 2px;
  position: relative;
}

.noty_theme__relax.noty_bar .noty_body {
  padding: 10px;
}

.noty_theme__relax.noty_bar .noty_buttons {
  border-top: 1px solid #e7e7e7;
  padding: 5px 10px;
}

.noty_theme__relax.noty_type__alert,
.noty_theme__relax.noty_type__notification {
  background-color: #fff;
  border: 1px solid #dedede;
  color: #444;
}

.noty_theme__relax.noty_type__warning {
  background-color: #FFEAA8;
  border: 1px solid #FFC237;
  color: #826200;
}

.noty_theme__relax.noty_type__warning .noty_buttons {
  border-color: #dfaa30;
}

.noty_theme__relax.noty_type__error {
  background-color: #FF8181;
  border: 1px solid #e25353;
  color: #FFF;
}

.noty_theme__relax.noty_type__error .noty_buttons {
  border-color: darkred;
}

.noty_theme__relax.noty_type__info,
.noty_theme__relax.noty_type__information {
  background-color: #78C5E7;
  border: 1px solid #3badd6;
  color: #FFF;
}

.noty_theme__relax.noty_type__info .noty_buttons,
.noty_theme__relax.noty_type__information .noty_buttons {
  border-color: #0B90C4;
}

.noty_theme__relax.noty_type__success {
  background-color: #BCF5BC;
  border: 1px solid #7cdd77;
  color: darkgreen;
}

.noty_theme__relax.noty_type__success .noty_buttons {
  border-color: #50C24E;
}

:root {
  --primary-font-family: Verdana, Geneva, sans-serif;
  --color-black: #16161d;
  --color-white: #ffffff;
  --color-error: rgb(220, 53, 69);
}

* {
  box-sizing: border-box;
}

body {
  font-family: var(--primary-font-family);
  font-size: medium;
  background: var(--color-white);
  color: var(--color-black);
}

a {
  color: var(--color-black);
  text-decoration: underline;
}

ul {
  list-style-type: none;
}

label {
  display: block;
  margin-top: 10px;
  font-weight: bold;
}

input,
select,
button {
  font-size: medium;
  margin-top: 10px;
}

input[type=text],
input[type=password] {
  width: 100%;
  font-size: medium;
}

input[type=text].short,
input[type=password].short {
  width: 50%;
}

input[type=text].medium,
input[type=password].medium {
  width: 75%;
}

select {
  outline: none;
  border: 1px solid var(--color-black);
  height: 30px;
  width: 100%;
  font-size: 16px;
}

button,
input[type=submit] {
  font-size: medium;
  margin-top: 20px;
  cursor: pointer;
  outline: none;
  border: 1px solid var(--color-black);
  border-radius: 0;
  background: var(--color-white);
  padding: 4px 14px;
}

button:focus,
button:hover,
input[type=submit]:focus,
input[type=submit]:hover {
  background: var(--color-black);
  color: var(--color-white);
}

button.icon-button,
input[type=submit].icon-button {
  background: transparent;
  border: none;
}

svg {
  fill: var(--color-white);
}

svg:hover {
  fill: var(--color-light);
}

button:hover {
  cursor: pointer;
}

table {
  border-collapse: collapse;
  width: 100%;
}

table thead th {
  text-align: left;
}

table tbody td {
  padding: 4px 8px;
}

table tbody .empty td,
table tbody .empty td a {
  color: var(--color-error);
}

table.striped tbody tr:nth-child(odd) {
  background-color: #f2f2f2;
}

main {
  margin-top: 1em;
}

@media only screen and (min-width: 992px) {
  main {
    display: grid;
    grid-template-columns: 1fr 7fr;
    grid-column-gap: 1px;
    align-items: start;
    margin-bottom: 3em;
  }
}

@media only screen and (min-width: 992px) {
  main form {
    width: 25%;
    margin: 0 auto;
  }
}

@media only screen and (min-width: 992px) {
  main form.wide {
    width: 100%;
    margin: 0 auto;
  }
}

section article {
  width: 25%;
  margin: 0 auto 2em auto;
}

.login-form {
  width: 100%;
}

.tag-link {
  display: inline-block;
  margin-right: 1em;
}

@media only screen and (min-width: 992px) {
  .tag-link {
    display: block;
  }
}

.sidebar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: flex-start;
}

@media only screen and (min-width: 992px) {
  .sidebar {
    display: block;
    margin-bottom: 1em;
  }

  .sidebar .tag-links {
    margin-top: 1em;
  }
}

.tags-list {
  display: flex;
  justify-content: flex-start;
  align-items: baseline;
  flex-wrap: wrap;
}

.tags-list .tag {
  display: inline-block;
  margin: 10px 5px;
  border: 1px solid black;
  padding: 7px;
  background: #dedede;
}

.tags-list .tag:hover,
.tags-list .tag:focus {
  background: #fff;
}

.gallery-list {
  padding-left: 2rem;
}

.image-grid-tag-form-container {
  min-height: 90px;
  /* Adjust this value based on your form's height */
  margin: -1rem 0 1rem 0;
}

.image-grid-tag-form-container .image-grid-tag-form-wrapper {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  gap: 1rem;
}

.image-grid-tag-form-container .image-grid-tag-form {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.image-grid-tag-form-container .image-grid-tag-form input {
  width: 200px;
  margin-right: 0;
}

.image-grid-tag-form-container .image-grid-tag-form button {
  margin-top: 0.25rem;
}

.image-grid {
  display: flex;
  flex-wrap: wrap;
}

.image-grid-item {
  position: relative;
  border: 2px solid #16161d;
  width: 300px;
}

.image-grid-item img {
  display: block;
  max-height: 300px;
  margin: 0 auto;
}

.image-grid-item.missing img {
  border: 4px solid var(--color-error);
}

.image-grid-item .image-tags,
.image-grid-item .image-controls {
  position: absolute;
  width: 100%;
  background-color: rgba(0, 0, 0, 0.6);
}

.image-grid-item .image-tags .image-controls-buttons,
.image-grid-item .image-controls .image-controls-buttons {
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  width: 100%;
  padding: 0.5em 0;
}

.image-grid-item .image-tags .image-controls-button,
.image-grid-item .image-controls .image-controls-button {
  position: relative;
}

.image-grid-item .image-tags .image-controls-button .gallery-select-popup,
.image-grid-item .image-controls .image-controls-button .gallery-select-popup {
  position: absolute;
  top: 100%;
  left: 0;
}

.image-grid-item .image-tags .image-controls-button a,
.image-grid-item .image-tags .image-controls-button button,
.image-grid-item .image-controls .image-controls-button a,
.image-grid-item .image-controls .image-controls-button button {
  display: block;
  margin: 0;
  padding: 0;
  border: none;
  outline: 0;
  background: transparent;
  color: white;
}

.image-grid-item .image-tags .image-controls-button input[type=checkbox],
.image-grid-item .image-controls .image-controls-button input[type=checkbox] {
  display: block;
  margin: 0;
}

.image-grid-item .image-tags .image-controls-button .checkbox-button,
.image-grid-item .image-controls .image-controls-button .checkbox-button {
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-width: 32px;
  min-height: 32px;
}

.image-grid-item .image-tags .image-controls-button .checkbox-input,
.image-grid-item .image-controls .image-controls-button .checkbox-input {
  width: 16px;
  height: 16px;
  margin: 0;
  pointer-events: none;
}

.image-grid-item .image-controls {
  top: 0;
}

.image-grid-item .image-tags {
  bottom: 0;
  min-height: 2em;
  display: flex;
  justify-content: space-evenly;
  flex-wrap: wrap;
  overflow-x: scroll;
}

.image-grid-item .image-tags input[type=text] {
  position: absolute;
  top: -9px;
  height: 100%;
  border: 1px solid #16161d;
}

.image-grid-item .image-tags .tag-link {
  display: block;
  color: white;
  font-size: 0.75em;
  text-align: center;
  text-transform: lowercase;
  text-decoration: none;
}

.gallery-select-popup {
  z-index: 10001;
  background: var(--color-white);
  border: 1px solid var(--color-black);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  min-width: 250px;
  max-height: 400px;
  overflow-y: scroll;
}

.gallery-select-popup .gallery-select-container .create-gallery-btn {
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  color: var(--color-black);
  cursor: pointer;
}

.gallery-select-popup .gallery-select-container .create-gallery-btn:hover {
  text-decoration: underline;
  background: transparent;
  color: var(--color-black);
}

.gallery-select-popup .gallery-select-container .create-gallery-input-container {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
}

.gallery-select-popup .gallery-select-container .create-gallery-input-container .create-gallery-input {
  flex: 1;
  margin: 0;
  height: 32px;
  padding: 4px 8px;
  border: 1px solid var(--color-black);
}

.gallery-select-popup .gallery-select-container .create-gallery-input-container .create-gallery-save-btn {
  background: transparent;
  border: none;
  padding: 8px;
  margin: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-select-popup .gallery-select-container .create-gallery-input-container .create-gallery-save-btn:hover {
  background: transparent;
}

.gallery-select-popup .gallery-select-container .create-gallery-input-container .create-gallery-save-btn:hover svg {
  stroke: var(--color-black);
}

.gallery-select-popup .gallery-select-container .create-gallery-input-container .create-gallery-save-btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.gallery-select-popup .gallery-select-container .create-gallery-input-container .create-gallery-save-btn svg {
  stroke: var(--color-black);
}

.gallery-select {
  margin: 0;
  padding: 0;
}

.gallery-select__item {
  padding: 8px 12px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  display: flex;
  align-items: center;
  gap: 12px;
}

.gallery-select__item:hover {
  background-color: #f5f5f5;
}

.gallery-select__item:focus {
  outline: none;
  background-color: #f5f5f5;
}

.gallery-select__item--selected {
  background-color: #e0e0e0;
  font-weight: bold;
}

.gallery-select__thumb {
  -o-object-fit: cover;
     object-fit: cover;
  border: 1px solid var(--color-black);
}

.gallery-select__name {
  flex: 1;
}

.gallery-list-item a {
  cursor: pointer;
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
}

.gallery-list-item a .gallery-list-item-name {
  position: absolute;
  bottom: 10px;
  left: 5px;
  background: var(--color-white);
}

.upload-form {
  width: 90%;
  margin-bottom: 3em;
}

@media only screen and (min-width: 992px) {
  .upload-form {
    min-height: 100px;
  }
}

.upload-form .upload-list {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  flex-wrap: wrap;
}

.upload-preview-container {
  display: block;
  width: 220px;
  margin: 1em;
}

.upload-preview {
  width: 100%;
}

.upload-preview-tags {
  width: 220px;
}

.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 10000;
  background-color: rgba(0, 0, 0, 0.8);
  display: none;
}

.lightbox.open {
  display: flex;
  justify-content: center;
  align-items: center;
}

.lightbox .lightbox-wrap {
  position: relative;
}

.lightbox .lightbox-wrap button {
  position: absolute;
  top: 0;
  right: 0;
  font-size: 1.25rem;
  background: transparent;
  border: none;
  margin: 0;
}

.lightbox .lightbox-wrap img {
  display: block;
  max-width: 90vw;
  max-height: 90vh;
}

@media only screen and (min-width: 992px) {
  .masonry {
    display: flex;
  }
}

.image-edit {
  min-height: 200px;
}

.paginator {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
}

.paginator li {
  display: block;
  margin-right: 1em;
}

.paginator .active {
  font-weight: bold;
}

#storage-usage {
  margin-bottom: 1em;
  font-size: 0.775rem;
  border: 1px solid var(--color-black);
}

.tag-filter-container {
  margin-bottom: 1rem;
}

.tag-filter-container input[type=text] {
  width: 50%;
}

.tag-filter-container button {
  display: block;
  margin-top: 0.5rem;
}

