/* Очередь, меню трека «⋯», поиск и быстрый поиск (Ctrl+K) */

/* Кнопка «⋯» в строке трека */
.more { background: none; border: 0; color: var(--muted); font-size: 18px; line-height: 1; padding: 2px 6px; border-radius: 8px; vertical-align: middle; }
.more:hover { color: var(--text); background: var(--hover); }
.row .more { visibility: hidden; }
.row:hover .more { visibility: visible; }

/* Всплывающее меню трека */
.track-menu {
  position: fixed; z-index: 30; width: 240px; padding: 6px; border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 94%, transparent); border: 1px solid rgba(255, 255, 255, .1);
  backdrop-filter: blur(20px); box-shadow: 0 18px 50px rgba(0, 0, 0, .55);
}
.track-menu .tm-head { padding: 8px 10px 6px; font-weight: 700; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track-menu .tm-head span { display: block; color: var(--muted); font-weight: 400; font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.track-menu button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 8px 10px; border-radius: 9px; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track-menu button:hover { background: var(--hover); }
.track-menu hr { border: 0; border-top: 1px solid rgba(255, 255, 255, .08); margin: 4px 6px; }

/* Панель очереди */
#queue-list h4 { display: flex; align-items: center; justify-content: space-between; margin: 18px 0 6px; font-size: 13px; color: var(--muted); font-weight: 700; text-transform: none; }
#queue-list h4:first-child { margin-top: 12px; }
#queue-list ol { list-style: none; margin: 0; padding: 0; }
.q-item { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 10px; cursor: pointer; }
.q-item:hover { background: var(--hover); }
.q-item .cover { width: 40px; height: 40px; border-radius: 8px; }
.q-item .cover svg { width: 18px; height: 18px; }
.q-text { flex: 1; min-width: 0; }
.q-text b, .q-text span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-text b { color: var(--text); font-weight: 600; font-size: 14px; }
.q-text span { color: var(--muted); font-size: 12px; }
.q-item.cur b { color: var(--accent); }
.q-item.user .q-text b::before { content: "● "; color: var(--accent); font-size: 10px; vertical-align: 2px; }
.q-item[draggable] { cursor: grab; }
.q-item .q-del { visibility: hidden; width: 28px; height: 28px; font-size: 12px; }
.q-item:hover .q-del { visibility: visible; }
.q-item.dragging { opacity: .4; }
.q-item.drop-before { box-shadow: inset 0 2px 0 var(--accent); }
.q-item.drop-after { box-shadow: inset 0 -2px 0 var(--accent); }

/* Поиск */
.search-box input { padding-top: 14px; padding-bottom: 14px; }
.search-top { display: grid; grid-template-columns: minmax(260px, 380px) 1fr; gap: 24px; margin-bottom: 28px; align-items: start; }
.best { position: relative; padding: 20px; border-radius: 20px; cursor: pointer; background: var(--panel-2); border: 1px solid rgba(255, 255, 255, .05); transition: background .2s; }
.best:hover { background: var(--hover); }
.best .cover { width: 96px; height: 96px; border-radius: 12px; margin-bottom: 16px; box-shadow: 0 10px 28px rgba(0, 0, 0, .45); }
.best .cover.round { border-radius: 50%; }
.best-title { font-family: var(--display); font-size: 28px; font-weight: 900; letter-spacing: -.03em; line-height: 1.1; margin-bottom: 6px; overflow: hidden; text-overflow: ellipsis; }
.best .sub { color: var(--muted); font-size: 13px; }
.best .fab { position: absolute; right: 18px; bottom: 18px; opacity: 0; transform: translateY(8px); transition: .2s; width: 52px; height: 52px; }
.best:hover .fab { opacity: 1; transform: none; }
.search-top .tracks th { display: none; }
.row-grid { grid-auto-flow: column; grid-auto-columns: minmax(160px, 1fr); grid-template-columns: none; overflow-x: auto; padding-bottom: 8px; margin-bottom: 24px; scrollbar-width: thin; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.chip { border: 1px solid var(--line); background: var(--field); border-radius: 999px; padding: 6px 14px; font-size: 13px; }
.chip:hover { border-color: var(--accent); }
.chip.ghost { background: none; color: var(--muted); }
kbd { display: inline-block; min-width: 20px; padding: 1px 6px; border-radius: 6px; border: 1px solid var(--line); background: var(--field); font: 600 11px/1.6 inherit; text-align: center; color: var(--text); margin: 0 1px; }

/* Быстрый поиск — палитра команд */
.palette { width: min(640px, calc(100vw - 24px)); padding: 14px; margin-top: 12vh; }
.palette .search-box input { background: var(--field); }
.pal-list { list-style: none; margin: 10px 0 0; padding: 0; max-height: min(52vh, 460px); overflow-y: auto; }
.pal-group { padding: 10px 10px 4px; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); }
.pal-item { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 10px; cursor: pointer; }
.pal-item.on { background: color-mix(in srgb, var(--accent) 18%, transparent); }
.pal-item .cover { width: 36px; height: 36px; border-radius: 8px; font-weight: 800; color: var(--muted); }
.pal-item .cover.round { border-radius: 50%; }
.pal-item .cover svg { width: 16px; height: 16px; }
.pal-ico { font-size: 16px; }
.pal-text { flex: 1; min-width: 0; }
.pal-text b, .pal-text span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pal-text b { font-weight: 600; }
.pal-text span { font-size: 12px; color: var(--muted); }
.pal-hint { display: flex; flex-wrap: wrap; gap: 14px; padding: 10px 6px 0; margin-top: 8px; border-top: 1px solid rgba(255, 255, 255, .07); font-size: 11px; color: var(--muted); }

@media (max-width: 800px) {
  .search-top { grid-template-columns: 1fr; }
  .row .more { visibility: visible; }
  .q-item .q-del { visibility: visible; }
  .pal-hint { display: none; }
  .palette { margin-top: 4vh; }
}
