
/* ======================= EFL League Table — DARK REDESIGN v1.4.4 =======================
   Założenia:
   - Mocny dark theme (grafit), wysoki kontrast, akcent EFL (#e54642)
   - Karty z dużym zaokrągleniem, głębokim cieniem i gradientem na nagłówkach
   - Top3 wiersze wyraźnie wyróżnione, hover "poświata"
   - Lepsza typografia i odstępy, sticky header/first col
   - Czytelność i dostępność (większe fonty, kontrasty)
======================================================================================== */

:root{
  --efl-bg:#0c0d0f;
  --efl-card:#121316;
  --efl-card-2:#17181c;
  --efl-stroke:rgba(255,255,255,.09);
  --efl-stroke-2:rgba(255,255,255,.14);
  --efl-text:#eef1f5;
  --efl-muted:#c9ced6;
  --efl-dim:#aeb4bf;
  --efl-accent:#e54642;
  --efl-accent-2:#ff6a66;
  --efl-green:#2ecc71;
  --efl-yellow:#f1c40f;
  --efl-red:#e74c3c;
}

.efl-league-table-section{
  margin: 28px 0;
  padding: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.01));
  border: 1px solid var(--efl-stroke);
  border-radius: 16px;
  box-shadow: 0 14px 40px rgba(0,0,0,.35);
}

.efl-badge{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin-bottom:12px;
  padding: 6px 10px;
  background: linear-gradient(90deg, var(--efl-accent), var(--efl-accent-2));
  color:#fff;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing:.02em;
  text-shadow: 0 1px 0 rgba(0,0,0,.35);
}

/* Wrapper */
.efl-table-wrap{
  background: var(--efl-card);
  color: var(--efl-text);
  border:1px solid var(--efl-stroke);
  border-radius: 14px;
  overflow:hidden;
}

/* Tabela bazowa */
.efl-table-wrap table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  font-size:15px;
  line-height:1.35;
}

/* Nagłówki */
.efl-table-wrap thead th{ background: transparent !important; border-bottom:1px solid rgba(255,255,255,.12);  color:#fff; 
  position:sticky;
  top:0;
  z-index:2;
  
  
  text-transform:uppercase;
  letter-spacing:.04em;
  font-weight:800;
  padding:14px 14px;
  border-bottom:1px solid var(--efl-stroke-2);
}

/* Kolumny i wiersze */
.efl-table-wrap tbody th,
.efl-table-wrap tbody td{
  padding:12px 14px;
  border-bottom:1px solid var(--efl-stroke);
  vertical-align:middle;
  background: var(--efl-card);
}

/* Sticky pierwsza kolumna (zwykle # / Team) */
.efl-table-wrap tbody th,
.efl-table-wrap tbody td:first-child{
  position:sticky;
  left:0;
  z-index:1;
  background: var(--efl-card-2);
  border-right:1px solid var(--efl-stroke);
  font-weight:700;
}

/* Hover poświata */
.efl-table-wrap tbody tr{
  transition: background .18s ease, box-shadow .18s ease, transform .18s ease;
}
.efl-table-wrap tbody tr:hover{
  background: rgba(255,255,255,.045);
  box-shadow: 0 0 0 1px rgba(255,255,255,.06) inset;
}

/* Top 3 miejsca — bardziej widoczne */
.efl-table-wrap tbody tr:nth-child(1){ background: rgba(229,70,66,.12); }
.efl-table-wrap tbody tr:nth-child(2){ background: rgba(229,70,66,.08); }
.efl-table-wrap tbody tr:nth-child(3){ background: rgba(229,70,66,.05); }

