/* Estilos para Dropzone.js */

.dropzone {
  border: 2px dashed #cbd5e0;
  border-radius: 0.5rem;
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background-color: #f7fafc;
}

.dropzone:hover {
  border-color: #a0aec0;
  background-color: #edf2f7;
}

.dropzone.dz-drag-hover {
  border-color: #4299e1;
  background-color: #ebf8ff;
}

.dropzone .dz-message {
  margin: 0;
  pointer-events: none; /* Permitir que los clics pasen a través al dropzone */
}

.dropzone .dz-message * {
  pointer-events: none; /* Aplicar a todos los hijos también */
}

.dropzone .dz-preview {
  margin: 1rem;
  display: inline-block;
}

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

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

.dropzone .dz-preview .dz-details {
  opacity: 1;
  padding: 0.5rem;
  background: white;
  border-radius: 0.375rem;
  margin-top: 0.5rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.dropzone .dz-preview .dz-details .dz-size {
  margin-bottom: 0.25rem;
  font-size: 0.875rem;
  color: #718096;
}

.dropzone .dz-preview .dz-details .dz-filename {
  font-size: 0.875rem;
  color: #2d3748;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 120px;
}

.dropzone .dz-preview .dz-progress {
  opacity: 1;
  z-index: 1000;
  pointer-events: none;
  position: relative;
  height: 16px;
  background: #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
  margin-top: 0.5rem;
}

.dropzone .dz-preview .dz-progress .dz-upload {
  background: #4299e1;
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 0;
  transition: width 300ms ease-in-out;
}

.dropzone .dz-preview.dz-success .dz-success-mark,
.dropzone .dz-preview.dz-error .dz-error-mark {
  display: block;
  opacity: 1;
  animation: passing-through 3s cubic-bezier(0.77, 0, 0.175, 1);
}

.dropzone .dz-preview .dz-success-mark,
.dropzone .dz-preview .dz-error-mark {
  pointer-events: none;
  opacity: 0;
  z-index: 500;
  position: absolute;
  display: none;
  top: 50%;
  left: 50%;
  margin-left: -27px;
  margin-top: -27px;
}

.dropzone .dz-preview .dz-success-mark svg,
.dropzone .dz-preview .dz-error-mark svg {
  display: block;
  width: 54px;
  height: 54px;
}

.dropzone .dz-preview.dz-success .dz-success-mark {
  color: #48bb78;
}

.dropzone .dz-preview.dz-error .dz-error-mark {
  color: #f56565;
}

.dropzone .dz-preview .dz-error-message {
  display: none;
  position: absolute;
  top: 130px;
  left: -10px;
  background: #fee;
  color: #c53030;
  padding: 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  z-index: 1000;
  max-width: 150px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.dropzone .dz-preview.dz-error .dz-error-message {
  display: block;
}

.dropzone .dz-preview .dz-remove {
  font-size: 0.75rem;
  text-align: center;
  display: block;
  cursor: pointer;
  border: none;
  background: none;
  color: #e53e3e;
  margin-top: 0.5rem;
  text-decoration: none;
}

.dropzone .dz-preview .dz-remove:hover {
  color: #c53030;
  text-decoration: underline;
}

.dropzone .dz-preview:hover .dz-image img {
  transform: scale(1.05);
  filter: blur(8px);
}

@keyframes passing-through {
  0% {
    opacity: 0;
    transform: translateY(40px);
  }
  30%, 70% {
    opacity: 1;
    transform: translateY(0px);
  }
  100% {
    opacity: 0;
    transform: translateY(-40px);
  }
}
