.root {
  position: relative;
  border: 1px dashed rgba(122, 148, 255, 0.28);
  border-radius: 24px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: rgba(245, 247, 255, 0.9);
  transition: border-color 150ms ease, background 150ms ease, box-shadow 150ms ease;
  cursor: pointer;
  box-shadow: 0 20px 44px rgba(122, 148, 255, 0.12);
}

.root[data-variant="compact"] {
  border-radius: 18px;
  padding: 20px;
  gap: 12px;
}

.root[data-has-image="true"] {
  border-style: solid;
  border-color: rgba(108, 132, 255, 0.32);
  background: rgba(230, 236, 255, 0.96);
}

.root:hover,
.root:focus-within {
  border-color: rgba(102, 126, 234, 0.5);
  background: rgba(224, 232, 255, 0.98);
  box-shadow: 0 24px 48px rgba(118, 140, 255, 0.18);
}

.icon {
  display: inline-flex;
  padding: 14px;
  border-radius: 18px;
  background: rgba(118, 140, 255, 0.16);
  color: rgba(88, 112, 230, 0.92);
}

.label {
  font-size: 16px;
  font-weight: 700;
  color: rgba(28, 38, 90, 0.94);
}

.description {
  font-size: 13px;
  color: rgba(72, 90, 166, 0.7);
  max-width: 340px;
}

.hint {
  font-size: 12px;
  color: rgba(15, 23, 42, 0.5);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.preview {
  position: relative;
  width: 100%;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.06);
  max-height: 320px;
}

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

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.uploadButton {
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #5d8bff 0%, #6c6cff 100%);
  color: #fff;
  font-weight: 600;
  padding: 10px 22px;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease;
  box-shadow: 0 14px 34px rgba(102, 126, 234, 0.32);
}

.uploadButton:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 38px rgba(102, 126, 234, 0.38);
}

.removeButton {
  border: none;
  background: transparent;
  color: rgba(185, 28, 28, 0.78);
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.input {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.compactPreview {
  width: 100%;
  height: 120px;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.06);
}

.compactPreview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.badge {
  position: absolute;
  top: 18px;
  left: 18px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(95, 118, 255, 0.12);
  color: rgba(65, 86, 190, 0.88);
  font-size: 12px;
  font-weight: 600;
}

:global([data-theme="dark"]) .root {
  border-color: rgba(148, 163, 184, 0.24);
  background: rgba(30, 41, 59, 0.72);
}

:global([data-theme="dark"]) .root[data-has-image="true"] {
  border-color: rgba(59, 130, 246, 0.38);
  background: rgba(29, 78, 216, 0.16);
}

:global([data-theme="dark"]) .label {
  color: rgba(226, 232, 240, 0.96);
}

:global([data-theme="dark"]) .description,
:global([data-theme="dark"]) .hint {
  color: rgba(148, 163, 184, 0.72);
}

:global([data-theme="dark"]) .preview,
:global([data-theme="dark"]) .compactPreview {
  background: rgba(15, 23, 42, 0.52);
}

:global([data-theme="dark"]) .uploadButton {
  background: rgba(59, 130, 246, 0.12);
  color: rgba(191, 219, 254, 0.92);
  border-color: rgba(59, 130, 246, 0.32);
}

:global([data-theme="dark"]) .uploadButton:hover {
  background: rgba(59, 130, 246, 0.22);
}
