/* styles/entries-tabs/entries-tab-add-image-dropdown-styles.css
   SpinChoice — Entries tools "Add image" dropdown
   ✅ No focus-within tricks (prevents open/close fighting)
   ✅ Always on top
   ✅ Clicks never blocked
*/

#entriesImageDD{
  position: relative;
  display: inline-flex;

  /* Create its own stacking context so z-index always works */
  isolation: isolate;
  z-index: 9999;

  pointer-events: auto;
}

#entriesAddImageBtn{
  position: relative;
  pointer-events: auto;
}

/* menu */
#entriesImageMenu{
  position: absolute;
  top: calc(100% + 10px);
  right: 0;

  z-index: 100000; /* REALLY on top */
  min-width: 260px;
  padding: 6px;

  border-radius: 12px;
  background: rgba(2, 6, 23, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 18px 50px rgba(0,0,0,.38);

  display: none;

  pointer-events: auto;
}

/* Light theme */
html[data-theme="light"] #entriesImageMenu,
html[data-bw-theme="light"] #entriesImageMenu,
body[data-theme="light"] #entriesImageMenu{
  background: rgba(255,255,255,0.98);
  border-color: rgba(15, 23, 42, 0.12);
  box-shadow: 0 18px 50px rgba(0,0,0,.14);
}

#entriesImageDD.is-open #entriesImageMenu{ display: block; }

/* item */
#entriesImageMenu .etool-menu__item{
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;

  padding: 10px 10px;
  background: transparent;
  border: 0;

  border-radius: 10px;
  cursor: pointer;
  text-align: left;

  color: rgba(248, 250, 252, 0.92);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 500;

  white-space: nowrap;
}

html[data-theme="light"] #entriesImageMenu .etool-menu__item,
html[data-bw-theme="light"] #entriesImageMenu .etool-menu__item,
body[data-theme="light"] #entriesImageMenu .etool-menu__item{
  color: #0f172a;
}

#entriesImageMenu .etool-menu__item:hover{
  background: rgba(148, 163, 184, 0.12);
}

#entriesImageMenu .etool-menu__thumb{
  width: 28px;
  height: 28px;
  border-radius: 8px;
  object-fit: cover;
  flex: 0 0 28px;
  border: 1px solid rgba(148, 163, 184, 0.22);
}
