/* Reusable drag & drop zone component */
.dropzone {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-large);
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: var(--card-bg);
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.dropzone::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(var(--link-rgb, 0, 123, 255), 0.1),
    transparent
  );
  transition: left 0.5s ease;
}

.dropzone:hover {
  border-color: var(--link);
  background: rgba(var(--link-rgb, 0, 123, 255), 0.02);
}

.dropzone:hover::before {
  left: 100%;
}

.dropzone.drag-over {
  border-color: var(--link);
  background: rgba(var(--link-rgb, 0, 123, 255), 0.1);
  transform: scale(1.02);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.dropzone.drag-over::before {
  left: 100%;
  animation: dropzone-shimmer 1.5s infinite;
}

@keyframes dropzone-shimmer {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

.dropzone-icon {
  font-size: 56px;
  color: var(--link);
  margin-bottom: 8px;
  margin-right: 0 !important;
  animation: dropzone-upload-float 1.8s ease-in-out infinite;
  transform-origin: center top;
}

@keyframes dropzone-upload-float {
  0%,
  100% {
    transform: translateY(-5px);
  }
  50% {
    transform: translateY(1px);
  }
}

.dropzone.drag-over .dropzone-icon {
  animation-duration: 0.9s;
}

.dropzone-text {
  font-size: 12px;
  font-weight: 600;
  color: var(--heading-color);
  margin-bottom: 5px;
}

.dropzone-hint {
  color: var(--muted-text);
  font-size: 0.9em;
}

.dropzone-type-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 0 !important;
  order: 3;
}

.dropzone-type-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  border-radius: 999px;
  background: rgba(var(--link-rgb, 0, 123, 255), 0.08);
  color: var(--heading-color);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  padding: 6px 9px;
}

.dropzone-type-chip i {
  font-size: 12px;
  line-height: 1;
  margin-right: 0 !important;
  color: currentColor !important;
}

.dropzone-type-chip svg {
  color: currentColor !important;
  fill: currentColor;
}

.dropzone-type-chip span {
  line-height: 1;
  color: currentColor;
}

.dropzone-type-chip--pdf {
  background: #fee2e2;
  border-color: #fecaca;
  color: #b91c1c;
}

.dropzone-type-chip--doc {
  background: #dbeafe;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.dropzone-type-chip--ppt {
  background: #ffedd5;
  border-color: #fed7aa;
  color: #c2410c;
}

.dropzone-type-chip--img {
  background: #dcfce7;
  border-color: #bbf7d0;
  color: #166534;
}

.dropzone-type-chip--txt {
  background: #fef3c7;
  border-color: #fde68a;
  color: #92400e;
}

.dropzone-type-chip--xls {
  background: #d1fae5;
  border-color: #a7f3d0;
  color: #065f46;
}

body.theme-dark .dropzone-type-chip--pdf {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(248, 113, 113, 0.45);
  color: #fecaca;
}

body.theme-dark .dropzone-type-chip--doc {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(96, 165, 250, 0.45);
  color: #dbeafe;
}

body.theme-dark .dropzone-type-chip--ppt {
  background: rgba(249, 115, 22, 0.2);
  border-color: rgba(251, 146, 60, 0.45);
  color: #fed7aa;
}

body.theme-dark .dropzone-type-chip--img {
  background: rgba(34, 197, 94, 0.2);
  border-color: rgba(74, 222, 128, 0.45);
  color: #dcfce7;
}

body.theme-dark .dropzone-type-chip--txt {
  background: rgba(245, 158, 11, 0.2);
  border-color: rgba(251, 191, 36, 0.45);
  color: #fef3c7;
}

body.theme-dark .dropzone-type-chip--xls {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(52, 211, 153, 0.45);
  color: #d1fae5;
}

.dropzone-browse-btn {
  border: 1px solid rgba(var(--link-rgb, 0, 123, 255), 0.35);
  border-radius: 10px;
  background: rgba(var(--link-rgb, 0, 123, 255), 0.12);
  color: var(--heading-color);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  padding: 10px 13px;
  margin-top: 28px;
  margin-right: 0;
  margin-bottom: 0 !important;
  order: 4;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    transform 0.18s ease;
}

.dropzone-browse-btn:hover {
  background: rgba(var(--link-rgb, 0, 123, 255), 0.2);
  border-color: rgba(var(--link-rgb, 0, 123, 255), 0.55);
  transform: translateY(-1px);
}

.dropzone-browse-btn:focus-visible {
  outline: 2px solid rgba(var(--link-rgb, 0, 123, 255), 0.45);
  outline-offset: 1px;
}

.dropzone-file-input {
  display: none;
  order: 5;
}

@media (prefers-reduced-motion: reduce) {
  .dropzone-icon {
    animation: none;
  }
}

@media (max-width: 768px) {
  .dropzone {
    padding: 20px 10px;
  }

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