/* Turnieje PBN — lista turniejów, widok rozdań i przypięty pasek akcji (07.11.2026).
 * Szerokie tabele przewijają się wewnątrz opakowania, więc strona nie przelewa się przy 375 px. */
.tp-toolbar { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: flex-end; justify-content: space-between; }
.tp-toolbar h2 { margin: .2rem 0; }
/* styles.css ma .utility-page form { display:grid } — pasek szukania musi zostać w jednym rzędzie. */
.utility-page form.tp-search { display: flex; flex-wrap: nowrap; flex: 0 1 32rem; gap: .35rem; align-items: center; margin: 0; }
.tp-search label { font-weight: 600; white-space: nowrap; }
.tp-search input { min-width: 12rem; flex: 1 1 14rem; }
.tp-import { margin: .4rem 0 1rem; }
.tp-import > summary { display: inline-block; cursor: pointer; width: auto; }
.tp-import > summary::-webkit-details-marker { display: none; }
.tp-import > summary::before { content: '▸ '; }
.tp-import[open] > summary::before { content: '▾ '; }
.tp-import > form { margin-top: .6rem; }
.tp-tablewrap { max-width: 100%; overflow-x: auto; }
/* Dymek statusu nie może być obcinany przez poziome przewijanie tabeli na komputerze. */
.tp-tablewrap.tp-listwrap { overflow: visible; }
.tp-table { width: 100%; min-width: 30rem; border-collapse: collapse; margin: .4rem 0 1rem; }
.tp-table th, .tp-table td { padding: .3rem .45rem; border-bottom: 1px solid #e5e7eb; text-align: left; vertical-align: top; }
.tp-table th { background: #f5f6f8; white-space: nowrap; }
.tp-table td:first-child, .tp-table th:first-child { width: 2rem; }
.tp-boards td:nth-child(2) { min-width: 9rem; }
.tp-list td:first-child { min-width: 14rem; }
.tp-list th:first-child { width: auto; }
.tp-list td:nth-child(2) { white-space: nowrap; }
.tp-list .at-chip { white-space: nowrap; }
.tp-records { margin: 0; padding-left: 1rem; font-size: .9rem; color: #333; }
.tp-board { text-decoration: none; }
.tp-board:hover, .tp-board:focus { text-decoration: underline; }
.tp-actions { margin-top: .6rem; }
/* Formularz anulowania podglądu: przycisk nie rozciąga się na całą szerokość (styles.css robi z form grid). */
.utility-page form.tp-cancel { display: inline-block; margin: .2rem 0 .8rem; }
/* Etap C: trzy kółka L / R / W w kolorach modułów. Pełne = rozdanie już skopiowane. */
.tp-markcell { white-space: nowrap; }
.utility-page form.tp-mark-form { display: inline-block; margin: 0; }
.tp-mark-form + .tp-mark-form { margin-left: .25rem; }
.tp-mark {
  --tp-mark: #637D96;
  --tp-mark-ink: #4F6680;
  --tp-mark-on: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  padding: 0;
  border: 2px solid var(--tp-mark);
  border-radius: 50%;
  background: #fff;
  color: var(--tp-mark-ink);
  font: inherit;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.utility-page .tp-mark, .utility-page button.tp-mark { min-height: 40px; height: 40px; }
.tp-mark:hover, .tp-mark:focus-visible { outline: 2px solid var(--tp-mark-ink); outline-offset: 2px; }
.tp-mark.is-on { background: var(--tp-mark); color: var(--tp-mark-on); }
.tp-mark-L { --tp-mark: #637D96; --tp-mark-ink: #4F6680; --tp-mark-on: #fff; }
.tp-mark-R { --tp-mark: #d8bc84; --tp-mark-ink: #6b5222; --tp-mark-on: #3c2f12; }
.tp-mark-W { --tp-mark: #a8c3a0; --tp-mark-ink: #3d5c43; --tp-mark-on: #24361f; }
.tp-bulk-label { font-weight: 650; }
.sticky-actions .tp-mark { flex: 0 0 40px; }
/* Etap C2: filtr listy, „Status analizy” z dymkiem sesji i sekcja sesji w widoku turnieju. */
.tp-filter { display: flex; flex-wrap: wrap; gap: .3rem .7rem; align-items: center; margin: .2rem 0 .6rem; }
.tp-filter > span { font-weight: 650; }
.tp-filter a { padding: .15rem .45rem; border-radius: .35rem; text-decoration: none; }
.tp-filter a:hover, .tp-filter a:focus { background: #eef1f5; }
.tp-filter a.active { background: #4F6680; color: #fff; font-weight: 700; }
.tp-analiza { white-space: nowrap; }
.tp-statwrap { position: relative; display: inline-block; }
.tp-statwrap + .tp-statwrap { margin-left: .3rem; }
.tp-stat { cursor: pointer; }
.tp-stat.zero { opacity: .62; }
.tp-stat:hover, .tp-stat:focus-visible { outline: 2px solid #4F6680; outline-offset: 1px; }
.tp-pop {
  position: absolute; z-index: 30; top: calc(100% + .3rem); left: 0;
  display: block; width: min(24rem, 88vw); padding: .55rem .7rem;
  background: var(--panel, #fffdf2); color: #1f2933;
  border: 1px solid #c9d2dc; border-radius: .5rem;
  box-shadow: 0 8px 24px rgba(31, 41, 51, .18);
  white-space: normal; font-size: .9rem; line-height: 1.35;
}
.tp-pop[hidden] { display: none; }
.tp-pop-title { display: block; font-weight: 700; margin-bottom: .25rem; }
.tp-pop-list { margin: 0; padding-left: 1rem; }
.tp-pop-list li + li { margin-top: .45rem; }
.tp-sessions { margin: .8rem 0 1rem; }
.tp-sessions h3 { margin: .2rem 0 .3rem; }
.tp-sessionlist td, .tp-sessionlist th { vertical-align: middle; }
.tp-session-actions { white-space: nowrap; }
.utility-page .tp-session-actions form { display: inline-block; margin: 0 0 0 .3rem; }
.utility-page form.tp-review-form { display: inline-block; margin: .25rem 0 0 .3rem; }
.tp-session-name { min-width: 15rem; }
.tp-ask { margin: .7rem 0; padding: .7rem .9rem; border: 1px solid #d9b45f; border-radius: .5rem; background: #fff7e3; }
.tp-ask h3 { margin: .1rem 0 .3rem; }
.tp-ask-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.utility-page .tp-ask-actions form { display: inline-block; margin: 0; }
.tp-review, .tp-copies { margin: .45rem 0; }
@media (max-width: 860px) {
  .tp-table { font-size: .93rem; }
  .tp-records { font-size: .85rem; }
}
@media (max-width: 640px) {
  .utility-page form.tp-search { width: 100%; flex-wrap: wrap; }
  .tp-search input { min-width: 0; flex: 1 1 8rem; }
  .tp-table { min-width: 34rem; }
  .tp-table th, .tp-table td { padding: .25rem .3rem; }
  .tp-import > summary { width: 100%; box-sizing: border-box; }
  .tp-tablewrap.tp-listwrap { overflow-x: auto; }
  /* Na telefonie dymek jest oknem nad treścią — nie chowa się w przewijanej tabeli. */
  .tp-pop { position: fixed; left: 1rem; right: 1rem; top: 28vh; width: auto; max-height: 56vh; overflow: auto; z-index: 80; }
  /* Na telefonie kółka L/R/W zostają widoczne przy prawej krawędzi przewijanej tabeli. */
  .tp-boards th:last-child, .tp-boards td:last-child { position: sticky; right: 0; background: var(--panel, #fffdf2); box-shadow: -5px 0 8px rgba(76, 12, 21, .08); }
  .tp-boards th:last-child { z-index: 2; }
}
