:root {
  --opacity-transition: 200ms cubic-bezier(0.4, 0.1, 0.2, 0.1);
}

html {
  /* disable pull-to-refresh in mobile browsers */
  overflow: hidden;
  overscroll-behavior: none;
}

#main-inner:focus {
  outline: none;
}

/* Overlay with Initializing... message */

#overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  background-color: var(--ui-background);
  opacity: 0.9;
}

#overlay-message {
  position: absolute;
  top: 50%;
  left: 50%;
  font-size: 50px;
  color: var(--ui-text-color);
  transform: translate(-50%,-50%);
  -ms-transform: translate(-50%,-50%);
}

/* Filter section */

#filter-settings a {
  color: #2a7ae2;
  text-decoration: none;
}

.filter-plus,
.filter-minus {
  border-radius: 25px;
  border: 1px solid #383838;
  padding-top: 0px;
  padding-bottom: 1px;
  padding-left: 5px;
  padding-right: 5px;
  color: #000000;
  white-space: nowrap;
}

.filter-plus {
  background: #BCE29E;
}

.filter-plus::before {
  content: "+";
}

.filter-minus {
  background: #FF8787;
}

.filter-minus::before {
  content: "-";
}

/* Task gallery */

.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

#filter-settings {
  padding-top: 1em;
}

#filter-status {
  padding-top: 1em;
  padding-bottom: 1em;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  grid-gap: 0;
  margin-bottom: 2em;
}

.gallery_cell {
  box-sizing: border-box;
  border: 1px solid transparent;
  /* background-color: #303030; */
  /* opacity: 0.9; */
  position: relative;
}

@media (hover: hover) and (pointer: fine) {
  /* Desktops with mouse */
  .gallery_cell:hover img {
    opacity: 0.6;
    -webkit-transition: opacity var(--opacity-transition);
    -moz-transition: opacity var(--opacity-transition);
    -o-transition: opacity var(--opacity-transition);
    transition: opacity var(--opacity-transition);
  }

  .gallery_cell:hover {
    cursor: pointer;
    border-color: #fff;
    border-radius: 3px;
    background-color: rgb(50, 50, 50);
  }
}

.gallery_cell {
  display: inline-block; /* Makes the <a> tag behave like a block element */
  margin: auto;
  object-fit: none;
  overflow: hidden;
  line-height: 0;       /* Removes extra space inside <a> tag */
}

.gallery_cell_image_normal {
  width: 160px;
  height: 80px;
  object-fit: scale-down;
}

.gallery_cell_image_wide {
  width: 320px;
  height: 80px;
  object-fit: scale-down;
}

.gallery_cell_normal {
}

.gallery_cell_wide {
  grid-column: span 2; /* Span across two columns */
}

.gallery a.disabled {
  pointer-events: none;
  cursor: default;
  opacity: 0.25;
}

#tool-label {
  display: none;
}
@media only screen and (min-width: 800px) {
  #tool-label {
    display: inline-block;
  }
}

#settings-button,
#about-button {
  font-size: 10px;
}

#about-button {
  display: none;
}

@media only screen and (min-width: 700px) {
  #about-button {
    display: inline-block;
  }
}

@media only screen and (min-width: 850px) {
  #settings-button,
  #about-button {
    font-size: 12px;
  }
}

@media only screen and (min-width: 1000px) {
  #settings-button,
  #about-button {
    font-size: 15px;
  }
}

@media (min-width: 350px) { 
  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 510px) { 
  .gallery {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 670px) { 
  .gallery {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 830px) { 
  .gallery {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (min-width: 990px) { 
  .gallery {
    grid-template-columns: repeat(6, 1fr);
  }
}

@media (min-width: 1150px) { 
  .gallery {
    grid-template-columns: repeat(7, 1fr);
  }
}

@media (min-width: 1310px) { 
  .gallery {
    grid-template-columns: repeat(8, 1fr);
  }
}

#filter-previous-button.hidden,
#filter-next-button.hidden,
#advanced-tool.hidden,
#advanced-filter-tag.hidden {
  display: none !important;
}

.inline-block {
  display: inline-block;
}

/* Default styles for buttons, showing full titles and hiding short titles */
.responsive-button .full-title {
  display: inline;
}

.responsive-button .short-title {
  display: none;
}

@media (max-width: 600px) { /* Adjust 600px based on your needs */
  .responsive-button .full-title {
    display: none; /* Hide full title on small screens */
  }

  .responsive-button .short-title {
    display: inline; /* Show short title on small screens */
  }
}
