/* TFP · wspolny styl LIGI i TURNIEJE · 2026-11-12
   ZAKRES: PREZENTACJA (menu zarzadzania / taby / wspolne karty).
   Bez zmian formularzy, wpisowego, rozliczen, wynikow i obliczen.
   Wyglad tabel wynikow i punktowych nadal kontroluje results-compact-2026.css. */

/* Obie publiczne nawigacje korzystaja z tej samej wielkosci i aktywnego koloru. */
body:is([data-page="league-view"],[data-page="tournament-view"]) main#tfpCompetitionView.league-page .league-top-tabs {
  display:flex!important;flex-wrap:nowrap!important;align-items:center!important;
  gap:5px!important;padding:6px!important;background:#fff!important;
  border:1px solid #dce3ec!important;border-radius:14px!important;
  overflow-x:auto!important;overflow-y:hidden!important;-webkit-overflow-scrolling:touch;
  scrollbar-width:thin;scrollbar-color:#dce3ec transparent;
}
body:is([data-page="league-view"],[data-page="tournament-view"]) main#tfpCompetitionView.league-page .league-top-tabs .league-top-tab {
  flex:0 0 auto!important;white-space:nowrap!important;min-height:42px!important;
  padding:10px 14px!important;border-radius:10px!important;
  font-family:inherit!important;font-size:13px!important;font-weight:700!important;
  line-height:1.35!important;letter-spacing:0!important;box-shadow:none!important;
}
body:is([data-page="league-view"],[data-page="tournament-view"]) main#tfpCompetitionView.league-page .league-top-tabs .league-top-tab.active:not(.tfp-bracket-tab--ready) {
  background:#7139df!important;border-color:#7139df!important;color:#fff!important;
}
body:is([data-page="league-view"],[data-page="tournament-view"]) main#tfpCompetitionView.league-page :is(#table,#results,#matches) .league-mini-tabs {
  display:flex!important;gap:8px!important;max-width:100%!important;
  overflow-x:auto!important;flex-wrap:nowrap!important;scrollbar-width:thin;
  padding:3px 0 8px!important;-webkit-overflow-scrolling:touch;
}
body:is([data-page="league-view"],[data-page="tournament-view"]) main#tfpCompetitionView.league-page :is(#table,#results,#matches) .league-mini-tabs .league-mini-tab {
  flex:0 0 auto!important;min-height:38px!important;border-radius:11px!important;
  font-family:inherit!important;font-weight:650!important;
}
/* Nie nadpisujemy wielkosci komorek, nazwisk ani ustawien rozszerzania kolumny. */
body:is([data-page="league-view"],[data-page="tournament-view"]) main#tfpCompetitionView.league-page :is(#table,#results) :is(.league-standings-card,.league-results-card) {
  border-radius:16px!important;border:1px solid #dce3ec!important;box-shadow:0 4px 16px rgba(10,40,72,.04)!important;
}

/* Zamiana starego gornego przycisku akordeonu na jednolity fioletowy wybierak.
   Stary guzik chowamy TYLKO gdy manager przeniesiony do zakladki i uruchomiony JS. */
