/* ============================================================================
   dictdrop.css - the "Dictionary" drop box at the top left of the workspace.
   File: game/static/game/css/dictdrop.css

   HOW TO EDIT
   1. Section 1: size, position and colors.
   2. Section 2: how it changes while you drag (it lights up, then grows when
      an element is over it).
   ============================================================================ */


/* ---------- 1. THE BOX ---------- */
:root {
  --dictdrop-top: 12px;                  /* distance from the top-left corner of the workspace */
  --dictdrop-left: 12px;
  --dictdrop-bg: var(--sidebar-bg, #ffffff);
  --dictdrop-border: var(--pill-border, #e4e4e7);
  --dictdrop-text: var(--text-muted, #71717a);
  --dictdrop-active: var(--accent, #f97316);          /* color while dragging / hovering */
  --dictdrop-active-bg: var(--accent-light, #fff7ed);
}

.dict-drop {
  position: absolute;
  top: var(--dictdrop-top);
  left: var(--dictdrop-left);
  z-index: 20;                           /* above the elements on the workspace */
  display: flex;
  align-items: center;
  gap: calc(8px * var(--ui-scale, 1));
  padding: calc(8px * var(--ui-scale, 1)) calc(14px * var(--ui-scale, 1));
  border: 2px dashed var(--dictdrop-border);
  border-radius: 14px;
  background: var(--dictdrop-bg);
  color: var(--dictdrop-text);
  font-size: calc(13px * var(--ui-scale, 1));
  font-weight: 600;
  line-height: 1.25;
  pointer-events: none;                  /* never gets in the way of dragging */
  user-select: none;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.dict-drop img {
  width: calc(26px * var(--ui-scale, 1));
  height: calc(26px * var(--ui-scale, 1));
  display: block;
}
html[data-theme="dark"] .dict-drop img { filter: invert(1) brightness(1.1); }
.dict-drop small {
  display: block;
  font-size: 0.85em;
  font-weight: 400;
  opacity: 0.8;
}


/* ---------- 2. WHILE DRAGGING ---------- */
.dict-drop.is-armed {                    /* an element is being dragged: show where to drop it */
  border-color: var(--dictdrop-active);
  color: var(--dictdrop-active);
  animation: dict-drop-pulse 1.1s ease-in-out infinite;
}
.dict-drop.is-over {                     /* the element is right over the box: let go to open */
  animation: none;
  transform: scale(1.08);
  border-style: solid;
  background: var(--dictdrop-active-bg);
  box-shadow: 0 0 0 4px var(--accent-glow, rgba(249, 115, 22, 0.35));
}
@keyframes dict-drop-pulse {
  0%, 100% { box-shadow: 0 0 0 0 transparent; }
  50%      { box-shadow: 0 0 0 5px var(--accent-glow, rgba(249, 115, 22, 0.35)); }
}
@media (prefers-reduced-motion: reduce) {
  .dict-drop.is-armed { animation: none; }
}
