/* ══════════════════════════════════════
   sidebar.css — Component Library
   Big Band Space Planner
══════════════════════════════════════ */

#component-library { grid-area: library; }

.sidebar-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 6px 0 16px;
}

/* Section */
.comp-section { margin-bottom: 4px; }

.comp-section-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px 5px;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s;
}
.comp-section-header:hover { background: var(--bg-3); }

.section-icon { font-size: 14px; flex-shrink: 0; }

.section-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  flex: 1;
}

.section-chevron {
  width: 12px; height: 12px;
  color: var(--text-3);
  transition: transform 0.2s;
}
.comp-section.collapsed .section-chevron { transform: rotate(-90deg); }

.comp-section-items {
  overflow: hidden;
  max-height: 1000px;
  transition: max-height 0.25s ease;
}
.comp-section.collapsed .comp-section-items { max-height: 0; }

/* Component Item */
.comp-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 8px 20px;
  cursor: grab;
  user-select: none;
  transition: background 0.12s;
  border-radius: 0;
  position: relative;
}
.comp-item:hover { background: var(--bg-3); }
.comp-item:active { cursor: grabbing; background: var(--bg-4); }
.comp-item.hidden-search { display: none; }

/* Color dot */
.comp-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 6px currentColor;
}

/* Icon */
.comp-emoji { font-size: 18px; flex-shrink: 0; line-height: 1; }

/* Text */
.comp-text { flex: 1; min-width: 0; }
.comp-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.comp-name-en {
  font-size: 10px;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

/* Size tag */
.comp-size {
  font-size: 10px;
  color: var(--text-3);
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 5px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Drag indicator line on left */
.comp-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px; bottom: 6px;
  width: 0;
  background: var(--accent);
  border-radius: 0 2px 2px 0;
  transition: width 0.15s;
}
.comp-item:hover::before { width: 3px; }

/* Drag ghost preview */
.drag-ghost-preview {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  border-radius: var(--radius-md);
  padding: 6px 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: white;
  box-shadow: var(--shadow-lg);
  opacity: 0.9;
  transform: translate(-50%, -50%);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.2);
}
