/* Africa Football Tables – Pro UI (scoped) */
/* Progressive enhancement (mobile-safe):
   - BEFORE JS init: show all panels (never blank)
   - AFTER JS init: only show active panel
*/
.aft-widget:not(.aft-ready) .aft-panel{display:block!important}
.aft-widget.aft-ready .aft-panel{display:none!important}
.aft-widget.aft-ready .aft-panel.is-active{display:block!important}

.aft-widget{--aft-border:#e7e7e7;--aft-soft:#f6f7f9;--aft-text:#111827;--aft-muted:#6b7280;max-width:980px;margin:24px auto;color:var(--aft-text);font-family:system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;line-height:1.4}
.aft-widget,.aft-widget *{box-sizing:border-box}
.aft-tabs{display:flex;gap:10px;border-bottom:1px solid var(--aft-border);margin:0 0 16px;padding:0 0 6px;flex-wrap:wrap}
.aft-tab{appearance:none;border:1px solid transparent;background:transparent;padding:10px 12px;border-radius:999px;cursor:pointer;font-weight:800;color:var(--aft-muted);transition:all .15s ease}
.aft-tab:hover{background:var(--aft-soft);color:var(--aft-text)}
.aft-tab.is-active{background:var(--aft-text);color:#fff;border-color:var(--aft-text)}
.aft-card{background:#fff;border:1px solid var(--aft-border);border-radius:16px;padding:14px;margin:14px 0;box-shadow:0 6px 18px rgba(17,24,39,.06)}
.aft-card-title{font-size:16px;font-weight:900;margin:2px 0 12px}
.aft-table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch;border-radius:12px;border:1px solid var(--aft-border)}
.aft-table{width:100%;min-width:760px;border-collapse:collapse;background:#fff}
.aft-table thead th{background:var(--aft-soft);color:var(--aft-muted);font-weight:900;font-size:12px;text-transform:uppercase;letter-spacing:.04em;padding:12px 10px;border-bottom:1px solid var(--aft-border);white-space:nowrap}
.aft-table td{padding:12px 10px;border-bottom:1px solid #f0f1f3;font-size:14px;white-space:nowrap}
.aft-team{display:flex;align-items:center;gap:10px;font-weight:850}
.aft-crest{width:22px;height:22px;border-radius:999px;object-fit:contain;background:#fff;border:1px solid #efefef}
.aft-pts{font-weight:950}
.aft-roundbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:4px 0 14px;flex-wrap:wrap}
.aft-roundlabel{font-weight:900}
.aft-roundselect{width:min(420px,100%);padding:10px 12px;border-radius:12px;border:1px solid var(--aft-border);background:#fff;font-weight:800}
.aft-fixtures,.aft-live{display:grid;grid-template-columns:1fr;gap:12px}
@media (min-width:880px){.aft-fixtures{grid-template-columns:1fr 1fr}}
.aft-fixture-card{border:1px solid var(--aft-border);border-radius:16px;padding:14px;background:#fff;box-shadow:0 6px 18px rgba(17,24,39,.06);display:flex;align-items:center;justify-content:space-between;gap:12px}
.aft-fixture-teams{display:flex;flex-wrap:wrap;align-items:center;gap:12px}
.aft-fixture-team{display:flex;align-items:center;gap:8px;font-weight:900}
.aft-fixture-meta{text-align:right;display:grid;gap:6px;font-weight:900;color:var(--aft-muted)}
.aft-score{display:inline-flex;align-items:baseline;gap:8px;font-weight:950;padding:6px 10px;border-radius:999px;background:var(--aft-soft);border:1px solid var(--aft-border)}
.aft-score-num{font-size:16px}
.aft-score-sep{opacity:.7}
.aft-badge{display:inline-flex;justify-content:center;align-items:center;padding:6px 10px;border-radius:999px;background:#111;color:#fff;font-size:12px;letter-spacing:.02em}
.aft-clickable{cursor:pointer}
.aft-livebar{display:flex;justify-content:space-between;align-items:baseline;margin:6px 0 14px;flex-wrap:wrap}
.aft-live-title{font-weight:950;font-size:16px}
.aft-live-meta{color:var(--aft-muted);font-weight:900;font-size:13px}
.aft-players-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
@media (min-width:900px){.aft-players-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
.aft-player-card{border:1px solid var(--aft-border);border-radius:16px;overflow:hidden;background:#fff;box-shadow:0 6px 18px rgba(17,24,39,.06)}
.aft-player-photo{width:100%;height:170px;object-fit:cover;display:block;background:var(--aft-soft)}
.aft-player-name{padding:12px 12px 4px;font-weight:950}
.aft-player-meta{padding:0 12px 12px;color:var(--aft-muted);font-weight:800}
.aft-error,.aft-empty{border-radius:14px;padding:12px 14px;border:1px solid var(--aft-border);background:var(--aft-soft);font-weight:800}
.aft-modal{position:fixed;inset:0;display:none;z-index:99999}
.aft-modal.is-open{display:block}
.aft-modal-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.55)}
.aft-modal-dialog{position:relative;margin:5vh auto;width:min(980px,92vw);max-height:90vh;overflow:auto;background:#fff;border-radius:18px;border:1px solid var(--aft-border);box-shadow:0 30px 80px rgba(0,0,0,.25)}
.aft-modal-close{position:sticky;top:0;float:right;border:0;background:transparent;font-size:28px;line-height:1;padding:10px 14px;cursor:pointer;color:#111}
.aft-modal-body{padding:16px 16px 20px}
.aft-mc-title{font-weight:950;font-size:18px}
.aft-mc-score{padding:2px 8px;border-radius:999px;background:var(--aft-soft);border:1px solid var(--aft-border)}
.aft-mc-sub{color:var(--aft-muted);font-weight:900;margin-top:4px}
.aft-mc-grid{display:grid;gap:12px;grid-template-columns:1fr}
@media (min-width:900px){.aft-mc-grid{grid-template-columns:1fr 1fr}}
.aft-mc-section{border:1px solid var(--aft-border);background:#fff;border-radius:16px;padding:14px;box-shadow:0 6px 18px rgba(17,24,39,.06)}
.aft-mc-section-title{font-weight:950;margin-bottom:10px}
.aft-mc-events{list-style:none;padding:0;margin:0;display:grid;gap:10px}
.aft-mc-events li{display:grid;gap:2px;padding-bottom:10px;border-bottom:1px dashed #eee}
.aft-mc-minute{font-weight:950}
.aft-mc-event-main{font-weight:900}
.aft-mc-event-meta{color:var(--aft-muted);font-weight:800}
.aft-mc-stats{width:100%;border-collapse:collapse}
.aft-mc-stats th{text-align:left;font-size:12px;text-transform:uppercase;letter-spacing:.04em;padding:10px 8px;color:var(--aft-muted);background:var(--aft-soft);border-bottom:1px solid var(--aft-border)}
.aft-mc-stats td{padding:10px 8px;border-bottom:1px solid #f0f1f3;font-weight:900}
.aft-mc-stattype{color:var(--aft-muted);font-weight:950}
.aft-mc-lineups{display:grid;gap:12px}
@media (min-width:900px){.aft-mc-lineups{grid-template-columns:1fr 1fr}}
.aft-mc-lu-title{font-weight:950;margin-bottom:8px}
.aft-mc-xi{margin:0;padding-left:18px;display:grid;gap:6px;font-weight:900}