@media (max-width:900px) {
  body:is([data-page="league-view"],[data-page="tournament-view"]) main#tfpCompetitionView.league-page #manage .league-admin-accordion--as-tab > .tfp-manager__trigger {
    display:none!important;
  }
  body:is([data-page="league-view"],[data-page="tournament-view"]) main#tfpCompetitionView.league-page #manage :is(#admin-panel,#tournament-admin-panel) .tfp-manager__panel {
    display:block!important;grid-template-columns:none!important;gap:0!important;
    padding:0!important;margin:0!important;background:transparent!important;
  }
  body:is([data-page="league-view"],[data-page="tournament-view"]) main#tfpCompetitionView.league-page #manage :is(#admin-panel,#tournament-admin-panel) .tfpx-manager-navigation {
    position:relative!important;inset:auto!important;top:auto!important;
    width:100%!important;max-width:none!important;padding:0!important;
    margin:0 0 12px!important;border:0!important;border-radius:16px!important;
    background:transparent!important;box-shadow:none!important;z-index:2!important;
  }
  body:is([data-page="league-view"],[data-page="tournament-view"]) main#tfpCompetitionView.league-page #manage :is(#admin-panel,#tournament-admin-panel) .tfpx-manager-navigation > .tfpx-section-toggle {
    display:flex!important;align-items:center!important;gap:14px!important;
    width:100%!important;min-height:62px!important;padding:10px 16px!important;
    border:1px solid #6223c1!important;border-radius:14px!important;
    background:#7026ce!important;background-image:linear-gradient(115deg,#7a32e5,#651ec1)!important;
    color:#fff!important;-webkit-text-fill-color:#fff!important;
    box-shadow:0 4px 10px rgba(80,32,142,.13)!important;
    font-family:inherit!important;line-height:1.2!important;text-align:left!important;
  }
  body:is([data-page="league-view"],[data-page="tournament-view"]) main#tfpCompetitionView.league-page #manage :is(#admin-panel,#tournament-admin-panel) .tfpx-section-toggle > span:nth-child(2) {
    flex:1!important;min-width:0!important;
  }
  body:is([data-page="league-view"],[data-page="tournament-view"]) main#tfpCompetitionView.league-page #manage :is(#admin-panel,#tournament-admin-panel) .tfpx-section-toggle :is(small,strong) {
    color:#fff!important;-webkit-text-fill-color:#fff!important;
    font-size:18px!important;font-weight:800!important;line-height:1.2!important;
  }
  body:is([data-page="league-view"],[data-page="tournament-view"]) main#tfpCompetitionView.league-page #manage :is(#admin-panel,#tournament-admin-panel) .tfpx-section-toggle small {
    font-size:0!important;line-height:0!important;height:0!important;
  }
  body:is([data-page="league-view"],[data-page="tournament-view"]) main#tfpCompetitionView.league-page #manage :is(#admin-panel,#tournament-admin-panel) .tfpx-section-toggle strong {
    font-size:0!important;
  }
  body:is([data-page="league-view"],[data-page="tournament-view"]) main#tfpCompetitionView.league-page #manage :is(#admin-panel,#tournament-admin-panel) .tfpx-section-toggle strong::before {
    content:"Zarządzanie";font-size:18px!important;font-weight:800!important;color:#fff!important;
  }
  body:is([data-page="league-view"],[data-page="tournament-view"]) main#tfpCompetitionView.league-page #manage :is(#admin-panel,#tournament-admin-panel) .tfpu-menu-gear {
    display:inline-grid!important;place-items:center!important;width:40px!important;height:40px!important;flex:0 0 40px!important;
    background:rgba(255,255,255,.14)!important;border-radius:12px!important;color:#fff!important;
  }
  body:is([data-page="league-view"],[data-page="tournament-view"]) main#tfpCompetitionView.league-page #manage :is(#admin-panel,#tournament-admin-panel) .tfpx-section-chevron {
    font-size:0!important;color:transparent!important;display:grid!important;place-items:center!important;
    width:22px!important;height:22px!important;transform:none!important;
  }
  body:is([data-page="league-view"],[data-page="tournament-view"]) main#tfpCompetitionView.league-page #manage :is(#admin-panel,#tournament-admin-panel) .tfpx-section-chevron::before {
    content:""!important;width:9px!important;height:9px!important;
    border-right:2px solid #fff!important;border-bottom:2px solid #fff!important;
    transform:rotate(45deg)!important;transition:transform .15s ease!important;
  }
  body:is([data-page="league-view"],[data-page="tournament-view"]) main#tfpCompetitionView.league-page #manage :is(#admin-panel,#tournament-admin-panel) .tfpx-nav-open .tfpx-section-chevron::before {
    transform:rotate(225deg)!important;
  }

  /* Menu wysuwane pod naglowkiem, a nie wielka lista rozwiniętych akordeonow. */
  body:is([data-page="league-view"],[data-page="tournament-view"]) main#tfpCompetitionView.league-page #manage :is(#admin-panel,#tournament-admin-panel) .tfpx-manager-navigation:not(.tfpx-nav-open) > .tfp-manager-tabs {
    display:none!important;
  }
  body:is([data-page="league-view"],[data-page="tournament-view"]) main#tfpCompetitionView.league-page #manage :is(#admin-panel,#tournament-admin-panel) .tfpx-manager-navigation.tfpx-nav-open > .tfp-manager-tabs {
    display:flex!important;position:static!important;flex-direction:column!important;flex-wrap:nowrap!important;
    gap:5px!important;max-height:none!important;overflow:visible!important;
    width:100%!important;padding:10px 10px 12px!important;margin:8px 0 0!important;
    background:#fff!important;border:1px solid #d9e0eb!important;border-radius:16px!important;
    box-shadow:0 5px 18px rgba(16,40,72,.045)!important;
  }
  body:is([data-page="league-view"],[data-page="tournament-view"]) main#tfpCompetitionView.league-page #manage :is(#admin-panel,#tournament-admin-panel) .tfpx-manager-navigation > .tfp-manager-tabs > .tfp-manager-tab {
    display:flex!important;align-items:center!important;justify-content:flex-start!important;
    gap:12px!important;width:100%!important;min-height:48px!important;
    padding:8px 12px!important;border:1px solid #e1e6ee!important;
    border-radius:11px!important;background:#fff!important;box-shadow:none!important;
    color:#132941!important;font-family:inherit!important;font-size:14px!important;
    font-weight:750!important;text-align:left!important;letter-spacing:0!important;white-space:normal!important;
  }
  body:is([data-page="league-view"],[data-page="tournament-view"]) main#tfpCompetitionView.league-page #manage :is(#admin-panel,#tournament-admin-panel) .tfpx-manager-navigation > .tfp-manager-tabs > .tfp-manager-tab.active {
    background:#f1eaff!important;border-color:#decdfd!important;color:#5d23bb!important;
  }
  body:is([data-page="league-view"],[data-page="tournament-view"]) main#tfpCompetitionView.league-page #manage :is(#admin-panel,#tournament-admin-panel) .tfpx-manager-navigation > .tfp-manager-tabs > .tfp-manager-tab[data-manager-tab="danger"] {
    color:#c52234!important;
  }
  body:is([data-page="league-view"],[data-page="tournament-view"]) main#tfpCompetitionView.league-page #manage :is(#admin-panel,#tournament-admin-panel) .tfpx-manager-navigation > .tfp-manager-tabs > .tfp-manager-tab:focus-visible {
    outline:3px solid #8d64eb!important;outline-offset:2px!important;
  }
  body:is([data-page="league-view"],[data-page="tournament-view"]) main#tfpCompetitionView.league-page #manage :is(#admin-panel,#tournament-admin-panel) .tfpu-item-icon {
    display:inline-flex!important;justify-content:center!important;align-items:center!important;
    width:36px!important;height:36px!important;min-width:36px!important;border-radius:11px!important;
    background:#f4edff!important;color:#6d35c7!important;
  }
  body:is([data-page="league-view"],[data-page="tournament-view"]) main#tfpCompetitionView.league-page #manage :is(#admin-panel,#tournament-admin-panel) .tfp-manager-tab[data-manager-tab="danger"] .tfpu-item-icon {
    background:#ffedf0!important;color:#d6273a!important;
  }
  body:is([data-page="league-view"],[data-page="tournament-view"]) main#tfpCompetitionView.league-page #manage :is(#admin-panel,#tournament-admin-panel) .tfpu-item-icon svg,
  body:is([data-page="league-view"],[data-page="tournament-view"]) main#tfpCompetitionView.league-page #manage :is(#admin-panel,#tournament-admin-panel) .tfpu-menu-gear svg {
    display:block!important;width:22px!important;height:22px!important;stroke:currentColor!important;
  }
  body:is([data-page="league-view"],[data-page="tournament-view"]) main#tfpCompetitionView.league-page #manage :is(#admin-panel,#tournament-admin-panel) .tfpx-manager-navigation > .tfp-manager-tabs > .tfp-manager-tab > span[aria-hidden="true"]:not(.tfpu-item-icon) {
    display:none!important;
  }
  /* Podczas wyboru sekcji wyswietlaj tylko menu; po kliknieciu jego zawartosc. */
  body:is([data-page="league-view"],[data-page="tournament-view"]) main#tfpCompetitionView.league-page #manage :is(#admin-panel,#tournament-admin-panel) .tfp-manager__panel:has(.tfpx-manager-navigation.tfpx-nav-open) > .tfp-manager-panel {
    display:none!important;
  }
  /* Na telefonie tytul zarzadzania pozostaje, ale bez drugiej identycznej belki. */
  body:is([data-page="league-view"],[data-page="tournament-view"]) main#tfpCompetitionView.league-page .league-panel#manage {
    background:transparent!important;
  }
  body:is([data-page="league-view"],[data-page="tournament-view"]) main#tfpCompetitionView.league-page #manage .tfpx-manager-navigation+.tfp-manager-panel {
    margin-top:12px!important;
  }
}

