@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700;800&display=swap');

/* === Vars === */
.lsp-widget, .lsp-card {
    --lsp-accent:#1a73e8;--lsp-cl:#1e88e5;--lsp-el:#f57c00;--lsp-ecl:#43a047;--lsp-rel:#e53935;
    --c-bg:#fff;--c-card:#fff;--c-bdr:#e4e7eb;--c-txt:#1a1d26;--c-txt2:#6b7080;
    --c-head:#f5f6f8;--c-htxt:#3c4055;--c-hover:#f0f2f5;--c-alt:#fafbfc;
    --c-sh:0 1px 4px rgba(0,0,0,.06);--c-sh2:0 4px 16px rgba(0,0,0,.09);
    --r:12px;--rs:8px;--font:'Tajawal',-apple-system,sans-serif;--tr:.18s ease;
}
.lsp-dark {
    --c-bg:#111827;--c-card:#1a2236;--c-bdr:#2d3548;--c-txt:#e4e6f0;--c-txt2:#8b90a8;
    --c-head:#1e2740;--c-htxt:#b8bdd0;--c-hover:#222c42;--c-alt:#171f32;
    --c-sh:0 1px 4px rgba(0,0,0,.25);--c-sh2:0 4px 16px rgba(0,0,0,.35);
}

/* === Widget === */
.lsp-widget{font-family:var(--font);direction:rtl;max-width:920px;margin:0 auto}

/* ==========================================
   COMPACT NAV / TABS
   ========================================== */
