/* Dropzone Custom Styles */
.dropzone {
  min-height: 200px;
  position: relative;
}

.dropzone .dz-message {
  color: #64748b;
  font-size: 1rem;
  margin: 2em 0;
}

.dropzone.dz-drag-hover {
  border-color: #6366f1 !important;
  background-color: #eef2ff;
}

.dark .dropzone.dz-drag-hover {
  background-color: rgba(99, 102, 241, 0.1);
}

.dropzone .dz-preview {
  position: relative;
  display: inline-block;
  margin: 0.5rem;
  min-height: 120px;
  width: 120px;
}

.dropzone .dz-preview .dz-image {
  border-radius: 0.5rem;
  overflow: hidden;
  width: 120px;
  height: 120px;
  position: relative;
  display: block;
  z-index: 10;
  border: 2px solid #e2e8f0;
}

.dark .dropzone .dz-preview .dz-image {
  border-color: #4b5563;
}

.dropzone .dz-preview .dz-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dropzone .dz-preview .dz-details {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.5rem;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  font-size: 0.75rem;
  border-radius: 0 0 0.5rem 0.5rem;
  opacity: 0;
  transition: opacity 0.2s;
}

.dropzone .dz-preview:hover .dz-details {
  opacity: 1;
}

.dropzone .dz-preview .dz-filename,
.dropzone .dz-preview .dz-size {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dropzone .dz-preview .dz-progress {
  position: absolute;
  top: 50%;
  left: 10%;
  right: 10%;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.2s;
}

.dropzone .dz-preview.dz-processing .dz-progress {
  opacity: 1;
}

.dropzone .dz-preview .dz-progress .dz-upload {
  display: block;
  height: 100%;
  width: 0;
  background: #6366f1;
  transition: width 0.3s ease;
}

.dropzone .dz-preview .dz-error-message {
  position: absolute;
  top: 130px;
  left: -10px;
  right: -10px;
  background: #ef4444;
  color: white;
  padding: 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  opacity: 0;
  z-index: 1000;
  pointer-events: none;
  transition: opacity 0.3s;
}

.dropzone .dz-preview.dz-error .dz-error-message {
  opacity: 1;
}

.dropzone .dz-preview .dz-success-mark,
.dropzone .dz-preview .dz-error-mark {
  position: absolute;
  display: none;
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  margin-left: -27px;
  margin-top: -27px;
  z-index: 500;
}

.dropzone .dz-preview.dz-success .dz-success-mark,
.dropzone .dz-preview.dz-error .dz-error-mark {
  display: block;
}

.dropzone .dz-preview .dz-remove {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ef4444;
  color: white;
  border: 2px solid white;
  cursor: pointer;
  font-size: 0;
  z-index: 1000;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dropzone .dz-preview .dz-remove:hover {
  background: #dc2626;
  transform: scale(1.1);
}

.dropzone .dz-preview .dz-remove::before {
  content: "×";
  font-size: 18px;
  line-height: 1;
}

.dark .dropzone .dz-preview .dz-remove {
  border-color: #374151;
}

/* Hide the default Dropzone message when files are added */
.dropzone.dz-started .dz-message {
  display: none;
}
