.image-upload {
  position: relative;
  width: 100%;
}

.image-drop-zone {
  margin-bottom: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  cursor: pointer;
  position: relative;
  /* width: 100%; */
  height: 150px; /* Fixed height for the drop zone */
  border: 2px dashed #cccccc;
  border-radius: 10px;
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  padding: 10px;
  justify-content: flex-start;
  align-items: center;
}

.drop-zone-text {
  position: absolute;
  top: 50%; /* Centered initially */
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 16px;
  color: #888888;
  transition: all 0.3s ease;
  pointer-events: none;
  white-space: nowrap; /* Prevents text from wrapping */
}

.image-drop-zone.has-images .drop-zone-text {
  top: auto;
  bottom: 0px; /* Move text towards the bottom when images are present */
  transform: translateX(-50%);
}

.image-drop-zone::-webkit-scrollbar {
  height: 8px;
}

.image-drop-zone.dragging {
  border-color: #0f52ba;
  background-color: #f0f8ff;
}

.image-drop-zone::-webkit-scrollbar-thumb {
  background-color: #0f52ba;
  border-radius: 4px;
}

.image-drop-zone::-webkit-scrollbar-track {
  background-color: #f1f1f1;
}

.thumbnail {
  width: 100px;
  height: 100px;
  position: relative;
  border: 1px solid #0f52ba;
  border-radius: 5px;
  padding: 5px;
  background-color: var(--secondary-color-soft);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, background-color 0.2s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden; /* Crop overflow for images larger than container */
}

.thumbnail img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  display: block;
}

.remove-btn {
  position: absolute;
  top: 5px;
  right: 5px;
  background: var(--secondary-color-delete);
  color: white;
  border: none;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  cursor: pointer;
  font-size: 14px;
  line-height: 20px;
  z-index: 10;
}
.display-images-container {
  display: flex;
  overflow-x: auto;
  gap: 10px;
  padding: 5px;

}
.img_1 {
max-height: 150px;
max-width: 150px;
}

/* Reorder button styles */
.reorder-btn {
  position: absolute;
  top: 5px;
  right: 10px;
  background: var(--secondary-color-blue);
  color: white;
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  cursor: pointer;
  font-size: 14px;
  line-height: 30px;
  z-index: 10;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease;
}

.reorder-btn:hover {
  background-color: var(--primary-color);
}

/* Modal content styles */
.reorder-modal-content {
  padding: 20px;
  width: 100%;
}

.reorder-images-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 60vh;
  overflow-y: auto;
}

.reorder-image-item {
  display: flex;
  align-items: center;
  padding: 10px;
  background: var(--light-gray-background);
  border-radius: var(--border-radius-medium);
  cursor: move;
  transition: background-color 0.3s ease;
}

.reorder-image-item:hover {
  background-color: #f0f0f0;
}

.reorder-image-item .thumbnail {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
}

.reorder-image-item .thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--border-radius-small);
}

.reorder-handle {
  margin-left: auto;
  color: var(--secondary-color-gray);
  font-size: 20px;
  cursor: grab;
}

.reorder-image-item.dragging {
  opacity: 0.6;
  background-color: #e0e0e0;
}

/* Scrollbar styles for the modal */
.reorder-images-container::-webkit-scrollbar {
  width: 8px;
}

.reorder-images-container::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.reorder-images-container::-webkit-scrollbar-thumb {
  background: var(--secondary-color-blue);
  border-radius: 4px;
}

.reorder-images-container::-webkit-scrollbar-thumb:hover {
  background: var(--primary-color);
}
/* Placeholder style with visible background and full height */
.reorder-placeholder {
  background-color: #e0f7fa; /* Light background color for the placeholder */
  border: 2px dashed #0288d1; /* Border to make it stand out */
  height: 80px; /* Set to the full item height for visibility */
  margin-bottom: 10px; /* Optional: space around the placeholder */
  transition: background-color 0.2s;
}

/* Style applied to the item being dragged */
.reorder-dragging {
  opacity: 0.8;
  background-color: #e1f5fe; /* Subtle background color for dragging */
}