/* Shared editor for Quran and Nasheed playlist membership. */
.playlist-track-picker.playlist-editor {
  width: min(640px, calc(100vw - 32px));
  max-height: min(840px, calc(100dvh - 40px));
  padding: 26px;
  gap: 18px;
  overflow: hidden;
  border: 1px solid rgba(var(--orn-gold,229,186,115),.18);
  border-radius: 26px;
  background: radial-gradient(ellipse at top left, rgba(var(--orn-gold,229,186,115),.055), transparent 55%), var(--nbk-surface-low,#111310);
  box-shadow: 0 32px 100px rgba(0,0,0,.65);
  color-scheme: dark;
}
.playlist-track-picker.playlist-editor::backdrop {
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(12px);
}
.playlist-editor .playlist-picker-heading h2 { font-size: 1.5rem; }
.playlist-editor .playlist-picker-heading p { margin-top: 7px; color: #b5a484; }
.playlist-editor .playlist-picker-close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.05);
  color: #b9b9af;
}
.playlist-editor .playlist-picker-search { flex-shrink: 0; }
.playlist-editor .playlist-picker-search input {
  min-height: 48px;
  padding: 0 16px;
  background: rgba(255,255,255,.035);
  border-color: rgba(255,255,255,.09);
  border-radius: 14px;
  font-size: .85rem;
}
.playlist-editor .playlist-picker-help {
  margin: 0;
  color: #92968c;
  font-size: .72rem;
  line-height: 1.7;
}
.playlist-editor .playlist-picker-filters select {
  appearance: none;
  padding: 10px 24px 10px 12px;
  border-color: rgba(255,255,255,.1);
  border-radius: 12px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='m3 4 3 3 3-3' fill='none' stroke='%23b5a484' stroke-width='1.5'/%3E%3C/svg%3E") right 9px center / 12px no-repeat, var(--nbk-surface-high,#1a1d18);
}
.playlist-editor .playlist-picker-selection { gap: 8px; }
.playlist-editor .playlist-picker-selection > span { color: #a4a89b; }
.playlist-editor .playlist-picker-selection button {
  min-height: 32px;
  padding: 5px 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #cbb68e;
  font-size: .65rem;
}
.playlist-editor .playlist-picker-selection button:hover:not(:disabled) { background: rgba(var(--orn-gold,229,186,115),.08); }
.playlist-editor .playlist-picker-list {
  display: grid;
  grid-template-columns: minmax(0,1fr);
  align-content: start;
  flex: 1 1 auto;
  min-height: 90px;
  gap: 6px;
  overflow-y: auto;
  padding: 2px 8px 2px 2px;
  scrollbar-width: thin;
  scrollbar-color: #57513f transparent;
  scrollbar-gutter: stable;
}
.playlist-editor .playlist-picker-list::-webkit-scrollbar { width: 6px; }
.playlist-editor .playlist-picker-list::-webkit-scrollbar-track { background: transparent; }
.playlist-editor .playlist-picker-list::-webkit-scrollbar-thumb { background: #57513f; border-radius: 99px; }
.playlist-editor .playlist-picker-option {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 12px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: rgba(255,255,255,.018);
  color: #dddccf;
  font-weight: 400;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.playlist-editor .playlist-picker-option:hover { background: rgba(255,255,255,.045); }
.playlist-editor .playlist-picker-option.is-selected {
  border-color: rgba(var(--orn-gold,229,186,115),.2);
  background: rgba(var(--orn-gold,229,186,115),.065);
}
.playlist-editor .playlist-picker-option input {
  appearance: none;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin: 0;
  border: 1px solid #636656;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}
.playlist-editor .playlist-picker-option input:checked { border-color: var(--primary-color,#e5ba73); background: var(--primary-color,#e5ba73); }
.playlist-editor .playlist-picker-option input:checked::after {
  content: '';
  width: 5px;
  height: 9px;
  margin-top: -2px;
  border: solid #242416;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.playlist-editor .playlist-picker-track { flex: 1; min-width: 0; font-size: .8rem; line-height: 1.5; }
.playlist-editor .playlist-picker-track small { display: block; margin-top: 4px; color: #959b8b; font-size: .65rem; font-weight: 400; }
.playlist-editor .playlist-picker-option::after { flex: none; font-size: .6rem; color: #a9b797; }
.playlist-editor .playlist-picker-option[data-existing="true"]:has(input:checked)::after { content: 'In Playlist'; }
.playlist-editor .playlist-picker-option[data-existing="true"]:has(input:not(:checked))::after { content: 'Wird entfernt'; color: #d8a18d; }
.playlist-editor .playlist-picker-option[data-existing="false"]:has(input:checked)::after { content: 'Neu'; color: var(--primary-color,#e5ba73); }
.playlist-editor .playlist-picker-feedback { min-height: 0; margin: 0; line-height: 1.6; }
.playlist-editor .playlist-picker-feedback:empty { display: none; }
.playlist-editor .playlist-picker-actions {
  flex-shrink: 0;
  gap: 10px;
  padding-top: 18px;
  border-top-color: rgba(255,255,255,.07);
}
.playlist-editor .playlist-picker-actions button { min-height: 44px; border-radius: 12px; padding: 10px 16px; }
.playlist-editor .playlist-picker-actions .playlist-picker-add { background: var(--primary-color,#e5ba73); color: #201a0d; font-weight: 500; }
.playlist-editor .playlist-picker-actions .playlist-picker-add:disabled { opacity: .35; }
.playlist-editor :is(button, input, select):focus-visible { outline: 2px solid var(--primary-color,#e5ba73); outline-offset: 3px; }
@media (max-width: 520px) {
  .playlist-track-picker.playlist-editor { width: calc(100vw - 20px); max-height: calc(100dvh - 20px); padding: 18px; gap: 12px; border-radius: 20px; }
  .playlist-editor .playlist-picker-heading h2 { font-size: 1.25rem; }
  .playlist-editor .playlist-picker-option { gap: 10px; padding: 10px; flex-wrap: wrap; }
  .playlist-editor .playlist-picker-option::after { margin-left: 32px; }
  .playlist-editor .playlist-picker-actions { display: grid; grid-template-columns: auto minmax(0,1fr); }
  .playlist-editor .playlist-picker-actions button { padding: 10px; font-size: .73rem; }
}
@media (max-height: 600px) {
  .playlist-track-picker.playlist-editor { gap: 10px; padding: 16px; }
  .playlist-editor .playlist-picker-help { display: none; }
}
