.custom-upload-wrapper {
    display:flex;
    justify-content: space-between;
    align-items: center;
}

#custom-show-upload {
    display: none;
}

.file-upload-wrapper {
    position: relative;
}

.modal-custom-upload {
    position: absolute;
    width: 0;
    max-height: 500px;
    top: 0;
    left: -150%;
    transform: translate(-50%, -50%);
    background-color: #fff;
    box-shadow: 10px 10px 80px -14px;
    z-index: -1;
    visibility: hidden;
    padding: 15px;
    transition: visibility .3s ease;
}

.modal-custom-upload.active {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 99999;
    visibility: visible;
    transition: visibility .3s ease, width .3s ease;
    width: 290px;
}

@media screen and (min-width: 768px) {
    .modal-custom-upload.active {
        width: 600px;
    }
}

@media screen and (min-width: 992px) {
    .modal-custom-upload.active {
        width: 800px;
    }
}

.modal-wrapper {
    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
    gap: 10px;
    visibility : hidden;
    transition: visibility .3s ease;
}

.modal-custom-upload.active .modal-wrapper {
    visibility : visible;
}

.radio-image-list {
  list-style-type: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  max-height: 390px; 
  overflow-y: auto;
  padding: 10px;
  visibility : hidden;
  transition: visibility .3s ease;
}

.modal-custom-upload.active .radio-image-list {
    visibility : visible;
}

.radio-image-list li {
  width: 100%;
}

@media screen and (min-width: 768px) {
    .radio-image-list li {
      width: 50%;
    }
}

@media screen and (min-width: 992px) {
    .radio-image-list li {
      width: 33%;
    }
}

.modal-custom-upload input[type="radio"][id^="radio"] {
  display: none;
}

.modal-custom-upload label {
  border: 1px solid #fff;
  padding: 5px;
  display: block;
  position: relative;
  cursor: pointer;
}

.modal-custom-upload label:before {
  background-color: white;
  color: white;
  content: " ";
  display: block;
  border-radius: 50%;
  border: 1px solid #5f81a2;
  position: absolute;
  top: -5px;
  left: -5px;
  width: 25px;
  height: 25px;
  text-align: center;
  line-height: 28px;
  transition-duration: 0.4s;
  transform: scale(0);
}

 .modal-custom-upload label img {
  max-height: 350px;
  transition: transform .3s ease;
} 

.modal-custom-upload :checked + label:before {
  content: url('/img/check_icon.png');
  background-color: #5f81a2;
  transform: scale(1);
  z-index: 2;
}

.modal-custom-upload :checked + label img {
    transform: scale(0.95); 
}