/* Na komputerze rowniez ten sam jezyk wizualny: czytelna nawigacja i karty. */
@media (min-width:901px) {
  body:is([data-page="league-view"],[data-page="tournament-view"]) main#tfpCompetitionView.league-page #manage :is(#admin-panel,#tournament-admin-panel) .tfpx-manager-navigation > .tfp-manager-tabs > .tfp-manager-tab {
    min-height:43px!important;border-radius:9px!important;font-size:13px!important;
  }
  body:is([data-page="league-view"],[data-page="tournament-view"]) main#tfpCompetitionView.league-page #manage :is(#admin-panel,#tournament-admin-panel) .tfpu-item-icon {
    display:inline-grid;place-items:center;width:25px;height:25px;margin-right:6px;color:#7139df;
  }
  body:is([data-page="league-view"],[data-page="tournament-view"]) main#tfpCompetitionView.league-page #manage :is(#admin-panel,#tournament-admin-panel) .tfpu-item-icon svg{width:18px;height:18px;stroke:currentColor}
}

/* NIE USUWAMY panelu Przeglad. Usuwamy tylko niepotrzebna plansze sezony,
   zachowujac jego dane operacyjne w pozostalym panelu. */
body[data-page="league-view"] main#tfpCompetitionView.league-page #manage .tfpli-hero.tfpli-season { display:none!important; }

