/* ============================================================
   product_image_dropzone.css
   Drag-and-drop file widget for the add_product_form page.
   Scoped to .dropzone* class names to avoid collisions.
   ============================================================ */

.dropzone {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  padding: 1.5rem;
  border: 2px dashed #9aa3ad;
  border-radius: 8px;
  background: #fafbfc;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease;
}

.dropzone:hover,
.dropzone:focus-visible {
  border-color: #5b6b7d;
  background: #f1f4f7;
  outline: none;
}

/* Active state while a file is being dragged over the zone */
.dropzone.is-dragover {
  border-color: #2b7cff;
  background: #eaf2ff;
}

/* Once a file is attached, soften the styling and switch from
   dashed-prompt to solid-resting appearance. */
.dropzone.has-file {
  cursor: default;
  border-style: solid;
  border-color: #c9cfd6;
  background: #fff;
}

/* ---------- Prompt (shown when no file is selected) ---------- */

.dropzone__prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: #5b6b7d;
  text-align: center;
  pointer-events: none; /* clicks pass through to the zone itself */
}

.dropzone__icon {
  color: #7a8593;
}

.dropzone__text strong {
  display: block;
  font-size: 1rem;
  color: #2c3540;
}

.dropzone__text span {
  font-size: 0.875rem;
}

/* ---------- Preview (shown after a file is selected) ---------- */

.dropzone__preview {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
}

.dropzone__thumb {
  max-width: 120px;
  max-height: 120px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid #e1e5ea;
}

.dropzone__meta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.dropzone__filename {
  font-weight: 600;
  color: #2c3540;
  word-break: break-all;
}

.dropzone__clear {
  align-self: flex-start;
  background: none;
  border: none;
  color: #c0392b;
  cursor: pointer;
  padding: 0;
  font-size: 0.875rem;
  text-decoration: underline;
}

.dropzone__clear:hover {
  color: #962d22;
}
