/*
 * FF Ligatabelle – Frontend-Styles (seit 2.3.0 als Datei statt je Widget eingebettet).
 * Selektor :is(#fflt,.fflt-w) hat ID-Gewicht wie bisher #fvbb_xxx, trifft aber per Klasse –
 * so setzen sich Theme-/Elementor-Regeln (z.B. button-Stile) weiterhin nicht durch.
 */
:is(#fflt,.fflt-w) *, :is(#fflt,.fflt-w) *::before, :is(#fflt,.fflt-w) *::after {
  box-sizing: border-box; margin: 0; padding: 0;
}
:is(#fflt,.fflt-w) {
  --fvbb-red: #d0021b;
  --fvbb-red-light: rgba(208,2,27,0.08);
  --surface: #ffffff;
  --surface-alt: #f8f9fc;
  --border: #e2e6ef;
  --border-strong: #cdd2de;
  --text: #1a1d26;
  --text-sub: #4a5168;
  --muted: #8a92a8;
  --gold: #c8860a;
  --gold-bg: rgba(200,134,10,0.10);
  --silver: #6a7a92;
  --silver-bg: rgba(106,122,146,0.10);
  --bronze: #a05c28;
  --bronze-bg: rgba(160,92,40,0.10);
  --shadow: 0 2px 12px rgba(30,40,80,0.07);
  --shadow-lg: 0 4px 24px rgba(30,40,80,0.10);
  font-family: 'Barlow', sans-serif;
  color: var(--text);
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
}
:is(#fflt,.fflt-w) .widget-header {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 20px; padding-bottom: 16px;
  border-bottom: 2px solid var(--fvbb-red); position: relative;
}
:is(#fflt,.fflt-w) .widget-header::after {
  content: ''; position: absolute; bottom: -2px; left: 0;
  width: 60px; height: 2px; background: var(--gold);
}
:is(#fflt,.fflt-w) .sport-icon {
  width: 44px; height: 44px; background: #ffffff;
  border-radius: 8px; display: flex; align-items: center;
  justify-content: center; flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(208,2,27,0.25);
}
:is(#fflt,.fflt-w) .sport-icon img {
  width: 38px; height: 38px; object-fit: contain; border-radius: 5px;
}
:is(#fflt,.fflt-w) .league-name {
  font-family: 'Barlow Condensed', sans-serif; font-weight: 800;
  font-size: 22px; letter-spacing: 0.5px; line-height: 1;
  color: var(--text); text-transform: uppercase;
}
:is(#fflt,.fflt-w) .league-sub {
  font-size: 12px; color: var(--muted); margin-top: 2px;
  line-height: 1.2; font-weight: 500; letter-spacing: 0.8px; text-transform: uppercase;
}
:is(#fflt,.fflt-w) .ff-badge {
  margin-left: auto; flex-shrink: 0;
  display: flex; align-items: center;
  text-decoration: none; opacity: 0.7; transition: opacity 0.15s;
}
:is(#fflt,.fflt-w) .ff-badge:hover { opacity: 1; }
:is(#fflt,.fflt-w) .ff-badge img {
  height: 28px; width: auto; max-width: 90px; object-fit: contain;
}
/* Dropdown */
:is(#fflt,.fflt-w) .liga-dropdown-wrap { margin-bottom: 14px; }
:is(#fflt,.fflt-w) .liga-dropdown-label {
  display: block; font-size: 10px; font-weight: 700;
  letter-spacing: 0.8px; text-transform: uppercase;
  color: var(--muted); margin-bottom: 5px;
}
:is(#fflt,.fflt-w) .liga-select {
  width: 100%; padding: 9px 36px 9px 12px;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238a92a8' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 12px center;
  border: 1px solid var(--border-strong); border-radius: 8px;
  font-family: 'Barlow', sans-serif; font-size: 14px; font-weight: 600;
  color: var(--text); cursor: pointer; appearance: none;
  -webkit-appearance: none; box-shadow: var(--shadow);
  transition: border-color 0.15s, box-shadow 0.15s;
}
:is(#fflt,.fflt-w) .liga-select:focus {
  outline: none; border-color: var(--fvbb-red);
  box-shadow: 0 0 0 3px rgba(208,2,27,0.12);
}
:is(#fflt,.fflt-w) .liga-select:hover { border-color: var(--fvbb-red); }
/* Spielbetrieb & Saison Panel */
:is(#fflt,.fflt-w) .init-panel { margin-bottom: 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
:is(#fflt,.fflt-w) .init-panel-toggle { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 9px 14px; background: none; border: none; cursor: pointer; font-family: 'Barlow', sans-serif; font-size: 12px; font-weight: 600; color: var(--text-sub); text-align: left; transition: background 0.15s; }
:is(#fflt,.fflt-w) .init-panel-toggle:hover { background: var(--surface-alt); }
:is(#fflt,.fflt-w) .init-panel-arrow { font-size: 9px; color: var(--muted); transition: transform 0.2s; }
:is(#fflt,.fflt-w) .init-panel-coming { font-weight: 400; opacity: 0.6; font-style: italic; }
:is(#fflt,.fflt-w) .init-panel-body { padding: 0 10px 10px; border-top: 1px solid var(--border); }
:is(#fflt,.fflt-w) .init-row-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: var(--muted); padding: 8px 2px 4px; }
:is(#fflt,.fflt-w) .init-scroll-bar { display: flex; gap: 5px; flex-wrap: nowrap; overflow-x: auto; scroll-behavior: smooth; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 2px; }
:is(#fflt,.fflt-w) .init-scroll-bar::-webkit-scrollbar { display: none; }
:is(#fflt,.fflt-w) .init-loading { font-size: 11px; color: var(--muted); padding: 2px 4px; }
:is(#fflt,.fflt-w) .init-btn { flex-shrink: 0; font-family: 'Barlow Condensed', sans-serif; font-size: 12px; font-weight: 700; letter-spacing: 0.2px; padding: 5px 11px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface-alt); color: var(--text-sub); cursor: pointer; transition: all 0.15s; white-space: nowrap; line-height: 1.3; }
:is(#fflt,.fflt-w) .init-btn:hover { background: var(--fvbb-red-light); border-color: var(--fvbb-red); color: var(--fvbb-red); }
:is(#fflt,.fflt-w) .init-btn.active { background: var(--fvbb-red); border-color: var(--fvbb-red); color: #fff; }
:is(#fflt,.fflt-w) .init-btn-go { display: flex; align-items: center; gap: 5px; padding: 4px 9px 4px 5px; }
:is(#fflt,.fflt-w) .go-logo { width: 22px; height: 22px; object-fit: contain; flex-shrink: 0; border-radius: 3px; display: block; }
:is(#fflt,.fflt-w) .go-initials { width: 22px; height: 22px; flex-shrink: 0; border-radius: 3px; background: var(--fvbb-red); color: #fff; font-size: 8px; font-weight: 800; display: flex; align-items: center; justify-content: center; font-family: 'Barlow Condensed', sans-serif; }
/* Liga-Filter-Leiste */
:is(#fflt,.fflt-w) .liga-filter-wrap { display: flex; align-items: flex-start; gap: 6px; margin-bottom: 10px; }
:is(#fflt,.fflt-w) .liga-filter-bar { display: flex; flex-direction: column; gap: 4px; flex-shrink: 0; }
:is(#fflt,.fflt-w) .liga-filter-btn { display: flex; align-items: center; gap: 5px; padding: 4px 8px 4px 6px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface-alt); color: var(--text-sub); font-size: 10px; font-weight: 700; cursor: pointer; white-space: nowrap; transition: all 0.15s; font-family: 'Barlow Condensed', sans-serif; letter-spacing: 0.3px; line-height: 1.3; }
:is(#fflt,.fflt-w) .liga-filter-btn:hover { border-color: var(--fvbb-red); color: var(--fvbb-red); background: var(--fvbb-red-light); }
:is(#fflt,.fflt-w) .liga-filter-btn.active { background: var(--fvbb-red); border-color: var(--fvbb-red); color: #fff; }
:is(#fflt,.fflt-w) .liga-filter-btn .lf-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
/* Liga-Kachel-Leiste */
:is(#fflt,.fflt-w) .liga-tile-bar { flex: 1; min-width: 0; display: flex; gap: 5px; flex-wrap: nowrap; overflow-x: auto; scroll-behavior: smooth; -webkit-overflow-scrolling: touch; margin-bottom: 0; padding: 8px 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow); scrollbar-width: none; }
:is(#fflt,.fflt-w) .liga-tile-bar::-webkit-scrollbar { display: none; }
:is(#fflt,.fflt-w) .liga-tile { flex-shrink: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; width: 80px; min-height: 54px; padding: 6px 5px; background: var(--surface-alt); border: 1px solid var(--border); border-radius: 8px; cursor: pointer; font-family: 'Barlow', sans-serif; font-size: 10px; font-weight: 600; color: var(--text-sub); line-height: 1.25; white-space: normal; word-break: break-word; transition: border-color 0.15s, background 0.15s, color 0.15s; }
:is(#fflt,.fflt-w) .liga-tile:hover { background: var(--fvbb-red-light); border-color: var(--fvbb-red); color: var(--fvbb-red); }
:is(#fflt,.fflt-w) .liga-tile.active { background: var(--fvbb-red); border-color: var(--fvbb-red); color: #fff; }
:is(#fflt,.fflt-w) .liga-tile-go { display: block; font-family: 'Barlow Condensed', sans-serif; font-size: 9px; font-weight: 700; letter-spacing: 0.4px; text-transform: uppercase; opacity: 0.7; margin-bottom: 2px; }
:is(#fflt,.fflt-w) .liga-tile-msg { font-size: 11px; color: var(--muted); padding: 2px 4px; }
/* Tabelle */
:is(#fflt,.fflt-w) .table-wrap {
  background: var(--surface); border-radius: 14px;
  overflow: hidden; border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}
:is(#fflt,.fflt-w) .table-head {
  display: grid;
  grid-template-columns: 36px 1fr 38px 40px 34px 40px 64px 52px;
  padding: 10px 16px; background: var(--surface-alt);
  border-bottom: 1px solid var(--border);
}
:is(#fflt,.fflt-w) .th {
  font-family: 'Barlow Condensed', sans-serif; font-weight: 700;
  font-size: 11px; letter-spacing: 1px; text-transform: uppercase;
  color: var(--muted); text-align: center;
}
:is(#fflt,.fflt-w) .th.team-col { text-align: left; }
:is(#fflt,.fflt-w) .stat small.nv { display: block; font-size: 9px; line-height: 1.1; font-weight: 500; color: var(--muted); letter-spacing: 0; white-space: nowrap; }
:is(#fflt,.fflt-w) .table-body-inner { opacity: 1; transition: opacity 0.18s ease; }
:is(#fflt,.fflt-w) .table-body-inner.switching { opacity: 0; }
/* nur_logos-Modus: Team-Spalte schmal (nur Logo) */
:is(#fflt,.fflt-w).nur-logos .table-head,
:is(#fflt,.fflt-w).nur-logos .table-row {
  grid-template-columns: 36px 46px 38px 40px 34px 40px 64px 52px;
}
:is(#fflt,.fflt-w).nur-logos .th.team-col { text-align: center; }
:is(#fflt,.fflt-w) .table-row {
  display: grid;
  grid-template-columns: 36px 1fr 38px 40px 34px 40px 64px 52px;
  padding: 12px 16px; align-items: center;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s ease; cursor: default;
  animation: fvbbFadeSlide 0.35s ease both;
  animation-delay: calc(var(--row-i, 0) * 0.05s);
}
:is(#fflt,.fflt-w) .table-row:last-child { border-bottom: none; }
:is(#fflt,.fflt-w) .table-row:hover { background: var(--surface-alt); }
@keyframes fvbbFadeSlide {
  from { opacity: 0; transform: translateX(-8px); }
  to   { opacity: 1; transform: translateX(0); }
}
:is(#fflt,.fflt-w) .table-row.rank-1 { border-left: 3px solid var(--gold); background: var(--gold-bg); }
:is(#fflt,.fflt-w) .table-row.rank-2 { border-left: 3px solid var(--silver); background: var(--silver-bg); }
:is(#fflt,.fflt-w) .table-row.rank-3 { border-left: 3px solid var(--bronze); background: var(--bronze-bg); }
:is(#fflt,.fflt-w) .table-row.rank-other { border-left: 3px solid transparent; }
:is(#fflt,.fflt-w) .table-row.rank-1:hover { background: rgba(200,134,10,0.14); }
:is(#fflt,.fflt-w) .table-row.rank-2:hover { background: rgba(106,122,146,0.14); }
:is(#fflt,.fflt-w) .table-row.rank-3:hover { background: rgba(160,92,40,0.14); }
:is(#fflt,.fflt-w) .pos {
  font-family: 'Barlow Condensed', sans-serif; font-weight: 800;
  font-size: 18px; text-align: center; line-height: 1;
}
:is(#fflt,.fflt-w) .pos-1 { color: var(--gold); }
:is(#fflt,.fflt-w) .pos-2 { color: var(--silver); }
:is(#fflt,.fflt-w) .pos-3 { color: var(--bronze); }
:is(#fflt,.fflt-w) .pos-other { color: var(--muted); }
:is(#fflt,.fflt-w) .team-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
:is(#fflt,.fflt-w) .team-logo { width: 30px; height: 30px; object-fit: contain; flex-shrink: 0; border-radius: 4px; }
:is(#fflt,.fflt-w) .team-logo-placeholder {
  width: 30px; height: 30px; background: var(--border);
  border-radius: 4px; flex-shrink: 0; display: flex;
  align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: var(--muted);
}
:is(#fflt,.fflt-w) .team-name {
  font-weight: 600; font-size: 14px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; color: var(--text);
}
:is(#fflt,.fflt-w) .stat { text-align: center; font-size: 13px; font-weight: 500; color: var(--text-sub); font-variant-numeric: tabular-nums; }
:is(#fflt,.fflt-w) .goals-cell { text-align: center; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
:is(#fflt,.fflt-w) .points-cell { display: flex; justify-content: center; }
:is(#fflt,.fflt-w) .points-badge {
  font-family: 'Barlow Condensed', sans-serif; font-weight: 800;
  font-size: 17px; background: var(--surface-alt);
  border: 1px solid var(--border-strong); border-radius: 6px;
  padding: 2px 10px; min-width: 38px; text-align: center; color: var(--text);
}
:is(#fflt,.fflt-w) .table-row.rank-1 .points-badge {
  background: var(--fvbb-red-light); border-color: rgba(208,2,27,0.3); color: var(--fvbb-red);
}
:is(#fflt,.fflt-w) .widget-footer {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-top: 8px; padding: 0 4px; flex-wrap: wrap; gap: 3px 8px;
}
:is(#fflt,.fflt-w) .footer-link {
  font-size: 11px; color: var(--muted); text-decoration: none;
  letter-spacing: 0.3px; transition: color 0.15s; line-height: 1.3;
}
:is(#fflt,.fflt-w) .footer-link:hover { color: var(--fvbb-red); }
:is(#fflt,.fflt-w) .last-update { font-size: 10px; color: var(--border-strong); letter-spacing: 0.3px; line-height: 1.3; }
:is(#fflt,.fflt-w) .liga-legend {
  width: 100%; margin-top: 5px;
  font-size: 10px; color: var(--muted); letter-spacing: 0.3px;
  line-height: 1.4; padding: 0 4px;
}
:is(#fflt,.fflt-w) .liga-legend span { margin-right: 10px; white-space: nowrap; }
:is(#fflt,.fflt-w) .liga-legend .legend-sep { margin: 0 4px; color: var(--border-strong); }
:is(#fflt,.fflt-w) .powered-by {
  width: 100%; display: flex; align-items: center;
  justify-content: center; gap: 7px;
  margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--border);
}
:is(#fflt,.fflt-w) .powered-by a { display: flex; align-items: center; }
:is(#fflt,.fflt-w) .powered-by img { height: 18px; width: auto; object-fit: contain; opacity: 0.8; }
:is(#fflt,.fflt-w) .powered-by span { font-size: 10px; color: var(--muted); letter-spacing: 0.4px; }
:is(#fflt,.fflt-w) .error-msg { padding: 24px; text-align: center; color: var(--muted); font-size: 13px; }
@media (max-width: 520px) {
  :is(#fflt,.fflt-w) .table-head, :is(#fflt,.fflt-w) .table-row {
    grid-template-columns: 26px 1fr 28px 32px 26px 32px 50px 40px;
  }
  :is(#fflt,.fflt-w) .th { font-size: 10px; }
  :is(#fflt,.fflt-w) .team-name { font-size: 13px; }
  :is(#fflt,.fflt-w) .league-name { font-size: 18px; }
}
@media (max-width: 400px) {
  :is(#fflt,.fflt-w) .table-head, :is(#fflt,.fflt-w) .table-row {
    grid-template-columns: 24px 1fr 24px 30px 24px 30px 38px;
  }
  :is(#fflt,.fflt-w) .th.c-goals, :is(#fflt,.fflt-w) .goals-cell { display: none; }
}
