

.gallery-index, .mouse-reset {
  position: absolute;
  top: 70px;
  right: 10px;  
  width: auto;
  height: 30px;
  z-index: 90;
}



@media only screen and (min-device-width: 768px){
.gallery-index, .mouse-reset {
  position: fixed;
  top: 100px;
}}


.index-content {
  display: flex;
  position: fixed;
  left: -5px;
  top: 120px;
  background-color: #222222;
  border-radius: 9px;
  width: 104dvw;
  height: 77dvh;
  justify-content: center;
  box-shadow: 0px 8px 16px 0px rgba(0,0,0,1.2);
  z-index: 99;
  opacity: 0.9;
  transform: translateX(-100%);
  transition: 0.3s ease-in;
  transition-delay: 0s;
}

.index-content.visible {
  transform: translateX(0%);
  transition: 0.5s ease-out;
}
 
html:has(.nojs-marker) .index-content {
  top: 150px;
}

html:has(.nojs-marker) .gallery-index:hover > .index-content {
  transform: translateX(0%);
  transition: 0.5s ease-out;
}

@media only screen and (max-device-width: 660px){
html:has(.thumbs-controls) .nojs-marker {
  display: none;
}}

.index-col {
  background-color: #232323;
  border: solid 1px #A4A4A4;
  border-radius: 5px;
  height: 40dvh;
  width: 88dvw;
  padding: 25px 10px 25px 10px;
  align: top;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 15px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

@media only screen and (max-device-width: 612px){
.index-content {
  height: 95dvh;
  gap: 5px; 
}}



@media only screen and (min-device-width: 660px){
.index-content {
  position: absolute;
  left: auto;
  right: 0px;
  top: 30px;
  width: 54dvw;
  height: 45px;
  transform: translateX(0%);
}
.index-col {
  height: 100%;
  width: 100%;
  padding: 4px;
  flex-direction: row;
  flex-wrap:wrap;
}
html:has(.nojs-marker) .index-content {
  top: 10px;
}}


.close-index {
  color: #AFAFAF;
  cursor: pointer;
  position: absolute;
  top: 10px;
  right: 10px;  
  font-size: 45px;
  font-weight: bold;
  line-height: 5px;
  float: right;
}

.close-nojs {
  display: none;
  top: 40px;
  right: 40px;  
}
html:has(.gallery-index:hover) .close-nojs {
  display: block;
}


.group-button {
  height: 45px;
  width: 130px;
  padding: 5px 10px;
  font-size: 1.2rem;
  line-height: 33px;
}


.gallery-index {  /* Hide index button on top page */
  display: none;
}
html:has(.thumbs-list) .gallery-index {
  display: block;
}

@media only screen and (min-device-width: 660px){
#index, .close-index, .mouse-reset {
  display: none;
}
.gallery-index {
  position: absolute;
  top: 50px;
}
.group-button {
  width: 130px;
  height: 31px;
  padding: 2px;
  font-size: 1rem;
  line-height: 26px;
  margin: 0px;
}
.index-content {
  display: none;
}
html:has(.thumbs-list) .index-content {
  display: block;
}}

