/* The playlist picker (sheet) and picking several songs (the check on each row and the bar at the bottom). */

/* picker: header for several songs is a small fan of covers */
.pk-many .pk-stack { position: relative; width: 64px; height: 52px; flex: none; }
.pk-many .pk-stack img { position: absolute; top: 0; width: 46px; height: 46px; border-radius: 8px; box-shadow: 0 4px 12px rgba(0, 0, 0, .45); outline: 2px solid var(--s1); }
.pk-many .pk-stack img:nth-child(1) { inset-inline-start: 0; z-index: 3; }
.pk-many .pk-stack img:nth-child(2) { inset-inline-start: 9px; top: 3px; z-index: 2; opacity: .85; }
.pk-many .pk-stack img:nth-child(3) { inset-inline-start: 18px; top: 6px; z-index: 1; opacity: .65; }

.pk-cov { width: 44px; height: 44px; border-radius: 10px; flex: none; display: grid; place-items: center; overflow: hidden; background: var(--s2); }
.pk-cov img { width: 100%; height: 100%; object-fit: cover; }
.sh-item .pk-cov svg.i { color: var(--sub); }
.sh-item .pk-cov.plus { background: linear-gradient(135deg, var(--sun), #D9B8F2 60%, var(--ember)); }
.sh-item .pk-cov.plus svg.i { color: var(--sun-ink); }
.pk-it, .pk-new .sh-item { height: 60px; }
.pk-i { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.pk-i b { font-weight: 600; font-size: 15px; }
.pk-it.has { opacity: .62; }
.pk-has { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--mint); flex: none; }
.sh-item .pk-has svg.i { width: 16px; height: 16px; color: var(--mint); }

/* the new-playlist name field opens in place */
.pk-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; max-height: 0; overflow: hidden; opacity: 0; transition: max-height .25s var(--ease), opacity .2s, padding .25s; }
.pk-new.open .pk-form { max-height: 80px; opacity: 1; padding: 6px 0 10px; }
.pk-form .field { height: 46px; background: var(--s2); }
.pk-form .btn { height: 46px; padding: 0 18px; }
.pk-new { border-bottom: 1px solid var(--line); margin-bottom: 6px; padding-bottom: 4px; }
.pk-search { height: 44px; margin: 4px 0 6px; background: var(--s2); }
.pk-search svg.i { width: 18px; height: 18px; }
.pk-empty { padding: 18px 6px; text-align: center; }

/* picking songs: each row ends in a round check; the menu, remove and drag handles step aside */
.row { -webkit-touch-callout: none; }
.sel-root .row [data-menu], .sel-root .row [data-rmq], .sel-root .row .handle { display: none; }
.sel-root .row::after { content: ''; flex: none; width: 24px; height: 24px; margin-inline-end: 8px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--mute);
  transition: background-color .15s, box-shadow .15s, transform .25s var(--spring); }
.sel-root .row.sel { background: rgba(184, 166, 255, .1); }
.sel-root .row.sel::after { box-shadow: none; transform: scale(1.08);
  background: var(--sun) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231C1636' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 14px no-repeat; }

#selbar { position: fixed; z-index: 150; inset-inline: 10px; bottom: calc(var(--safe-b) + 10px); max-width: 520px; margin-inline: auto;
  padding: 8px 10px 10px; border-radius: var(--r2); background: rgba(42, 39, 56, .96); box-shadow: 0 -2px 0 var(--line), 0 14px 40px rgba(0, 0, 0, .55);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); transform: translateY(calc(100% + 24px)); transition: transform .28s var(--ease); }
#selbar.in { transform: none; }
#selbar .sb-top { display: flex; align-items: center; gap: 6px; min-height: 40px; }
#selbar .sb-n { flex: 1; font-weight: 600; font-size: 15px; }
#selbar .sb-all { color: var(--sun); font-weight: 500; font-size: 14px; padding: 8px 10px; border-radius: 99px; }
#selbar .sb-all:hover { background: rgba(255, 255, 255, .06); }
#selbar .sb-act { display: grid; grid-template-columns: 1fr 1.3fr; gap: 8px; margin-top: 6px; }
#selbar .btn { height: 44px; padding: 0 12px; font-size: 14px; min-width: 0; }
#selbar .btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#selbar .btn svg.i { width: 18px; height: 18px; flex: none; }
body.selecting #toast { bottom: calc(var(--safe-b) + 128px); }
@media (min-width: 960px) { #selbar { bottom: 24px; } }

/* the queue heading carries the Select button */
.q-head { display: flex; align-items: center; gap: 10px; margin: 6px 0 4px; }
.q-head h3 { flex: 1; min-width: 0; }
.q-head .btn svg.i { width: 16px; height: 16px; }
