/* Отправка изображения: выбор файла и его превью.
   Шрифт, тема и компоненты — в /shared/styles.css. */

/* Поле выбора файла (shadcn: rounded-md border border-dashed p-6) */
.dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 28px 16px;
  border: 1px dashed var(--input);
  border-radius: calc(var(--radius) - 2px);
  background: color-mix(in oklch, var(--input) 40%, transparent);
  color: var(--muted-foreground);
  text-align: center;
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}
.dropzone.hidden { display: none; }
.dropzone .icon { font-size: 24px; }
.dropzone .dz-text { font-size: 13px; line-height: 18px; }
.dropzone .dz-text b { color: var(--foreground); font-weight: 500; }
.dropzone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
@media (hover: hover) {
  .dropzone:hover { border-color: color-mix(in oklch, var(--primary) 50%, var(--input)); }
}

/* Выбранный файл: миниатюра, имя, кнопки заменить и открепить */
.preview {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 2px);
  background: var(--secondary);
}
.preview.show { display: flex; }
.preview .thumb {
  position: relative;
  flex: none;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 4px);
  background: none;
  cursor: zoom-in;
  overflow: hidden;
}
.preview .thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.preview .thumb .zoom-hint {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 16px;
  background: rgb(0 0 0 / 0.4);
  opacity: 0;
  transition: opacity .15s ease;
}
@media (hover: hover) { .preview .thumb:hover .zoom-hint { opacity: 1; } }
.preview .name {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  color: var(--secondary-foreground);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.preview .actions { display: flex; gap: 2px; flex: none; }
