/* app/app.css — Customização visual do app (o único CSS que o fork edita)
   Regra: cores SEMPRE via tokens (--wd-*). O accent do app é definido aqui. */

/* Accent deste app (Music = verde #00CC00) */
:root {
  --wd-accent: #00CC00;
  --wd-accent-hover: #33D633;
}

/* ============ Sidebar: setlists ============ */
.folder-row { display: flex; align-items: center; gap: 2px; }
.folder-row .nav-item { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; }
.folder-row .nav-item .name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nav-item .count {
  margin-left: auto;
  font-size: 10px;
  font-weight: 600;
  color: var(--wd-text-2);
  background: var(--wd-accent-tint-10);
  padding: 1px 7px;
  border-radius: var(--wd-r-full);
  flex: none;
}
.folder-actions {
  display: none;
  gap: 2px;
  flex: none;
}
.folder-row:hover .folder-actions,
.folder-row:focus-within .folder-actions { display: flex; }
.folder-actions .btn-icon { width: 24px; height: 24px; }

/* ============ Conteúdo: setlist ativa ============ */
.playlist-wrap {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 18px 22px 26px;
}
.pl-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 14px;
}
.pl-title {
  font-family: var(--wd-display);
  font-size: 22px;
  font-weight: 700;
  cursor: text;
  border-bottom: 1px dashed transparent;
}
.pl-title:hover { border-bottom-color: var(--wd-rule); }
.pl-count {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--wd-text-2);
}

/* ============ Lista de músicas ============ */
.song-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 860px;
}
.song {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--wd-surface);
  border: 1px solid var(--wd-rule-dark);
  border-radius: var(--wd-r-lg);
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}
.song:active { cursor: grabbing; }
.song-idx {
  flex: none;
  width: 22px;
  font-family: var(--wd-display);
  font-size: 11px;
  font-weight: 700;
  color: var(--wd-text-2);
  text-align: right;
}
.song-main { flex: 1; min-width: 0; }
.song-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.song-artists {
  font-size: 12px;
  color: var(--wd-text-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.song-prompt {
  font-size: 10px;
  color: var(--wd-text-2);
  opacity: .75;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Embed do Spotify: SEMPRE oculto — só existe como motor de áudio pro
   player bar/botão Tocar. NUNCA renderizar visível (quebra o layout).
   O SpotifyIframeApi injeta width/height INLINE quando o play começa —
   por isso !important + wrapper de clip (1x1, overflow hidden). */
.song-embed-wrap {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  border: 0 !important;
}
.song-embed {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
  border: 0 !important;
}
.song-actions {
  display: flex;
  gap: 2px;
  flex: none;
  opacity: 0;
  transition: opacity .12s ease;
}
.song:hover .song-actions,
.song:focus-within .song-actions { opacity: 1; }

/* card de nova música (input permanente) */
.song-new {
  cursor: default;
  background: transparent;
  border: 1px dashed var(--wd-rule);
}
.song-input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  color: var(--wd-text-1);
  font: inherit;
  font-size: 13px;
  outline: none;
  user-select: text;
  -webkit-user-select: text;
}
.song-input::placeholder { color: var(--wd-text-2); }

/* ============ Ações da setlist ============ */
.pl-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  max-width: 860px;
  flex-wrap: wrap;
}
.pdf-placeholder {
  margin-left: auto;
  padding: 8px 14px;
  border: 1px dashed var(--wd-rule);
  border-radius: var(--wd-r-md);
  text-align: right;
}
.pdf-title {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-end;
  font-size: 12px;
  font-weight: 600;
  color: var(--wd-text-1);
}
.pdf-title .wd-ico, .pdf-title svg { width: 14px; height: 14px; }
.pdf-desc {
  font-size: 10px;
  color: var(--wd-text-2);
  margin-top: 2px;
}

/* ============ Empty state ============ */
.empty-state {
  max-width: 420px;
  margin: 12vh auto 0;
  text-align: center;
}
.empty-state h2 {
  font-family: var(--wd-display);
  font-size: 20px;
  margin-bottom: 8px;
}
.empty-state p {
  color: var(--wd-text-2);
  font-size: 13px;
  margin-bottom: 18px;
}

/* ============ Player bar ============ */
.player-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  background: var(--wd-surface);
  border-top: 1px solid var(--wd-rule-dark);
}
.player-info {
  min-width: 0;
  flex: 1;
  margin-left: 6px;
}
.player-title {
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.player-progress {
  flex: none;
  width: 180px;
  height: 4px;
  border-radius: var(--wd-r-full);
  background: var(--wd-rule);
  overflow: hidden;
}
.player-progress-fill {
  height: 100%;
  width: 0;
  background: var(--wd-accent);
  transition: width .25s linear;
}

/* ============ Modal bulk ============ */
.bulk-input {
  width: 100%;
  min-height: 150px;
  resize: vertical;
  background: var(--wd-surface-2);
  color: var(--wd-text-1);
  border: 1px solid var(--wd-rule);
  border-radius: var(--wd-r-md);
  padding: 10px 12px;
  font: inherit;
  font-size: 13px;
  margin: 4px 0 12px;
}

/* ============ Branding ============ */
.branding {
  display: flex;
  justify-content: flex-end;
  padding: 10px 22px 16px;
}
.branding img { height: 18px; opacity: .7; }

/* ============ Mobile ============ */
@media (max-width: 860px) {
  .folder-actions { display: flex; }
  .song-actions { opacity: 1; }
  .playlist-wrap { padding: 14px 12px 90px; }
  .pl-title { font-size: 18px; }
  .player-progress { width: 90px; }
  .pdf-placeholder { margin-left: 0; text-align: left; }
  .pdf-title { justify-content: flex-start; }
}
