/* nuLiga Dart Importer v4 – Frontend Widget
   Vereinsfarben DC Hawks: Blau #1a56db · Weiß · Schwarz
   Alle Farben mit !important um Theme-Überschreibungen zu verhindern */

.nli-widget {
    font-family: 'Barlow', 'Segoe UI', Arial, sans-serif !important;
    background: #111520 !important;
    border: 1px solid rgba(255,255,255,.08) !important;
    border-radius: 6px !important;
    overflow: hidden !important;
    color: #f0f4ff !important;
    margin: 1.5rem 0 !important;
    font-size: 1rem !important;
    box-sizing: border-box !important;
}

.nli-widget * {
    box-sizing: border-box !important;
}

/* Tabs */
.nli-widget .nli-tabs { display:flex !important; gap:2px !important; background:#0a0c10 !important; padding:4px !important; flex-wrap:wrap !important; border-bottom:1px solid rgba(255,255,255,.07) !important; margin:0 !important; }
.nli-widget .nli-tab { font-size:.75rem !important; letter-spacing:.1em !important; text-transform:uppercase !important; font-weight:600 !important; padding:8px 14px !important; border-radius:3px !important; border:none !important; background:transparent !important; color:rgba(240,244,255,.5) !important; cursor:pointer !important; line-height:1.3 !important; text-align:left !important; transition:background .15s,color .15s !important; }
.nli-widget .nli-tab:hover { color:#f0f4ff !important; background:rgba(255,255,255,.05) !important; }
.nli-widget .nli-tab--on { background:#1a56db !important; color:#fff !important; }
.nli-widget .nli-tab-sub { display:block !important; font-size:.62rem !important; font-weight:400 !important; letter-spacing:.05em !important; opacity:.7 !important; margin-top:1px !important; }

/* Panels */
.nli-widget .nli-panel { display:none !important; }
.nli-widget .nli-panel--on { display:block !important; }

/* Bar */
.nli-widget .nli-bar { display:flex !important; align-items:center !important; justify-content:space-between !important; padding:.8rem 1.2rem !important; background:#1c2233 !important; border-bottom:1px solid rgba(255,255,255,.07) !important; gap:1rem !important; flex-wrap:wrap !important; }
.nli-widget .nli-bar-label { font-size:.8rem !important; font-weight:600 !important; letter-spacing:.06em !important; text-transform:uppercase !important; display:block !important; color:#f0f4ff !important; }
.nli-widget .nli-bar-sub { font-size:.72rem !important; color:rgba(240,244,255,.45) !important; font-weight:300 !important; }
.nli-widget .nli-bar-src { font-size:.7rem !important; color:#3b82f6 !important; text-decoration:none !important; white-space:nowrap !important; letter-spacing:.06em !important; text-transform:uppercase !important; }
.nli-widget .nli-bar-src:hover { color:#93c5fd !important; }

/* DDV Info */
.nli-widget .nli-ddv-info { display:flex !important; align-items:center !important; gap:12px !important; padding:.55rem 1.2rem !important; background:rgba(26,86,219,.1) !important; border-bottom:1px solid rgba(255,255,255,.06) !important; flex-wrap:wrap !important; }
.nli-widget .nli-ddv-season { font-size:.72rem !important; letter-spacing:.1em !important; text-transform:uppercase !important; color:rgba(240,244,255,.45) !important; }
.nli-widget .nli-ddv-standing { font-size:.85rem !important; font-weight:600 !important; color:#3b82f6 !important; }

/* Fehler */
.nli-widget .nli-notice { padding:.75rem 1.2rem !important; font-size:.85rem !important; color:#f59e0b !important; background:rgba(245,158,11,.08) !important; border-bottom:1px solid rgba(255,255,255,.06) !important; }

/* Abschnitt-Kopf */
.nli-widget .nli-sec-head { padding:.55rem 1.2rem !important; font-size:.67rem !important; letter-spacing:.18em !important; text-transform:uppercase !important; color:rgba(240,244,255,.35) !important; background:#161b27 !important; border-bottom:1px solid rgba(255,255,255,.05) !important; font-weight:600 !important; }

/* Ergebnisse */
.nli-widget .nli-results { }
.nli-widget .nli-row { display:grid !important; grid-template-columns:1fr 84px 1fr 60px !important; align-items:center !important; padding:.7rem 1.2rem !important; border-bottom:1px solid rgba(255,255,255,.04) !important; gap:.7rem !important; transition:background .12s !important; }
.nli-widget .nli-row:last-child { border-bottom:none !important; }
.nli-widget .nli-row:hover { background:rgba(255,255,255,.025) !important; }
.nli-widget .nli-team { font-size:.86rem !important; color:#f0f4ff !important; overflow:hidden !important; text-overflow:ellipsis !important; white-space:nowrap !important; }
.nli-widget .nli-team-g { text-align:right !important; }
.nli-widget .nli-own { color:#3b82f6 !important; font-weight:600 !important; }
.nli-widget .nli-score { text-align:center !important; }
.nli-widget .nli-score-num { font-size:1.3rem !important; font-weight:700 !important; font-variant-numeric:tabular-nums !important; letter-spacing:.04em !important; display:block !important; line-height:1 !important; color:#f0f4ff !important; }
.nli-widget .nli-meta { font-size:.7rem !important; color:rgba(240,244,255,.35) !important; text-align:right !important; white-space:nowrap !important; }
.nli-widget .nli-badge { display:inline-block !important; font-size:.6rem !important; font-weight:700 !important; letter-spacing:.1em !important; text-transform:uppercase !important; padding:2px 5px !important; border-radius:2px !important; margin-top:3px !important; }
.nli-widget .nli-badge-win  { background:rgba(34,197,94,.15) !important;  color:#22c55e !important; }
.nli-widget .nli-badge-draw { background:rgba(245,158,11,.15) !important; color:#f59e0b !important; }
.nli-widget .nli-badge-loss { background:rgba(239,68,68,.15) !important;  color:#ef4444 !important; }

/* Leer */
.nli-widget .nli-empty { padding:2rem 1.2rem !important; text-align:center !important; color:rgba(240,244,255,.35) !important; font-size:.88rem !important; font-style:italic !important; }
.nli-empty-msg { padding:1rem; color:#666; font-style:italic; }

/* Tabelle – alle Elemente explizit stylen */
.nli-widget .nli-table-wrap { overflow-x:auto !important; border-top:1px solid rgba(255,255,255,.06) !important; background:#111520 !important; }
.nli-widget .nli-table { width:100% !important; border-collapse:collapse !important; font-size:.84rem !important; background:transparent !important; }

.nli-widget .nli-table thead tr { background:#161b27 !important; }
.nli-widget .nli-table th { padding:.55rem 1rem !important; background:#161b27 !important; font-size:.64rem !important; letter-spacing:.15em !important; text-transform:uppercase !important; color:rgba(240,244,255,.5) !important; text-align:left !important; font-weight:600 !important; border-bottom:1px solid rgba(255,255,255,.08) !important; white-space:nowrap !important; border-top:none !important; }

.nli-widget .nli-table tbody tr { background:#111520 !important; }
.nli-widget .nli-table tbody tr:nth-child(even) { background:#131822 !important; }
.nli-widget .nli-table tbody tr:hover { background:rgba(255,255,255,.03) !important; }
.nli-widget .nli-table tbody tr:last-child td { border-bottom:none !important; }

.nli-widget .nli-table td { padding:.6rem 1rem !important; border-bottom:1px solid rgba(255,255,255,.04) !important; color:#c8d0e8 !important; font-weight:400 !important; white-space:nowrap !important; border-top:none !important; background:inherit !important; }

/* Links in der Tabelle */
.nli-widget .nli-table td a,
.nli-widget .nli-table th a { color:#c8d0e8 !important; text-decoration:none !important; }
.nli-widget .nli-table td a:hover { color:#f0f4ff !important; }

/* Eigene Mannschaft hervorheben */
.nli-widget .nli-own-row { background:rgba(26,86,219,.12) !important; }
.nli-widget .nli-own-row td { background:rgba(26,86,219,.12) !important; color:#7ba8f5 !important; font-weight:600 !important; border-bottom:1px solid rgba(26,86,219,.2) !important; }
.nli-widget .nli-own-row td a { color:#7ba8f5 !important; }
.nli-widget .nli-own-row:hover { background:rgba(26,86,219,.2) !important; }
.nli-widget .nli-own-row:hover td { background:rgba(26,86,219,.2) !important; }
.nli-widget .nli-pts { font-size:.95rem !important; font-weight:700 !important; color:#f0f4ff !important; }
.nli-widget .nli-own-row .nli-pts { color:#93c5fd !important; }

/* Footer */
.nli-widget .nli-footer { display:flex !important; justify-content:space-between !important; padding:.55rem 1.2rem !important; border-top:1px solid rgba(255,255,255,.05) !important; background:#0a0c10 !important; font-size:.67rem !important; color:rgba(240,244,255,.25) !important; flex-wrap:wrap !important; gap:.5rem !important; }

/* Responsive */
@media (max-width: 580px) {
    .nli-widget .nli-row { grid-template-columns:1fr 76px 1fr !important; }
    .nli-widget .nli-meta { display:none !important; }
    .nli-widget .nli-score-num { font-size:1.1rem !important; }
    .nli-widget .nli-table th,
    .nli-widget .nli-table td { padding:.5rem .6rem !important; font-size:.78rem !important; }
}

/* Nächste Spiele */
.nli-widget .nli-row--upcoming { grid-template-columns:1fr 90px 1fr 60px !important; }
.nli-widget .nli-score-vs { font-size:.75rem !important; font-weight:600 !important; letter-spacing:.1em !important; color:rgba(240,244,255,.4) !important; display:block !important; text-transform:uppercase !important; }
.nli-widget .nli-score-date { font-size:.72rem !important; color:#3b82f6 !important; display:block !important; margin-top:2px !important; }

/* ── Nächstes Spiel Widget ─────────────────────────────────────── */
.nli-next-inner { padding:1.5rem 1.2rem; text-align:center; }
.nli-next-date { font-size:.78rem; letter-spacing:.12em; text-transform:uppercase; color:rgba(240,244,255,.4) !important; margin-bottom:.8rem; }
.nli-next-match { display:flex; align-items:center; justify-content:center; gap:1.2rem; flex-wrap:wrap; margin-bottom:.8rem; }
.nli-next-team { font-size:1.05rem; font-weight:600; color:#f0f4ff !important; }
.nli-next-vs { font-size:.75rem; letter-spacing:.15em; color:rgba(240,244,255,.3) !important; text-transform:uppercase; }
.nli-next-countdown { font-size:.88rem; color:rgba(240,244,255,.5) !important; }
.nli-next-countdown strong { color:#3b82f6 !important; font-size:1.1rem; }
.nli-next-today { color:#22c55e !important; font-weight:700; font-size:1rem; }
.nli-next-soon { color:#f59e0b !important; font-weight:600; }
.nli-next-empty { padding:1rem 1.2rem; color:#888; font-style:italic; background:#111520; border-radius:6px; }

/* ── Ticker ─────────────────────────────────────────────────────── */
.nli-ticker { display:flex; align-items:center; background:#111520 !important; border:1px solid rgba(255,255,255,.08) !important; border-radius:6px !important; overflow:hidden !important; font-size:.84rem; height:42px; margin:1rem 0; }
.nli-ticker-label { flex-shrink:0; padding:0 1rem; font-size:.7rem; letter-spacing:.12em; text-transform:uppercase; color:rgba(240,244,255,.4) !important; border-right:1px solid rgba(255,255,255,.08) !important; white-space:nowrap; height:100%; display:flex; align-items:center; }
.nli-ticker-track { flex:1; overflow:hidden; position:relative; height:100%; }
.nli-ticker-inner { display:flex; align-items:center; gap:0; white-space:nowrap; animation:nliTickerScroll linear infinite; }
@keyframes nliTickerScroll { from { transform:translateX(0); } to { transform:translateX(-50%); } }
.nli-ticker-item { display:inline-flex; align-items:center; gap:.5rem; padding:0 1.2rem; color:#f0f4ff !important; }
.nli-ticker-sep { color:rgba(240,244,255,.2) !important; padding:0 .4rem; }
.nli-ticker-date { font-size:.72rem; color:rgba(240,244,255,.35) !important; }
.nli-ticker-badge-win  { color:#22c55e !important; font-weight:700; }
.nli-ticker-badge-draw { color:#f59e0b !important; font-weight:700; }
.nli-ticker-badge-loss { color:#ef4444 !important; font-weight:700; }

/* ── Kalender ───────────────────────────────────────────────────── */
.nli-cal .nli-bar { justify-content:space-between !important; }
.nli-cal-nav { color:#3b82f6 !important; text-decoration:none !important; font-size:1.3rem; font-weight:700; padding:0 .5rem; line-height:1; }
.nli-cal-nav:hover { color:#93c5fd !important; }
.nli-cal-grid { display:grid; grid-template-columns:repeat(7,1fr); gap:1px; background:rgba(255,255,255,.05) !important; padding:1px; }
.nli-cal-head { background:#161b27 !important; color:rgba(240,244,255,.4) !important; font-size:.65rem; letter-spacing:.12em; text-transform:uppercase; text-align:center; padding:.4rem 0; font-weight:600; }
.nli-cal-cell { background:#111520 !important; min-height:64px; padding:.3rem .4rem; position:relative; }
.nli-cal-cell.nli-cal-empty { background:#0d101a !important; }
.nli-cal-cell.nli-cal-today { background:rgba(26,86,219,.1) !important; }
.nli-cal-cell.nli-cal-has-game { background:#131a2a !important; }
.nli-cal-day { font-size:.72rem; color:rgba(240,244,255,.35) !important; display:block; margin-bottom:2px; }
.nli-cal-today .nli-cal-day { color:#3b82f6 !important; font-weight:700; }
.nli-cal-game { font-size:.64rem; line-height:1.3; margin-top:2px; padding:2px 3px; border-radius:2px; }
.nli-cal-game--win      { background:rgba(34,197,94,.1) !important; }
.nli-cal-game--loss     { background:rgba(239,68,68,.1) !important; }
.nli-cal-game--draw     { background:rgba(245,158,11,.1) !important; }
.nli-cal-game--upcoming { background:rgba(59,130,246,.1) !important; }
.nli-cal-team { color:#c8d0e8 !important; display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:100%; }
.nli-cal-team.nli-own { color:#3b82f6 !important; font-weight:600; }
.nli-cal-score { color:rgba(240,244,255,.6) !important; font-weight:700; font-size:.7rem; }
.nli-cal-export { display:flex; gap:8px; padding:.8rem 1.2rem; border-top:1px solid rgba(255,255,255,.06) !important; flex-wrap:wrap; background:#0a0c10 !important; }
.nli-cal-btn { display:inline-flex; align-items:center; gap:4px; padding:5px 12px; background:rgba(59,130,246,.15) !important; color:#3b82f6 !important; border:1px solid rgba(59,130,246,.3) !important; border-radius:3px; font-size:.78rem; text-decoration:none !important; cursor:pointer; font-family:inherit; }
.nli-cal-btn:hover { background:rgba(59,130,246,.25) !important; color:#93c5fd !important; }

/* Print */
@media print {
    .nli-cal-export, .nli-cal-nav, .nli-bar-src { display:none !important; }
    .nli-widget { border:1px solid #ccc !important; background:#fff !important; color:#000 !important; }
    .nli-cal-cell { background:#fff !important; border:1px solid #eee !important; }
}

/* Kompakt-Modus */
.nli-widget.nli-compact { font-size:.82rem !important; }
.nli-compact .nli-row { grid-template-columns:1fr 70px 1fr !important; padding:.45rem .8rem !important; }
.nli-compact .nli-score-num { font-size:1rem !important; }
.nli-compact .nli-meta { display:none !important; }
.nli-compact .nli-table th, .nli-compact .nli-table td { padding:.4rem .6rem !important; font-size:.76rem !important; }
.nli-compact .nli-bar { padding:.6rem .8rem !important; }