/* Ostateczne pierwszenstwo ikon nad starym globalnym "span[aria-hidden]{display:none}". */
body:is([data-page="league-view"],[data-page="tournament-view"]) main#tfpCompetitionView.league-page #manage :is(#admin-panel,#tournament-admin-panel) .tfpx-manager-navigation > .tfp-manager-tabs > .tfp-manager-tab > span.tfpu-item-icon[aria-hidden="true"] {
  display:inline-flex!important;align-items:center!important;justify-content:center!important;
}
@media (max-width:900px) {
  body:is([data-page="league-view"],[data-page="tournament-view"]) main#tfpCompetitionView.league-page #manage :is(#admin-panel,#tournament-admin-panel) .tfpx-nav-open .tfpx-section-chevron {transform:none!important;}
}
/* Naglowki sekcji publicznych na tej samej siatce — bez zmian tabel i innych danych. */
body:is([data-page="league-view"],[data-page="tournament-view"]) main#tfpCompetitionView.league-page .league-panel:not(#manage) > .league-section-head h2 {
  font-family:inherit!important;font-weight:800!important;letter-spacing:-.02em!important;color:#14324b!important;
  font-size:clamp(19px,2.5vw,24px)!important;line-height:1.3!important;
}
body:is([data-page="league-view"],[data-page="tournament-view"]) main#tfpCompetitionView.league-page .league-panel:not(#manage) > .league-section-head p {
  color:#66788a!important;line-height:1.55!important;
}