.lsp-nav{
    background:var(--c-card);border:1px solid var(--c-bdr);border-radius:var(--r);
    margin-bottom:14px;overflow:hidden;box-shadow:var(--c-sh);
}
.lsp-nav-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:none}
.lsp-nav-scroll::-webkit-scrollbar{display:none}
.lsp-nav-items{display:flex;gap:3px;padding:6px 8px;min-width:max-content}
.lsp-nav-btn{
    display:inline-flex;align-items:center;gap:5px;
    padding:6px 12px;
    border:none;background:transparent;
    color:var(--c-txt2);font-family:var(--font);
    font-size:12.5px;font-weight:600;
    cursor:pointer;border-radius:6px;
    white-space:nowrap;transition:all var(--tr);line-height:1.3;
}
.lsp-nav-btn:hover{background:var(--c-hover);color:var(--c-txt)}
.lsp-nav-active{
    background:linear-gradient(135deg,#0d1b2a,#18253a)!important;
    color:#fff!important;font-weight:700;
    box-shadow:0 1px 6px rgba(0,0,0,.2);
}
.lsp-nav-icon{width:18px;height:18px;object-fit:contain;border-radius:3px;flex-shrink:0}

/* ==========================================
   STANDINGS CARD
   ========================================== */
.lsp-card{
    font-family:var(--font);direction:rtl;
    background:var(--c-card);border-radius:var(--r);
    box-shadow:var(--c-sh);border:1px solid var(--c-bdr);
    overflow:hidden;max-width:920px;margin:0 auto;
    transition:box-shadow var(--tr);
}
.lsp-card:hover{box-shadow:var(--c-sh2)}

/* League header: dark, compact, aligned */
.lsp-hdr{
    display:flex;align-items:center;gap:12px;
    padding:12px 16px;
    background:linear-gradient(135deg,#0b1622 0%,#14213d 55%,#1a1a2e 100%);
    color:#fff;
}
.lsp-hdr-badge{
    width:36px;height:36px;flex-shrink:0;
    display:flex;align-items:center;justify-content:center;
    background:rgba(255,255,255,.10);border-radius:8px;
    border:1px solid rgba(255,255,255,.07);
}
.lsp-hdr-badge img{width:24px;height:24px;object-fit:contain}
.lsp-hdr-text{display:flex;flex-direction:column;gap:1px;min-width:0}
.lsp-hdr-title{font-size:15px;font-weight:800;margin:0;line-height:1.2;color:#fff}
.lsp-hdr-sub{font-size:11px;font-weight:500;color:rgba(255,255,255,.5);letter-spacing:.02em}

/* ==========================================
   TABLE
   ========================================== */
.lsp-tbl-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:thin;scrollbar-color:var(--c-bdr) transparent}
.lsp-tbl-wrap::-webkit-scrollbar{height:3px}
.lsp-tbl-wrap::-webkit-scrollbar-thumb{background:var(--c-bdr);border-radius:2px}
.lsp-tbl{width:100%;border-collapse:collapse;font-size:13.5px;line-height:1.4;table-layout:auto}
.lsp-tbl thead tr{background:var(--c-head);border-bottom:2px solid var(--c-bdr)}
.lsp-tbl th{padding:9px 10px;font-size:11px;font-weight:700;color:var(--c-htxt);text-align:center;white-space:nowrap;text-transform:uppercase;letter-spacing:.04em}
.lsp-tbl th.lc-team{text-align:right;padding-right:14px}
.lsp-tbl th.lc-position{width:40px;min-width:40px}
.lsp-tbl tbody tr{border-bottom:1px solid var(--c-bdr);transition:background var(--tr)}
.lsp-tbl tbody tr:last-child{border-bottom:none}
.lsp-tbl tbody tr:nth-child(even){background:var(--c-alt)}
.lsp-tbl tbody tr:hover{background:var(--c-hover)}
.lsp-tbl td{padding:9px 10px;text-align:center;color:var(--c-txt);font-size:13.5px;font-weight:500;white-space:nowrap;vertical-align:middle}

/* Position */
.lc-position{position:relative;width:40px;min-width:40px}
.lsp-pos{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:6px;font-size:11px;font-weight:700;color:var(--c-txt2);background:var(--c-head)}
.lsp-zbar{position:absolute;right:0;top:0;bottom:0;width:3px;border-radius:0 3px 3px 0}
.lsp-zb-champions_league{background:var(--lsp-cl)}.lsp-zb-europa_league{background:var(--lsp-el)}.lsp-zb-conference_league{background:var(--lsp-ecl)}.lsp-zb-relegation{background:var(--lsp-rel)}
.lsp-z-champions_league .lsp-pos{background:var(--lsp-cl);color:#fff}
.lsp-z-europa_league .lsp-pos{background:var(--lsp-el);color:#fff}
.lsp-z-conference_league .lsp-pos{background:var(--lsp-ecl);color:#fff}
.lsp-z-relegation .lsp-pos{background:var(--lsp-rel);color:#fff}

/* Team */
.lc-team{text-align:right!important;padding-right:14px!important}
td.lc-team{display:flex;align-items:center;gap:7px;min-width:150px}
.lsp-tlogo{width:22px;height:22px;object-fit:contain;border-radius:3px;flex-shrink:0;background:var(--c-head);padding:1px;cursor:pointer;transition:transform .15s}
.lsp-tlogo:hover{transform:scale(1.12)}
.lsp-tname{font-weight:600;color:var(--c-txt);overflow:hidden;text-overflow:ellipsis;max-width:170px;display:inline-block}
.lsp-tlink{color:var(--c-txt);text-decoration:none;transition:color .15s}
.lsp-tlink:hover{color:var(--lsp-accent);text-decoration:underline}

/* Points / GD */
.lsp-pts{font-weight:800!important;font-size:14px!important;color:var(--lsp-accent)!important}
.lsp-gd-p{color:#0d8a3e!important}.lsp-gd-n{color:#c62828!important}

/* Form badges */
.lsp-form{display:inline-flex;gap:2px}
.lsp-fb{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;border-radius:4px;font-size:9px;font-weight:700;color:#fff}
.lsp-fb-w{background:#2e7d32}.lsp-fb-d{background:#ef6c00}.lsp-fb-l{background:#c62828}

/* Legend */
.lsp-legend{display:flex;flex-wrap:wrap;gap:12px;padding:8px 16px;border-top:1px solid var(--c-bdr);background:var(--c-head)}
.lsp-lg-i{display:inline-flex;align-items:center;gap:4px;font-size:10.5px;color:var(--c-txt2);font-weight:500}
.lsp-dot{width:9px;height:9px;border-radius:3px;flex-shrink:0}
.lsp-d-cl{background:var(--lsp-cl)}.lsp-d-el{background:var(--lsp-el)}.lsp-d-ecl{background:var(--lsp-ecl)}.lsp-d-rel{background:var(--lsp-rel)}

/* Updated */
.lsp-upd{padding:7px 16px;font-size:10.5px;color:var(--c-txt2);border-top:1px solid var(--c-bdr);text-align:center;background:var(--c-head)}

/* Error */
.lsp-err{font-family:var(--font);direction:rtl;max-width:920px;margin:0 auto;background:var(--c-card);border-radius:var(--r);box-shadow:var(--c-sh);border:1px solid var(--c-bdr)}
.lsp-err-c{padding:36px 20px;text-align:center;color:var(--c-txt2)}
.lsp-err-c svg{opacity:.35;margin-bottom:8px}
.lsp-err-c p{font-size:14px;font-weight:600;margin:0;color:var(--c-txt)}

/* Density */
.lsp-density-compact .lsp-tbl th{padding:6px 7px;font-size:10px}.lsp-density-compact .lsp-tbl td{padding:5px 7px;font-size:12.5px}.lsp-density-compact .lsp-tlogo{width:18px;height:18px}.lsp-density-compact .lsp-pos{width:20px;height:20px;font-size:10px}
.lsp-density-comfortable .lsp-tbl th{padding:13px}.lsp-density-comfortable .lsp-tbl td{padding:13px;font-size:15px}.lsp-density-comfortable .lsp-tlogo{width:26px;height:26px}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media(max-width:768px){
    .lsp-card{border-radius:var(--rs)}.lsp-nav{border-radius:var(--rs)}
    .lsp-nav-items{padding:5px 6px;gap:2px}.lsp-nav-btn{padding:5px 9px;font-size:11.5px}.lsp-nav-icon{width:15px;height:15px}
    .lsp-hdr{padding:10px 12px;gap:9px}.lsp-hdr-badge{width:32px;height:32px;border-radius:7px}.lsp-hdr-badge img{width:20px;height:20px}
    .lsp-hdr-title{font-size:13.5px}.lsp-hdr-sub{font-size:10px}
    .lsp-tbl{font-size:12px}.lsp-tbl th{padding:7px 5px;font-size:9.5px}.lsp-tbl td{padding:7px 5px;font-size:12px}
    .lc-position{width:34px;min-width:34px}.lsp-pos{width:20px;height:20px;font-size:10px;border-radius:5px}
    .lsp-tlogo{width:18px;height:18px}td.lc-team{min-width:110px;gap:5px}.lsp-tname{max-width:100px;font-size:11.5px}
    .lsp-pts{font-size:12.5px!important}
    .lsp-legend{padding:6px 10px;gap:8px}.lsp-lg-i{font-size:9.5px}
    .lsp-tbl th.lc-position,.lsp-tbl td.lc-position{position:sticky;right:0;z-index:3;background:inherit}
    .lsp-tbl thead th.lc-position{background:var(--c-head)}
    .lsp-tbl tbody tr:nth-child(even) td.lc-position{background:var(--c-alt)}
    .lsp-tbl tbody tr:nth-child(odd) td.lc-position{background:var(--c-card)}
}
@media(max-width:480px){
    .lsp-tbl th,.lsp-tbl td{padding:5px 3px}td.lc-team{min-width:90px}.lsp-tname{max-width:75px;font-size:11px}
    .lsp-fb{width:15px;height:15px;font-size:8px;border-radius:3px}
    .lsp-hdr{padding:8px 10px;gap:7px}.lsp-hdr-badge{width:28px;height:28px}.lsp-hdr-badge img{width:18px;height:18px}.lsp-hdr-title{font-size:12.5px}
}


/* stronger in-page tabs behavior */
.lsp-league-panel[hidden]{display:none !important}
.lsp-panels{position:relative}

/* clearer league header */
.lsp-hdr{justify-content:flex-start}
.lsp-hdr-line{display:flex;align-items:center;gap:10px;flex-wrap:wrap;min-width:0}
.lsp-hdr-title{text-shadow:none !important;filter:none !important;background:none !important;box-shadow:none !important}
.lsp-hdr-sub{display:inline-flex;align-items:center;padding:2px 8px;border-radius:999px;background:rgba(255,255,255,.08);color:rgba(255,255,255,.82)}

/* compact, clearly clickable tabs */
.lsp-nav-btn{position:relative;z-index:2}
.lsp-nav-btn span{pointer-events:none}
.lsp-nav-btn .lsp-nav-icon{pointer-events:none}
.lsp-nav-btn:focus-visible{outline:2px solid var(--lsp-accent);outline-offset:2px}
