/* ── Spotify panel (pre-workout mode picker + selection) ─── */
.spotify-panel {
  margin: 8px 16px; padding: 12px 14px;
  background: var(--surface, #1a1a1a); border: 1px solid var(--border, #2a2a2a);
  border-radius: 10px;
}
.spotify-panel-head {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 8px 10px;
  margin-bottom: 10px;
}
.spotify-panel-title { order: 1; }
.spotify-panel-collapse-btn { order: 2; margin-left: auto; }
/* Pills drop onto their own full-width row so they never fight the title
   or collapse button for space — fixes awkward wrapping when the Coach
   pill is present (FireDrops) and all five modes are shown. */
.spotify-mode-pills { order: 3; flex-basis: 100%; }
/* Collapsed: hide everything except the title + collapse chevron */
.spotify-panel--collapsed .spotify-panel-head { margin-bottom: 0; }
.spotify-panel--collapsed .spotify-state { display: none !important; }
.spotify-panel--collapsed .spotify-mode-pills { display: none !important; }
.spotify-panel-collapse-btn {
  background: transparent; border: none;
  color: var(--muted, #999); cursor: pointer;
  padding: 4px 6px; border-radius: 5px;
  display: flex; align-items: center; justify-content: center;
  transition: color 0.15s, transform 0.2s;
  flex-shrink: 0;
}
.spotify-panel-collapse-btn:hover { color: var(--text, #f5f5f5); }
.spotify-panel--collapsed .spotify-panel-collapse-btn { transform: rotate(-90deg); }
.spotify-panel-title {
  display: flex; align-items: center; gap: 7px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 13px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--text, #f5f5f5);
}
.spotify-mode-pills {
  display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-start;
  background: var(--surface3, #0f0f0f);
  border-radius: 7px; padding: 2px;
}
.spotify-mode-pill {
  display: inline-flex; align-items: center; gap: 5px;
  background: transparent; border: none; color: var(--muted, #999);
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 11px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 9px; border-radius: 5px; cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.spotify-mode-pill svg { flex-shrink: 0; display: block; }
.spotify-mode-pill--active {
  background: var(--accent, var(--red, #ff2a2a));
  color: #fff;
}
.spotify-connect-btn {
  width: 100%; padding: 11px 14px;
  background: #1DB954; border: none; border-radius: 7px;
  color: #fff; font-family: 'Barlow Condensed', sans-serif;
  font-size: 13px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer; transition: opacity 0.15s;
}
.spotify-connect-btn:hover { opacity: 0.9; }
.spotify-hint {
  font-size: 11px; color: var(--muted, #999);
  margin-top: 8px; line-height: 1.4;
}
.spotify-search-row { margin-top: 4px; }
.spotify-search-input {
  width: 100%; padding: 9px 11px;
  background: var(--surface3, #0f0f0f); border: 1px solid var(--border, #2a2a2a);
  border-radius: 6px; color: var(--text, #f5f5f5); font-size: 13px;
  font-family: 'Barlow', sans-serif;
  box-sizing: border-box;
}
.spotify-search-input:focus { outline: none; border-color: var(--accent, var(--red, #ff2a2a)); }
.spotify-search-results {
  display: flex; flex-direction: column; gap: 4px;
  margin-top: 6px; max-height: 220px; overflow-y: auto;
}
.spotify-result {
  display: flex; align-items: center; gap: 9px;
  padding: 6px 8px; background: var(--surface3, #0f0f0f);
  border-radius: 6px; cursor: pointer; transition: background 0.15s;
}
.spotify-result:hover { background: var(--card, #1a1a1a); }
.spotify-result-img {
  width: 32px; height: 32px; border-radius: 3px;
  flex-shrink: 0; background: #222; object-fit: cover;
}
.spotify-result-meta { flex: 1; min-width: 0; }
.spotify-result-name {
  font-size: 13px; color: var(--text, #f5f5f5); font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.spotify-result-sub {
  font-size: 11px; color: var(--muted, #999);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.spotify-result-kind {
  font-size: 9px; color: var(--muted, #999); text-transform: uppercase;
  letter-spacing: 0.08em; font-family: 'Barlow Condensed', sans-serif; font-weight: 700;
}
.spotify-selected-card {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; background: var(--surface3, #0f0f0f);
  border: 1px solid #1DB954; border-radius: 8px;
}
.spotify-selected-img {
  width: 44px; height: 44px; border-radius: 4px;
  background: #222; object-fit: cover; flex-shrink: 0;
}
.spotify-selected-meta { flex: 1; min-width: 0; }
.spotify-selected-name {
  font-size: 14px; color: var(--text, #f5f5f5); font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.spotify-selected-sub {
  font-size: 11px; color: var(--muted, #999);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.spotify-selected-clear {
  background: transparent; border: none; color: var(--muted, #999);
  font-size: 22px; cursor: pointer; padding: 0 4px; line-height: 1;
  flex-shrink: 0;
}
.spotify-resume-card {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; background: var(--surface3, #0f0f0f);
  border: 1px dashed var(--border, #2a2a2a); border-radius: 8px;
  cursor: pointer; transition: border-color 0.15s;
  margin-bottom: 6px;
}
.spotify-resume-card:hover { border-color: #1DB954; }
.spotify-quick-picks {
  display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px;
}
.spotify-quick-pick {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 9px 5px 5px; background: var(--surface3, #0f0f0f);
  border: 1px solid var(--border, #2a2a2a); border-radius: 100px;
  cursor: pointer; transition: border-color 0.15s; max-width: 100%;
}
.spotify-quick-pick:hover { border-color: #1DB954; }
.spotify-quick-pick-img {
  width: 22px; height: 22px; border-radius: 100px;
  background: #222; object-fit: cover; flex-shrink: 0;
}
.spotify-quick-pick-name {
  font-size: 11px; color: var(--text, #f5f5f5); font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 120px;
}

.youtube-music-picks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 8px;
}
.youtube-music-pick {
  min-width: 0;
  background: var(--surface3, #0f0f0f);
  border: 1px solid var(--border, #2a2a2a);
  border-radius: 7px;
  padding: 8px 10px;
  color: var(--text, #f5f5f5);
  cursor: pointer;
  text-align: left;
  font-family: 'Barlow', sans-serif;
  transition: border-color 0.15s, background 0.15s;
}
.youtube-music-pick:hover {
  border-color: #ff0033;
  background: var(--card, #1a1a1a);
}
.youtube-music-pick-name {
  display: block;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.youtube-music-pick-sub {
  display: block;
  color: var(--muted, #999);
  font-size: 10px;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.youtube-music-input-row {
  display: flex;
  gap: 6px;
}
.youtube-music-input-row .spotify-search-input {
  flex: 1;
  min-width: 0;
}
.youtube-music-use-btn {
  flex-shrink: 0;
  border: 0;
  border-radius: 6px;
  background: #ff0033;
  color: #fff;
  padding: 0 12px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}
@media (max-width: 420px) {
  .youtube-music-picks { grid-template-columns: 1fr; }
}

/* One-time heads-up shown above the YouTube Music picks: explains that
   launching opens a separate app and how to get back. Dismissed for good
   via the "Got it" button (kn-ytm-return-tip-dismissed localStorage flag). */
.youtube-music-return-note {
  background: rgba(255, 0, 51, 0.08);
  border: 1px solid rgba(255, 0, 51, 0.45);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 8px;
  font-family: 'Barlow', sans-serif;
}
.youtube-music-return-note-text {
  font-size: 12px;
  line-height: 1.4;
  color: var(--text, #f5f5f5);
}
.youtube-music-return-note-dismiss {
  margin-top: 8px;
  border: 1px solid var(--border, #2a2a2a);
  border-radius: 6px;
  background: transparent;
  color: var(--muted, #999);
  padding: 5px 12px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}
.youtube-music-return-note-dismiss:hover {
  border-color: #ff0033;
  color: var(--text, #f5f5f5);
}

/* ── In-workout mini-controls ───────────────────────── */
.spotify-mini-track {
  font-size: 12px; color: var(--muted, #999);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-family: 'Barlow', sans-serif;
}
.spotify-mini-ctrls {
  display: flex; gap: 6px; align-items: center; flex-shrink: 0;
}
.spotify-mini-btn {
  background: transparent; border: 1px solid var(--border, #2a2a2a);
  border-radius: 6px; width: 32px; height: 32px; padding: 0;
  color: var(--text, #f5f5f5); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.15s, background 0.15s;
}
.spotify-mini-btn:hover { border-color: #1DB954; }
.spotify-mini-btn:active { background: rgba(29, 185, 84, 0.15); }
.spotify-mini-btn--big { width: 40px; height: 40px; border-color: #1DB954; color: #1DB954; }

/* In app.html, mini-row is hidden until the spotify icon button is tapped */
.spotify-mini--open { display: block !important; }

/* Player-screen Spotify bar (C25K / cardio in-workout view) */
.spotify-player-bar {
  width: 100%; max-width: 360px; margin-top: 10px;
  background: var(--surface, #1a1a1a); border: 1px solid var(--border, #2a2a2a);
  border-radius: 10px; padding: 10px 12px;
  display: flex; flex-direction: row; align-items: center; gap: 12px;
}
.spotify-mini-art {
  width: 52px; height: 52px; border-radius: 6px;
  object-fit: cover; background: #222; flex-shrink: 0;
}
.spotify-player-bar-right {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 8px;
}
.spotify-player-bar-ctrls {
  display: flex; align-items: center; gap: 12px;
}
.spotify-player-bar-glyph { flex-shrink: 0; }
