/* =========================================================
   SHARED FILE DROPZONE

   Extracted from the EMC "Optional renaming guidance" mapping-hints
   popover (Styles/modes/genebean/expression_matrix_canonicalization/
   emc_mapping_hints.css), which remains untouched and still owns its own
   copy of these rules. This is the same visual pattern (dashed box, teal
   hover/active states, [data-dragover] as the active-drag hook) factored
   out as generic classes for any future drop zone.

   Pair with Scripts/shared/file_dropzone.js's bindFileDropZone(), which
   toggles [data-dragover="true"] on the .zom-dropzone element during a
   drag — nothing here depends on that script, but the attribute selector
   only ever gets set by it.

   Colors are CSS custom properties so a consumer in a different visual
   context (e.g. a dark dialog) can override them on its own container
   instead of forking this file. Defaults below match the light-theme
   look this pattern originated with.
========================================================= */

.zom-dropzone {
  --zom-dropzone-border: #b9c8e3;
  --zom-dropzone-border-active: rgb(84, 180, 151);
  --zom-dropzone-bg: #f1f5fc;
  --zom-dropzone-bg-hover: rgba(84, 180, 151, .08);
  --zom-dropzone-bg-active: rgba(84, 180, 151, .14);
  --zom-dropzone-color: #4f5f7e;
  --zom-dropzone-color-active: #287963;

  position: relative;

  display: grid;
  justify-items: center;
  gap: 6px;

  padding: 16px 12px;

  border: 1.5px dashed var(--zom-dropzone-border);
  border-radius: 10px;

  background: var(--zom-dropzone-bg);
  color: var(--zom-dropzone-color);

  font-size: .76rem;
  text-align: center;

  cursor: pointer;

  transition:
    border-color .15s ease,
    background-color .15s ease;
}

.zom-dropzone svg {
  width: 20px;
  height: 20px;
  color: currentColor;
  opacity: .78;
}

.zom-dropzone:hover,
.zom-dropzone:focus-visible {
  border-color: var(--zom-dropzone-border-active);
  background: var(--zom-dropzone-bg-hover);
}

.zom-dropzone:focus-visible {
  outline: 3px solid rgba(91, 112, 179, .32);
  outline-offset: 2px;
}

.zom-dropzone[data-dragover="true"] {
  border-color: var(--zom-dropzone-border-active);
  background: var(--zom-dropzone-bg-active);
  color: var(--zom-dropzone-color-active);
}

.zom-dropzone__filename {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  padding: 2px 8px;

  border-radius: 999px;

  color: var(--zom-dropzone-color-active);

  font-size: .7rem;
  font-weight: 750;
}

/* Visually hidden but still focusable/functional - matches the
   established accessible-hiding pattern (clip, not display:none). */
.zom-dropzone__hidden-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
