/* Страница «Мои дубли» (#/takes, takespage.js). Строка дубля — общие .take / .take-info из style.css */
.tp { gap: 20px; }
.tp-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.tp-top h1 { margin: 0; }
.tp-top .sub { margin: 4px 0 0; }
.tp-top .chip { flex: none; white-space: nowrap; }
.tp-top .chip:empty { display: none; }

.tp-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tp-tools .btn.on { background: var(--text); color: var(--ink); }
.tp-song {
  height: 34px; max-width: 280px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--glass); color: var(--text); font: inherit; font-size: 13px;
}
.tp-song option { background: var(--surface); }

.tp-group { display: grid; gap: 8px; }
.tp-group + .tp-group { margin-top: 10px; }
.tp-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; }
.tp-head h2 { margin: 0; font-size: 18px; }
.tp-head .sub { margin: 0; font-size: 13px; }
.tp-head .grow { flex: 1; }

.tp-take { position: relative; padding: 8px 10px; overflow: hidden; }
.tp-take .tp-songname { color: var(--text); opacity: .8; }
.tp-prog { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; pointer-events: none; }
.tp-prog i { display: block; height: 100%; width: 0; background: var(--accent); }
.tp-take:not(.playing) .tp-prog { display: none; }
.tp-take.tp-focus { box-shadow: inset 0 0 0 1px var(--accent); animation: tp-flash 1.6s ease-out 1; }
@keyframes tp-flash { from { background: var(--accent-soft); } to { background: var(--glass); } }

.tp-empty { display: grid; justify-items: center; gap: 10px; padding: 48px 16px; text-align: center; }
.tp-empty svg { width: 40px; height: 40px; color: var(--muted); }
.tp-empty h2 { margin: 0; }
.tp-empty .sub { max-width: 440px; margin: 0; }

#takes .tp-all { margin-left: auto; }

@media (max-width: 640px) {
  .tp-take { flex-wrap: wrap; }
  .tp-take .take-info { flex-basis: calc(100% - 52px); }
  .tp-take .chip.score { margin-left: 44px; }
  .tp-song { max-width: 100%; flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) { .tp-take.tp-focus { animation: none; } }

/* полоса прослушивания дубля с минусом */
.tp-bar {
  position: sticky; bottom: 16px; z-index: 5; margin-top: 8px;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 14px; border-radius: 18px; background: var(--surface-2); border: 1px solid var(--border-2);
  box-shadow: 0 16px 48px rgba(0, 0, 0, .55);
}
.tpb-info { display: flex; flex-direction: column; min-width: 0; max-width: 220px; }
.tpb-info b { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tpb-info span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tpb-track { flex: 1 1 160px; display: flex; align-items: center; gap: 10px; min-width: 140px; }
.tpb-line { flex: 1; height: 16px; display: flex; align-items: center; cursor: pointer; }
.tpb-line i { display: block; height: 4px; width: 0; border-radius: 2px; background: var(--accent); box-shadow: 0 0 0 0 transparent; }
.tpb-line { background: linear-gradient(var(--glass-2), var(--glass-2)) center / 100% 4px no-repeat; border-radius: 2px; }
.tpb-time { font-family: var(--mono); font-size: 12px; color: var(--muted); white-space: nowrap; }
@media (max-width: 640px) {
  .tp-bar { bottom: 8px; gap: 8px; }
  .tpb-info { flex: 1; max-width: none; }
  .tpb-track { order: 5; flex-basis: 100%; }
  .tp-bar .tk-mix { order: 6; flex-basis: 100%; }
}
/* свёрнутая песня (keep.js) держит мини-плеер внизу экрана — полоса дубля встаёт над ним */
body.song-parked .tp-bar { bottom: 96px; }

/* «Сохранить в MP3» (app/takemp3.py): пока сервер сводит файл — кнопка мигает и не нажимается */
.tp-mp3 { font-family: var(--mono); font-size: 12px; letter-spacing: .02em; }
.tpb-mp3 { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.tpb-mp3 svg { width: 16px; height: 16px; }
.tp-mp3.busy, .tpb-mp3.busy { pointer-events: none; animation: tp-mp3-busy 1s ease-in-out infinite alternate; }
@keyframes tp-mp3-busy { from { opacity: 1; } to { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .tp-mp3.busy, .tpb-mp3.busy { animation: none; opacity: .6; } }
@media (max-width: 640px) { .tpb-mp3 span { display: none; } }
