/* ============================================================================
   B2 topic analysis page (W23), from webapp-v4/seiten/34-themen-analyse.html.
   Page additions with the mockup's prefix ta-, on top of the V4 blocks in
   v4.css (.bl-topics, .bl-sentiment, .bl-seg, .bl-empty, .bl-lrows).
   ========================================================================= */

/* Old shell (v4_design off): the page brings the padding of .bl-main. */
.bl-v4.ta-legacy { width: 100%; max-width: 1184px; margin: 0 auto; padding: 32px 32px 72px; }

.bl-v4 .ta-results { display: block; }
.bl-v4 .ta-loc { min-width: 300px; }
.bl-v4 .ta-loc select { flex: 1 1 auto; }
/* The legacy ".dark select { … !important }" (tailwind/application.css) paints a grey box into the V4 field. */
.dark .bl-v4 .ta-loc select { background-color: transparent !important; border-color: transparent !important; color: var(--ink) !important; }
.bl-v4 .ta-main { min-width: 0; display: flex; flex-direction: column; gap: 24px; }

/* Topics card */
.bl-v4 .ta-range .bl-seg-item { height: 32px; min-width: 72px; }
.bl-v4 .ta-summary { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.bl-v4 .ta-summary-text { font-size: 14.5px; line-height: 1.55; color: var(--ink-2); max-width: 64ch; }
.bl-v4 .ta-per-loc { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; margin-top: 4px; font-size: 13px; line-height: 1.5; }
.bl-v4 .ta-per-loc dt { font-weight: 700; color: var(--ink); white-space: nowrap; }
.bl-v4 .ta-per-loc dd { color: var(--muted); }
.bl-v4 .ta-topics .bl-topic { grid-template-columns: minmax(140px, 190px) minmax(0, 1fr) 84px; }
.bl-v4 .ta-pct { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15; }
.bl-v4 .ta-pct span { font-size: 11.5px; font-weight: 500; color: var(--muted); }
.bl-v4 .ta-pct.bl-is-pos { color: var(--accent-ink); }
.bl-v4 .ta-pct.bl-is-neg { color: var(--bad); }
.bl-v4 .ta-topics .bl-topic-quote { color: var(--ink-2); font-style: italic; }
.bl-v4 .ta-rank { display: inline-block; min-width: 18px; margin-right: 4px; font-family: var(--mono); font-size: 11.5px; font-weight: 500; color: var(--muted-2); }
.bl-v4 .ta-foot { justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; }
.bl-v4 .ta-foot .bl-legal-note { flex: 1 1 320px; }
.bl-v4 .ta-foot .bl-legal-note .bl-ic { flex: none; margin-top: 2px; }
.bl-v4 .ta-state-actions { justify-content: center; gap: 12px; margin-top: 20px; }
.bl-v4 .ta-state-actions .bl-btn { margin-top: 0; }

/* Was du daraus machen kannst */
.bl-v4 .ta-acts .bl-lrow-ic .bl-ic { color: var(--accent-ink); }
.bl-v4 .ta-acts .bl-lrow-title { font-weight: 500; color: var(--ink-2); }
.bl-v4 .ta-acts .bl-lrow-title b { font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }

@media (max-width: 1023.98px) {
  .bl-v4.ta-legacy { padding: 16px 16px 112px; }
  .bl-v4 .ta-loc-form,
  .bl-v4 .ta-loc { min-width: 0; width: 100%; }
  .bl-v4 .ta-loc { height: 44px; }
  .bl-v4 .ta-main { gap: 16px; }
  .bl-v4 .ta-topics-card .bl-card-head { align-items: flex-start; }
  .bl-v4 .ta-range { width: 100%; }
  .bl-v4 .ta-range .bl-seg-item { flex: 1 1 0; height: 40px; }
  .bl-v4 .ta-summary { padding: 16px; }
  .bl-v4 .ta-topics .bl-topic { grid-template-columns: minmax(0, 1fr) 72px; }
  .bl-v4 .ta-foot .bl-link { min-height: 40px; }
  .bl-v4 .ta-acts .bl-lrow-side { grid-column: 1 / -1; }
  .bl-v4 .ta-acts .bl-lrow-side .bl-btn { width: 100%; height: 44px; justify-content: center; }
  .bl-v4 .ta-state-actions .bl-btn { min-height: 44px; }
}
