/* lib/library-switcher.css — unified song source picker styling.
 *
 * Drop-in styles for window.SWR_LIBRARY_SWITCHER.render(target). Uses
 * the engine's existing CSS variables so the picker blends into any page
 * that already loads the engine stylesheet.
 */

.lsw-root {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 11px;
  line-height: 1.4;
  color: var(--ink, #fff);
  user-select: none;
}

.lsw-panel {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(10, 0, 8, 0.85);
  border: 1px solid var(--line, #330022);
  border-radius: 4px;
  padding: 8px;
  min-width: 280px;
  max-width: 360px;
}

.lsw-tabs {
  display: flex;
  gap: 2px;
  flex-wrap: wrap;
}

.lsw-tab {
  flex: 1 1 auto;
  min-width: 60px;
  padding: 4px 8px;
  font: inherit;
  font-size: 9px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  background: transparent;
  border: 1px solid var(--line, #330022);
  border-radius: 3px;
  color: var(--muted, #ff44aa);
  cursor: pointer;
  transition: all 0.15s ease;
}

.lsw-tab:hover {
  border-color: var(--accent-2, #00ccff);
  color: var(--ink, #fff);
}

.lsw-tab.active {
  background: var(--accent-2, #00ccff);
  border-color: var(--accent-2, #00ccff);
  color: #000;
  font-weight: 700;
}

.lsw-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 280px;
  overflow-y: auto;
}

.lsw-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  border-radius: 3px;
}

.lsw-row:hover {
  background: rgba(0, 240, 255, 0.06);
  border-color: var(--line, #330022);
}

.lsw-thumb {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  background: var(--panel-2, #1f0010);
  border-radius: 3px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lsw-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lsw-thumb-fallback {
  font-size: 14px;
  font-weight: 700;
  color: var(--muted, #ff44aa);
}

.lsw-meta {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.lsw-title {
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--ink, #fff);
}

.lsw-sub {
  font-size: 9px;
  color: var(--muted, #ff44aa);
  opacity: 0.8;
  letter-spacing: 0.04em;
}

.lsw-pick {
  flex: 0 0 auto;
  font: inherit;
  font-size: 9px;
  letter-spacing: 0.12em;
  padding: 4px 10px;
  background: transparent;
  border: 1px solid var(--accent, #ff0066);
  border-radius: 3px;
  color: var(--accent, #ff0066);
  cursor: pointer;
  transition: all 0.15s ease;
}

.lsw-pick:hover {
  background: var(--accent, #ff0066);
  color: #000;
}

.lsw-pick:disabled {
  opacity: 0.5;
  cursor: default;
}

.lsw-empty {
  padding: 24px 8px;
  text-align: center;
  font-size: 10px;
  color: var(--muted, #ff44aa);
  opacity: 0.7;
  font-style: italic;
}