.group-wrapper {
  height: auto !important;
}

.invisible {
  display: none !important;
}

.containerDiv,
.containerDiv > * {
  box-sizing: border-box;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.containerDiv {
  width: 100%;
  max-width: 100%;
  margin: auto;
  display: grid;
  grid-template-rows: auto auto;
  grid-gap: 15px;
  height: min-content;
  margin-top: 5px;
}

.dragArea {
  width: 100%;
  display: grid;
  gap: 15px;
  height: min-content;
  padding: 10px;
  align-items: center;
  justify-items: center;
  /* grid-auto-columns: auto; */
  .groupDiv {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    inline-size: 100%;
    align-items: start;
    justify-items: start;
    gap: 5px;
    &:before {
      content: attr(data-name);
      grid-column: 1 / -1;
      font-size: 1.4em;
      font-weight: bold;
    }
    &:not(:has(.dragElem)) {
      display: none;
    }
  }
}

.dragElem {
  inline-size: 220px;
  block-size: 70px;
  display: grid;
  place-items: center;
  border: 2px solid #cbcbcb;
  border-radius: 5px;
  cursor: pointer;
  background: #fafafa;
  color: #333;
  font-weight: bold;
  box-shadow: 0px 10px 10px -2px rgba(0, 0, 0, 0.4);
  text-align: center;
  line-height: 1.1;
  font-size: 12px;
  padding: 3px;
}

.dropItem .dragElem {
  width: 100%;
  height: 55px;
  display: grid;
  place-items: center;
  border: 2px solid #218c74;
  border-radius: 5px;
  cursor: pointer;
  background: #33d9b2;
  color: #fff;
  font-weight: bold;
  box-shadow: 0px 10px 10px -5px rgb(0 0 0 / 40%);
  text-align: center;
  margin-bottom: 8px;
  font-size: 11px;
}

.imagesAndLabels {
  grid-template-rows: 8fr 2fr;
}

.imageCont {
  width: 100%;
  height: 100%;
  grid-row: 1/1;
  display: grid;
  place-items: center;
}

img.dragElemImage {
  max-height: 70px;
}

.dropArea {
  width: 100%;
  height: 250px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(30px, 1fr));
  grid-gap: 1px;
  border: 2px solid #cbcbcb;
  padding: 3px;
  border-radius: 5px;
}

.dropItem {
  width: 100%;
  height: 100%;
  font-size: 12px;
  border: 1px solid transparent;
  overflow-x: auto;
}

.itemOver {
  border: 1px dashed #cbcbcb;
}

.dropLabel {
  display: grid;
  width: 100%;
  height: 30px;
  text-align: center;
  border-top: 2px solid #cbcbcb;
  border-bottom: 2px solid #cbcbcb;
  border-left: 1px solid #cbcbcb;
  border-right: 1px solid #cbcbcb;
  box-shadow: 0 10px 10px -2px rgba(0, 0, 0, 0.4);
}

.dropLabel {
  display: grid;
  width: 100%;
  height: 30px;
  text-align: center;
  border-top: 2px solid #cbcbcb;
  border-bottom: 2px solid #cbcbcb;
  border-left: 1px solid #cbcbcb;
  border-right: 1px solid #cbcbcb;
  box-shadow: 0 10px 10px -5px rgb(0 0 0 / 40%);
  position: sticky;
  align-items: center;
  margin-bottom: 10px;
  border-radius: 3px;
  font-weight: bold;
  color: #333;
  top: 0;
  background: #fff;
}

span.scaleLabel {
  position: absolute;
  top: -60px;
  line-height: 1.1;
  font-weight: bold;
}

.dropItem::-webkit-scrollbar {
  width: 10px;
  height: 15px;
}

.dropItem::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.dropItem::-webkit-scrollbar-thumb {
  background: #888;
}

.dropItem::-webkit-scrollbar-thumb:hover {
  background: #555;
}

@media only screen and (max-width: 480px) {
  .containerDiv {
    height: auto;
    width: 95%;
    grid-template-rows: auto auto;
  }
  .dragArea {
    display: block;
    padding: 0;
    text-align: center;
  }
  .dragElem {
    height: 80px;
    width: 318px;
    display: inline-grid;
    vertical-align: top;
    margin: 6px 3px auto;
  }
  img.dragElemImage {
    max-height: 35px;
  }
  .dropArea {
    grid-template-columns: unset;
    grid-template-rows: repeat(auto-fit, minmax(10px, 1fr));
    top: 10px;
    height: min-content;
  }
  .dropItem {
    width: 100%;
    height: 105px;
    font-size: 30px;
    display: flex;
    flex-direction: row;
    align-items: center;
    overflow-x: auto;
  }
  .dropItem .dragElem {
    font-size: 10px;
    width: 200px;
    min-width: 200px;
    margin: unset;
    margin-left: 5px;
    height: 100%;
  }
  .dropLabel {
    display: grid;
    width: 100px;
    min-width: 100px;
    height: 100%;
    text-align: center;
    border-top: 2px solid #cbcbcb;
    border-bottom: 2px solid #cbcbcb;
    border-left: 1px solid #cbcbcb;
    border-right: 1px solid #cbcbcb;
    box-shadow: 0 10px 10px -5px rgb(0 0 0 / 40%);
    position: sticky;
    align-items: center;
    margin-bottom: 0;
    border-radius: 3px;
    font-size: 12px;
    padding-top: 5px;
    padding-bottom: 10px;
    left: 0;
    background: #fff;
  }
  span.scaleLabel {
    position: static;
    font-size: 10px;
  }
}
