/* DropZone - Apple-inspired file upload */

.dropzone {
  border: 2px dashed var(--border-color);
  border-radius: 16px;
  padding: var(--space-10);
  text-align: center;
  background: var(--bg-secondary);
  transition: all var(--ms-duration-normal) var(--curve-spring);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.dropzone:hover {
  border-color: var(--apple-blue);
  background: var(--bg-primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-base);
}

.dropzone.dragover {
  border-color: var(--apple-blue);
  background: rgba(0, 122, 255, 0.04);
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 8px 24px rgba(0, 122, 255, 0.15);
}

.dropzone.dragover::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(0, 122, 255, 0.02), rgba(0, 122, 255, 0.04));
  border-radius: 16px;
  z-index: 1;
}

.dropzone-content {
  position: relative;
  z-index: 2;
}

.dropzone-icon {
  font-size: 48px;
  margin-bottom: var(--space-4);
  opacity: 0.7;
  transition: all var(--ms-duration-normal) var(--curve-spring);
  color: var(--text-tertiary);
}

.dropzone:hover .dropzone-icon,
.dropzone.dragover .dropzone-icon {
  transform: scale(1.1);
  opacity: 1;
  color: var(--apple-blue);
}

.dropzone-title {
  font-size: var(--fs-title-1);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
  letter-spacing: 0.01em;
  line-height: var(--line-height-tight);
}

.dropzone-subtitle {
  font-size: var(--fs-body);
  color: var(--text-secondary);
  margin-bottom: var(--space-5);
  line-height: var(--line-height-normal);
  max-width: 280px;
  margin-left: auto;
  margin-right: auto;
}

.dropzone-formats {
  display: inline-flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  justify-content: center;
  margin-top: var(--space-4);
}

.dropzone-format {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  padding: var(--space-2) var(--space-4);
  border-radius: 8px;
  font-size: var(--fs-caption-1);
  font-weight: 500;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  transition: all var(--ms-duration-fast) var(--curve-spring);
}

.dropzone-format:hover {
  background: var(--apple-blue);
  color: #FFFFFF;
  border-color: var(--apple-blue);
}

/* Upload progress */
.dropzone-progress {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 16px;
}

.dropzone-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--bg-tertiary);
  border-top-color: var(--apple-blue);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: var(--space-5);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.dropzone-progress-text {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-1);
  font-size: var(--fs-headline);
}

.dropzone-progress-detail {
  font-size: var(--fs-subhead);
  color: var(--text-secondary);
  text-align: center;
}

/* Error state */
.dropzone-error {
  border-color: var(--apple-red);
  background: rgba(255, 59, 48, 0.04);
}

.dropzone-error .dropzone-icon {
  color: var(--apple-red);
}

.dropzone-error-icon {
  font-size: 40px;
  margin-bottom: var(--space-3);
  color: var(--apple-red);
}

.dropzone-error-message {
  color: var(--apple-red);
  font-weight: 600;
  margin-bottom: var(--space-3);
  font-size: var(--fs-headline);
}

/* Accessibility */
.dropzone:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

/* Dark theme */
[data-theme='dark'] .dropzone {
  background: var(--bg-tertiary);
  border-color: var(--border-color);
}

[data-theme='dark'] .dropzone:hover {
  background: var(--bg-secondary);
}

[data-theme='dark'] .dropzone.dragover {
  background: rgba(0, 122, 255, 0.08);
}

[data-theme='dark'] .dropzone-progress {
  background: rgba(28, 28, 30, 0.95);
}

[data-theme='dark'] .dropzone-spinner {
  border-color: var(--bg-quaternary);
  border-top-color: var(--apple-blue);
}

[data-theme='dark'] .dropzone-format {
  background: var(--bg-secondary);
  border-color: var(--border-color);
  color: var(--text-tertiary);
}

[data-theme='dark'] .dropzone-format:hover {
  background: var(--apple-blue);
}

/* Mobile optimizations */
@media (max-width: 640px) {
  .dropzone {
    padding: var(--space-8);
  }

  .dropzone-icon {
    font-size: 40px;
  }

  .dropzone-title {
    font-size: var(--fs-title-2);
  }

  .dropzone-subtitle {
    font-size: var(--fs-callout);
    max-width: 240px;
  }
}

