/* Downloads: the options sheet (3.13), the Downloads tab (3.15), and the
   player's track for a download still coming (3.12).
   docs/designs/lyra-web-screens.md. */

/* --- the options sheet --- */
.sheet.dl-sheet { padding: 26px 20px calc(20px + env(safe-area-inset-bottom)); gap: 10px; }
.dl-head { margin-bottom: 6px; }
.dl-title { font-size: 20px; font-weight: 600; }
.dl-sub { font-size: 14px; color: var(--secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dl-opts { display: flex; flex-direction: column; gap: 10px; }
.dl-opt { display: flex; align-items: center; gap: 12px; min-height: 70px; padding: 0 14px; border-radius: var(--r-card); background: var(--field); border: 1px solid var(--line); text-align: left; transition: background .12s ease-out, border-color .12s ease-out; }
.dl-opt:hover { background: var(--field-hover); }
.dl-opt.on { background: var(--field-hover); border: 1.5px solid rgba(255,176,138,.7); padding: 0 13.5px; }
.dl-opt-mark { color: var(--tertiary); }
.dl-opt.on .dl-opt-mark { color: var(--accent); }
.dl-opt-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dl-opt-name { font-size: 16px; font-weight: 600; display: flex; align-items: baseline; gap: 8px; }
.dl-opt-q { font-size: 13px; font-weight: 400; color: var(--secondary); }
.dl-opt-hint { font-size: 12.5px; color: var(--tertiary); }
.dl-opt-size { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; white-space: nowrap; }
.dl-opt-size strong { font-size: 15px; font-weight: 600; }
.dl-opt-size span { font-size: 12.5px; color: var(--secondary); min-height: 17px; display: flex; align-items: center; }
.dl-opt-size .spinner { width: 12px; height: 12px; border-width: 1.5px; }
.dl-conn { display: flex; align-items: center; gap: 6px; min-height: 26px; font-size: 12.5px; color: var(--tertiary); }
.dl-again { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; color: var(--secondary); }
.dl-again:hover { background: var(--field-hover); color: var(--text); }
.dl-install { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: var(--r-card); background: rgba(255,176,138,.08); font-size: 13px; color: var(--secondary); }
.dl-install .icon { color: var(--accent); }
.dl-install span { flex: 1; }
.dl-install-btn { flex: none; height: 30px; padding: 0 12px; border-radius: 999px; background: rgba(255,255,255,.12); color: var(--text); font-size: 13px; font-weight: 600; }
.dl-install-btn:hover { background: rgba(255,255,255,.18); }
.dl-sheet .btn.primary { margin-top: 4px; }
.dl-dock-badge { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: rgba(255,176,138,.12); color: var(--accent); }

/* --- the Downloads tab --- */
.dl-screen { min-height: 100vh; }
.dl-inner { max-width: 860px; padding: 20px var(--margin) 40px; }
.dl-heading { margin: 8px 0 18px; }
.dl-list { display: flex; flex-direction: column; gap: 10px; }
.dl-row { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: var(--r-card-lg); background: var(--field); border: 1px solid var(--line); container-type: inline-size; }
.dl-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; text-align: left; border-radius: 10px; }
.dl-poster { position: relative; flex: none; width: 56px; }
.dl-poster .poster-frame { border-radius: 8px; }
.dl-poster .poster-blank-name { display: none; }
.dl-mark { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: rgba(0,0,0,.45); border: 1px solid rgba(255,255,255,.3); color: #fff; }
.dl-main:hover .dl-mark { background: rgba(0,0,0,.6); }
.dl-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.dl-name { font-size: 15px; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dl-label { font-size: 13px; color: var(--secondary); }
.dl-bar { display: block; height: 3px; margin-top: 4px; border-radius: 2px; background: rgba(255,255,255,.12); overflow: hidden; }
.dl-bar span { display: block; height: 100%; border-radius: 2px; background: var(--secondary); transition: width .3s ease-out; }
.dl-bar.on span { background: var(--accent); }
.dl-status { font-size: 12px; color: var(--tertiary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dl-status.bad { color: var(--accent); }
/* The longest wording that fits the row. */
.dl-status .w-short, .dl-status .w-shortest { display: none; }
@container (max-width: 330px) { .dl-status .w-long { display: none; } .dl-status .w-short { display: inline; } }
@container (max-width: 250px) { .dl-status .w-short { display: none; } .dl-status .w-shortest { display: inline; } }
.dl-actions { flex: none; display: flex; gap: 8px; }
.dl-round { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: var(--field-hover); border: 1px solid var(--line); color: var(--text); transition: background .12s ease-out; }
.dl-round:hover { background: rgba(255,255,255,.14); }
.dl-used { margin-top: 18px; text-align: center; font-size: 12px; color: var(--tertiary); }
.dl-used:empty { display: none; }
.dl-note { margin-top: 6px; text-align: center; font-size: 12px; color: var(--tertiary); }
@media (min-width: 600px) { .dl-inner { padding-top: 24px; } }

/* --- the player: a download still coming --- */
.player.partial .p-track-line { background: rgba(255,255,255,.14); }
.p-track-have { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(255,255,255,.42); }
.p-have-note { display: inline-flex; align-items: center; gap: 5px; color: rgba(255,255,255,.75); }