/* Linki drużyn */
.efl-table-wrap tbody a{
  color: var(--efl-text);
  font-weight:700;
  text-decoration:none;
}
.efl-table-wrap tbody a:hover{ color:#fff; text-decoration:underline; }

/* Pkt ostatnia kolumna — mocne wyróżnienie i wyrównanie do prawej */
.efl-table-wrap thead th:last-child,
.efl-table-wrap tbody td:last-child{
  text-align:right;
  font-weight:900;
  font-variant-numeric: tabular-nums;
}

/* Kapsułki i etykiety */
.efl-pill{
  display:inline-block;
  padding:4px 10px;
  border-radius:999px;
  background: rgba(255,255,255,.12);
  color: var(--efl-text);
  font-weight:800;
  line-height:1;
}
.efl-pill--win{ background: rgba(46,204,113,.18); color:#dff7ea; }
.efl-pill--draw{ background: rgba(241,196,15,.18); color:#fff7d6; }
.efl-pill--loss{ background: rgba(231,76,60,.18); color:#ffe2e0; }

/* Nazwa drużyny z mini-emblematem (jeśli motyw wstawi obrazek) */
.efl-team{
  display:flex; align-items:center; gap:10px; font-weight:800;
}
.efl-team img{ width:24px; height:24px; object-fit:cover; border-radius:4px; box-shadow:0 0 0 1px var(--efl-stroke); }

/* Delikatne zaokrąglenia na krawędziach tabeli */
.efl-table-wrap table thead th:first-child{ border-top-left-radius: 14px; }
.efl-table-wrap table thead th:last-child{ border-top-right-radius: 14px; }
.efl-table-wrap table tbody tr:last-child td:first-child{ border-bottom-left-radius: 14px; }
.efl-table-wrap table tbody tr:last-child td:last-child{ border-bottom-right-radius: 14px; }

/* Paski przewijania poziomego — ciemne i smukłe */
.efl-table-wrap{ overflow:auto; }
.efl-table-wrap::-webkit-scrollbar{ height:10px; }
.efl-table-wrap::-webkit-scrollbar-track{ background: #0e0f12; }
.efl-table-wrap::-webkit-scrollbar-thumb{ background:#2a2d34; border-radius:6px; }
.efl-table-wrap::-webkit-scrollbar-thumb:hover{ background:#383c45; }

/* Mobile — większe klikalne obszary, mniejszy font-rozmiar nagłówków */
@media (max-width: 680px){
  .efl-league-table-section{ padding: 12px; }
  .efl-badge{ font-size:14px; padding:6px 10px; }
  .efl-table-wrap thead th{ background: transparent !important; border-bottom:1px solid rgba(255,255,255,.12);  color:#fff;  padding:12px; font-size:12px; }
  .efl-table-wrap tbody th, .efl-table-wrap tbody td{ padding:12px; }
}


/* === EFL quick style bump === */
.efl-table-wrap tbody a,
.efl-table-wrap tbody .sp-team a,
.efl-table-wrap tbody td a {
  color: #fff !important;
  font-weight: 800 !important;
  text-decoration: none;
}

/* PTS column (last column) bold everywhere */
.efl-table-wrap thead th:last-child,
.efl-table-wrap tbody td:last-child {
  font-weight: 900 !important;
}


/* === EFL STYLE2 update === */
/* Kolumna MSC pogrubiona i biała */
.efl-table-wrap thead th:first-child,
.efl-table-wrap tbody td:first-child {
  font-weight: 900 !important;
  color: #fff !important;
}

/* Nadpisanie tła wyróżnienia (highlighted row) */
.sp-data-table .sp-highlight,
.sp-data-table .highlighted td,
.sp-template-scoreboard td:hover {
  background: rgba(229,70,66,.08) !important;
  color: #fff !important;
}


/* === EFL STYLE5 (JS logo column) === */
.efl-col-logo { width: 44px; text-align:center; }
.efl-col-logo img{ width:24px; height:24px; border-radius:4px; object-fit:cover; box-shadow:0 0 0 1px rgba(255,255,255,.15); }
.efl-col-logo .--empty{ display:inline-block; width:24px; height:24px; border-radius:4px; background:rgba(255,255,255,.06); opacity:.2; }

/* Force club name white & bold */
.efl-table-wrap tbody td:nth-child(3) a { color:#fff !important; font-weight:800 !important; }


/* === EFL STYLE6 adjustments === */
/* MSC header color same as others (override earlier white) */
.efl-table-wrap thead th:first-child { color: inherit !important; }
/* Subtle row hover highlight */
.efl-table-wrap tbody tr:hover { background: rgba(255,255,255,.06) !important; }
/* Ensure club link inline without extra indent */
.efl-table-wrap tbody td:nth-child(3) a { display:inline-block; margin-left:0 !important; }


/* === EFL STYLE7 highlight vs hover fix === */
/* Neutralize SportPress 'highlighted' row background so it doesn't stay always-on */
.sp-data-table .sp-highlight,
.sp-data-table .highlighted td {
  background: transparent !important;
}

/* Keep our hover visible on all rows */
.efl-table-wrap tbody tr:hover {
  background: rgba(255,255,255,.06) !important;
}

/* Optional: subtle outline for highlighted row without filling background */
.sp-data-table tr.highlighted td,
.sp-data-table .sp-highlight td {
  box-shadow: inset 0 0 0 1px rgba(229,70,66,.35);
}


/* === EFL STYLE9 (force hover) === */
/* Neutralize any persistent row backgrounds inside our wrapper */
.efl-table-wrap table.sp-data-table tbody tr,
.efl-table-wrap table.sp-data-table tbody tr td {
  background: transparent !important;
}

/* Re-apply our subtle top3 after neutralization */
.efl-table-wrap table.sp-data-table tbody tr:nth-child(1) td { background: rgba(229,70,66,.12) !important; }
.efl-table-wrap table.sp-data-table tbody tr:nth-child(2) td { background: rgba(229,70,66,.08) !important; }
.efl-table-wrap table.sp-data-table tbody tr:nth-child(3) td { background: rgba(229,70,66,.05) !important; }

/* Strong hover selector applied to TDs so it wins */
.efl-table-wrap table.sp-data-table tbody tr:hover td {
  background: rgba(255,255,255,.06) !important;
}


/* === EFL STYLE10 === */
/* MSC. header same red as other headers */
.efl-table-wrap thead th:first-child {
  color: var(--efl-accent, #e54642) !important;
}

/* Responsywność: na węższych ekranach tabela ma minimalną szerokość
   aby nazwy klubów się nie ściskały; można ją przewijać poziomo. */
@media (max-width: 900px){
  .efl-table-wrap{
    overflow-x:auto;
  }
  .efl-table-wrap table{
    min-width:600px;
  }
  .efl-table-wrap tbody td:nth-child(3) a{
    display:block;
    white-space:normal;
    word-break:break-word;
  }
}

/* Drobny tweak dla nagłówków natywnych tabel SportPress */
.sp-sortable-table thead tr{
  background-color: #111;
}
