/* ==================================
   POLSTEAM TABLE – sortable + search
   Nagłówki: TEKO, CAPS, subtelne strzałki bez kółek
   Search: delikatny radius
   Thead: radius w rogach
   Mobile: Imię+Nazwisko sticky, reszta przewijana w prawo w wierszu
   ================================== */

:root{
  --ps-primary: var(--polsteam-primary, #00357d);
  --ps-red: var(--polsteam-red, #dd291b);
  --ps-text: #171718;
  --ps-muted: rgba(23,23,24,.76);
  --ps-line: rgba(0,0,0,.14);
  --ps-line-soft: rgba(0,0,0,.10);
}

.polsteam-table{
  padding: 110px 40px;
  color: var(--ps-text);
}

.polsteam-table__header{
  max-width: 1400px;
  margin: 0 auto 16px;
}

.polsteam-table__title{
  margin:0 0 8px;
  font-family: "Teko", sans-serif;
  line-height:0.95;
  letter-spacing:.5px;
  font-size: clamp(44px, 5.6vw, 86px);
}
.polsteam-table__title strong{
  font-weight:500;
  color: var(--ps-red);
}
.polsteam-table__title span{
  font-weight:400;
  opacity:.9;
}

.polsteam-table__lead{
  margin:0;
  max-width: 980px;
  font-family: "Poppins", sans-serif;
  font-size: 16px;
  line-height: 1.85;
  color: rgba(23,23,24,.78);
  font-weight: 300;
}

/* SEARCH */
.polsteam-table__toolbar{
  max-width: 1400px;
  margin: 14px auto 16px;
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap: wrap;
}

.polsteam-table__search{
  position:relative;
  flex: 20px;
  max-width: 220px;
}

.polsteam-table__search input{
  width:100%;
  height:44px;
  padding: 10px 40px 10px 14px;
  border-radius: 10px; /* ✅ bardziej “kwadratowe”, delikatny radius */
  border: 1px solid rgba(0,0,0,.18);
  background: rgba(255,255,255,.92);

  font-family: "Poppins", sans-serif;
  font-size:14px;
  color: #000;

  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.polsteam-table__search input:focus{
  border-color: rgba(0,53,125,.45);
  box-shadow: 0 0 0 4px rgba(0,53,125,.14);
}

/* clear X – bez kółka, minimalistycznie */
.polsteam-table__search button{
  position:absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border: none;
  background: transparent;
  cursor:pointer;
  padding:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  opacity:.75;
  transition: opacity .18s ease, transform .18s ease;
}
.polsteam-table__search button::before{
  content:"×";
  font-size:20px;
  line-height:1;
  color: rgba(0,0,0,.62);
}
.polsteam-table__search button:hover{
  opacity:1;
  transform: translateY(-50%) scale(1.06);
}

.polsteam-table__meta{
  font-family: "Poppins", sans-serif;
  font-size:13px;
  color: rgba(23,23,24,.62);
}

/* WRAP */
.polsteam-table__wrap{
  max-width:1400px;
  margin: 0 auto;
  overflow:auto;
  border-top:1px solid var(--ps-line);
  border-bottom:1px solid var(--ps-line);
  border-radius: 12px; /* żeby nagłówek mógł mieć radius w rogach */
}

/* TABLE */
.polsteam-table__table{
  width:100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 1100px;
}

/* THEAD – niebieski + radius rogów */
.polsteam-table__table thead th{
  position: sticky;
  top: 0;
  z-index: 2;

  background: var(--ps-primary);
  color: rgba(255,255,255,.92);

  text-align:left;
  padding: 13px 14px;
  border-bottom: 1px solid rgba(255,255,255,.18);

  /* ✅ Teko + CAPS, mniej inwazyjne */
  font-family: "Teko", sans-serif;
  font-size: 20px;
  font-weight: 400;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ✅ radius tylko na skrajnych th w pierwszym wierszu nagłówka */
.polsteam-table__table thead th:first-child{
  border-top-left-radius: 12px;
}
.polsteam-table__table thead th:last-child{
  border-top-right-radius: 12px;
}

/* Nagłówek + strzałki: układ */
.ps-th{
  display:inline-flex;
  align-items:center;
  gap:10px;
}

/* Sort button – same strzałki (bez circle) */
.ps-sortbtn{
  position: static;         /* ✅ już nie absolute */
  width:auto;
  height:auto;
  border: none;
  background: transparent;
  padding:0;
  margin:0;
  cursor:pointer;

  display:inline-flex;
  align-items:center;
  justify-content:center;

  opacity:.88;
  transition: opacity .18s ease, transform .18s ease;
}

.ps-sortbtn::before{
  content:"↕";
  font-size: 16px;
  line-height: 1;
  color: rgba(255,255,255,.92);
}

th[data-sort-dir="asc"] .ps-sortbtn::before{ content:"↑"; }
th[data-sort-dir="desc"] .ps-sortbtn::before{ content:"↓"; }

.ps-sortbtn:hover{
  opacity:1;
  transform: translateY(-1px);
}

/* BODY */
.polsteam-table__table tbody td{
  padding: 14px 14px;
  border-bottom: 1px solid var(--ps-line-soft);
  vertical-align: top;

  font-family: "Poppins", sans-serif;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ps-muted);
}

.polsteam-table__table tbody tr:hover td{
  background: rgba(0,0,0,.02);
}

.polsteam-table__table tbody td:nth-child(2),
.polsteam-table__table tbody td:nth-child(3){
  color: #474747;
  font-weight: 500;
}

/* No results row */
.polsteam-table__empty td{
  padding: 18px 14px;
  color: rgba(23,23,24,.70);
  font-style: italic;
}

/* Focus */
.polsteam-table__wrap:focus{
  outline: 3px solid rgba(0,53,125,.30);
  outline-offset: 3px;
}

/* ============ MOBILE/TABLET: cała tabela przewijana w poziomie (razem z nagłówkiem) ============ */
@media (max-width: 980px){
  .polsteam-table{ padding: 84px 16px; }

  .polsteam-table__toolbar{
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .polsteam-table__search{
    max-width: none;
  }

  .polsteam-table__search{
    max-width: none;
  }

  .polsteam-table__wrap{
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    border-radius: 10px;
  }

  /* kluczowe: NIE łamiemy tabeli na bloki, tylko pozwalamy scrollować całość */
  .polsteam-table__table{
    min-width: 1100px;
  }

  .polsteam-table__table thead th{
    font-size: 18px;
  }
}

@media (prefers-reduced-motion: reduce){
  *{ transition:none !important; }
}

/* Nagłówki jako klikalne sortery */
.polsteam-table__table thead th{
  cursor: pointer;
}

.polsteam-table__table thead th:hover{
  filter: brightness(1.06);
}

.polsteam-table__table thead th:active{
  filter: brightness(1.10);
}

/* (stare nadpisywania dla mobile zostały usunięte) */
