/* Universal Clipboard — sidebar section.
   Image+prompt scratch surface with drag-in / drag-out across modules. */

#lx-clipboard {
  font-family: inherit;
  color: var(--text);
  margin-top: 4px;
  flex: 0 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

#lx-clipboard[hidden] { display: none; }

/* Collapsed pill — spans full sidebar width, sidebar-row-shaped.
   Idle state is flat (transparent bg + transparent border) so it sits
   visually with the other nav-items instead of looking permanently
   raised. Hover gives the same subtle surface lift the rest of the
   sidebar uses. */
.lx-clip-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.12s, border-color 0.12s;
}
.lx-clip-pill > span:not(.lx-clip-pill-count) {
  flex: 1;
  text-align: left;
}
.lx-clip-pill:hover {
  background: rgba(255, 255, 255, 0.025);
}
.lx-clip-pill .icon { width: 14px; height: 14px; color: var(--accent); }
.lx-clip-pill-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--surface-elevated);
  color: var(--text);
  font-size: 11px;
  font-weight: 600;
}

.lx-clip-pill.is-dragover {
  border-color: var(--accent);
  background: linear-gradient(180deg, #232017 0%, #1d1a13 100%);
}

/* Expanded panel — block-flow inside sidebar. Shrinks if the sidebar
   runs out of vertical room so Logout stays reachable. */
.lx-clip-panel {
  width: 100%;
  max-height: 280px;
  min-height: 0;
  flex: 0 1 auto;
  display: flex;
  flex-direction: column;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.lx-clip-panel.is-dragover {
  border-color: var(--accent);
}

.lx-clip-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid #232323;
  user-select: none;
}
.lx-clip-head .icon { width: 14px; height: 14px; color: var(--accent); }
.lx-clip-title {
  flex: 1;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.lx-clip-count {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}
.lx-clip-iconbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.lx-clip-iconbtn:hover { background: var(--surface-elevated); color: var(--text); }
.lx-clip-iconbtn .icon { width: 14px; height: 14px; }

.lx-clip-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lx-clip-row {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 6px;
  align-items: stretch;
  padding: 5px;
  background: #161616;
  border: 1px solid #232323;
  border-radius: 8px;
  transition: background 0.12s, border-color 0.12s;
}
.lx-clip-row:hover { background: #1a1a1a; border-color: #2c2c2c; }
.lx-clip-row[data-prompt-only] {
  grid-template-columns: 1fr auto;
}

/* Image and prompt are independent drag sources — each gets its own grab
   cursor and a subtle border so the user sees they're separate. A vertical
   divider replaces the gap visually when both sections are present. */
.lx-clip-row-thumb {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  border: 1px solid #2a2a2a;
  background: #0d0d0d center / cover no-repeat;
  cursor: grab;
  transition: border-color 0.12s, transform 0.12s;
}
.lx-clip-row-thumb:hover { border-color: #3a3a3a; }
.lx-clip-row-thumb:active { cursor: grabbing; transform: scale(0.97); }

.lx-clip-row-text {
  min-width: 0;
  padding: 4px 6px;
  font-size: 11.5px;
  line-height: 1.3;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: grab;
  transition: background 0.12s, border-color 0.12s;
}
.lx-clip-row-text:hover { background: #1f1f1f; border-color: #2c2c2c; }
.lx-clip-row-text:active { cursor: grabbing; }
.lx-clip-row-text.is-empty { cursor: default; }
.lx-clip-row-text.is-empty:hover { background: transparent; border-color: transparent; }
.lx-clip-row-text.is-empty {
  color: var(--text-dim);
  font-style: italic;
}

.lx-clip-row-del {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--text-dim);
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.lx-clip-row-del:hover { background: #2a1f1f; color: #f5a8a8; }
.lx-clip-row-del .icon { width: 12px; height: 12px; }

.lx-clip-empty {
  padding: 24px 12px;
  text-align: center;
  font-size: 12px;
  color: var(--text-dim);
}

/* Visual feedback when a tray entry is being dragged toward a valid drop target */
.lx-clip-droptarget {
  outline: 1px dashed var(--accent);
  outline-offset: 2px;
}
