/* The release picker (media/cinema-pick.js): the Cinema's request popout grown to
   the whole nine yards — seasons, every release with its quality, size, seeders
   and source. Same screening-room palette as cinema-request.css (--cr-*, set on
   .cr-scrim). A wide popout, its own scroll, title and footer pinned. */
.cr-dlg.cr-pick { width: min(920px, 100%); max-height: 90vh; }

.pk-seasons { display: flex; gap: 8px; padding: 12px 18px; border-bottom: 1px solid var(--cr-line); overflow-x: auto; scrollbar-width: thin; flex: none; }
.pk-season {
  flex: none; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; min-height: 48px; min-width: 92px;
  padding: 7px 14px; border-radius: 12px; border: 1px solid var(--cr-line); background: rgba(255, 255, 255, .03);
  color: var(--cr-ink); font: inherit; cursor: pointer; text-align: left; transition: border-color .15s, background .15s;
}
.pk-season b { font-weight: 650; font-size: 14px; white-space: nowrap; }
.pk-season small { color: var(--cr-muted); font-size: 12px; }
.pk-season:hover { border-color: var(--cr-pill); }
.pk-season[aria-pressed='true'] { border-color: var(--cr-accent); background: rgba(245, 158, 11, .12); }
.pk-season:focus-visible, .pk-chip:focus-visible, .pk-sort select:focus-visible { outline: 2px solid var(--cr-accent); outline-offset: 2px; }

.pk-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 18px; border-bottom: 1px solid var(--cr-line); flex: none; }
.pk-tools[hidden] { display: none; }
.pk-filter { display: flex; gap: 6px; flex-wrap: wrap; }
.pk-chip { min-height: 36px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--cr-line); background: transparent; color: var(--cr-muted); font: inherit; font-size: 13px; cursor: pointer; white-space: nowrap; }
.pk-chip b { color: var(--cr-ink); font-weight: 650; margin-left: 2px; }
.pk-chip[aria-checked='true'] { border-color: var(--cr-accent); color: var(--cr-ink); background: rgba(245, 158, 11, .12); }
.pk-sort { display: inline-flex; align-items: center; gap: 8px; color: var(--cr-muted); font-size: 13px; }
.pk-sort select { min-height: 36px; padding: 4px 10px; border-radius: 10px; border: 1px solid var(--cr-line); background: #11141b; color: var(--cr-ink); font: inherit; font-size: 13px; }

.pk-body { padding: 10px 14px 14px; }
.pk-wait { display: flex; align-items: center; gap: 12px; padding: 18px 6px; }
.pk-spin { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--cr-line); border-top-color: var(--cr-accent); animation: pk-spin .8s linear infinite; flex: none; }
@keyframes pk-spin { to { transform: rotate(360deg); } }
.pk-none { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 8px 4px; }

.pk-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pk-row {
  display: grid; grid-template-columns: minmax(0, 1fr) 128px 78px 92px 118px; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 12px; border: 1px solid var(--cr-line); background: rgba(255, 255, 255, .025);
  transition: border-color .15s, background .15s;
}
.pk-row:hover { border-color: var(--cr-pill); background: rgba(255, 255, 255, .045); }
.pk-row.is-best { border-color: rgba(237, 199, 141, .55); background: rgba(245, 158, 11, .07); }
.pk-row.is-low { opacity: .72; }
.pk-main { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.pk-badge { align-self: flex-start; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #1b1205; background: var(--cr-accent); border-radius: 5px; padding: 2px 7px; }
.pk-name { margin: 0; font-size: 13px; line-height: 1.35; color: var(--cr-ink); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pk-tags { margin: 0; display: flex; gap: 5px; flex-wrap: wrap; }
.pk-tag { font-size: 11px; font-weight: 650; padding: 2px 7px; border-radius: 5px; background: rgba(255, 255, 255, .07); color: var(--cr-muted); white-space: nowrap; }
.pk-tag.is-res { color: var(--cr-ink); background: rgba(255, 255, 255, .12); }
.pk-tag.is-warn { color: #ffd2c2; background: rgba(180, 56, 30, .3); }
.pk-tag.is-private { color: var(--cr-accent); background: rgba(245, 158, 11, .14); }
.pk-src { display: flex; align-items: center; gap: 7px; min-width: 0; font-size: 13px; color: var(--cr-muted); }
.pk-src img { width: 18px; height: 18px; border-radius: 4px; flex: none; }
.pk-src span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pk-num { font-variant-numeric: tabular-nums; text-align: right; font-size: 14px; white-space: nowrap; }
.pk-size { color: var(--cr-ink); }
.pk-seed { color: var(--cr-ink); font-weight: 650; }
.pk-seed small { font-weight: 400; color: var(--cr-muted); font-size: 11.5px; }
.pk-seed.is-good { color: #8fdc8a; }
.pk-seed.is-weak { color: #f2a48d; }
.pk-act { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.pk-get { min-height: 40px; padding: 0 16px; white-space: nowrap; }
.pk-done { color: #8fdc8a; font-weight: 650; font-size: 14px; white-space: nowrap; }
.pk-err { color: #f2a48d; font-size: 11.5px; text-align: right; max-width: 160px; }
.pk-foot .pk-status { flex: 1 1 260px; margin: 0; font-size: 13px; }

@media (max-width: 720px) {
  .cr-dlg.cr-pick { max-height: 94vh; }
  .pk-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'main main' 'src src' 'size seed' 'act act'; row-gap: 8px; }
  .pk-main { grid-area: main; }
  .pk-src { grid-area: src; }
  .pk-size { grid-area: size; text-align: left; }
  .pk-seed { grid-area: seed; }
  .pk-act { grid-area: act; flex-direction: row; align-items: center; justify-content: space-between; }
  .pk-get { flex: 1 1 auto; min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) { .pk-spin { animation: none; } .pk-row, .pk-season { transition: none; } }
