/**
 * Pfad: wp-content/plugins/fanclub-core/modules/public/assets/public.css
 * Frontend-Styles: Spielplan, nächstes Spiel, Bundesliga-Tabelle
 *
 * Alle Variablen sind auf den Component-Scope beschränkt.
 * Theme-Variablen (--fc-yellow, --fc-black, --fc-font, ...) werden
 * direkt vom Theme geerbt – kein globales Überschreiben.
 *
 * @package FanclubCore
 */

/* ── Component-Scope: lokale Variablen ───────────────────────────────────── */
.fc-next-game,
.fc-spielplan,
.fc-bl-table-wrap {
    --pub-dark:    #1a1a1a;
    --pub-dark-2:  #232323;
    --pub-border:  #2e2e2e;
    --pub-text:    #e8e8e8;
    --pub-muted:   #888888;
    --pub-green:   #22c55e;
    --pub-red:     #ef4444;
    --pub-blue:    #3b82f6;
    --pub-orange:  #f97316;
    --pub-radius:  10px;
}

/* ============================================================
   NÄCHSTES SPIEL – Hero-Card
   ============================================================ */

.fc-next-game {
    background: var(--pub-dark);
    border: 1px solid var(--pub-border);
    border-top: 4px solid var(--fc-yellow);
    border-radius: var(--pub-radius);
    padding: 28px 32px;
    font-family: var(--fc-font);
    color: var(--pub-text);
    max-width: 680px;
    margin: 0 auto;
}

.fc-next-game.fc-empty {
    text-align: center;
    padding: 40px;
    color: var(--pub-muted);
    border-top-color: var(--pub-border);
}

/* Eyebrow-Zeile */
.fc-ng-eyebrow {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.fc-ng-competition {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--fc-yellow);
    background: rgba(255,217,0,.1);
    padding: 3px 10px;
    border-radius: 4px;
}

.fc-ng-matchday {
    font-size: .72rem;
    color: var(--pub-muted);
}

.fc-ng-fanclub-badge {
    font-size: .72rem;
    font-weight: 700;
    color: var(--fc-yellow);
    background: rgba(255,217,0,.12);
    border: 1px solid rgba(255,217,0,.3);
    padding: 3px 10px;
    border-radius: 4px;
    margin-left: auto;
}

/* Teams */
.fc-ng-teams {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.fc-ng-team {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--pub-text);
    flex: 1;
    line-height: 1.2;
}

.fc-ng-team:first-child { text-align: left; }
.fc-ng-team:last-child  { text-align: right; }
.fc-ng-team.fc-ng-bvb   { color: var(--fc-yellow); }

.fc-ng-vs {
    font-size: .9rem;
    font-weight: 700;
    color: var(--pub-muted);
    flex-shrink: 0;
    background: rgba(255,255,255,.05);
    border-radius: 6px;
    padding: 6px 14px;
}

/* Meta-Zeile */
.fc-ng-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--pub-border);
}

.fc-ng-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .85rem;
    color: var(--pub-muted);
}

.fc-ng-meta-icon { font-size: 1rem; }

/* Fanclub-Hinweis */
.fc-ng-fanclub-hint {
    margin-top: 16px;
    padding: 12px 16px;
    background: rgba(255,217,0,.08);
    border: 1px solid rgba(255,217,0,.2);
    border-radius: 6px;
    font-size: .85rem;
    color: var(--fc-yellow);
    font-weight: 600;
}

.fc-ng-link {
    color: var(--fc-yellow);
    text-decoration: none;
    font-weight: 700;
}
.fc-ng-link:hover { text-decoration: underline; }

/* ============================================================
   SPIELPLAN – Listenansicht
   ============================================================ */

.fc-spielplan {
    font-family: var(--fc-font);
    max-width: 900px;
}

.fc-spielplan-section-title {
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    font-weight: 700;
    color: var(--pub-muted);
    margin: 28px 0 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--pub-border);
}

.fc-spielplan-section-title:first-child { margin-top: 0; }

.fc-spielplan-list { display: flex; flex-direction: column; gap: 6px; }

/* Game-Row */
.fc-game-row {
    display: grid;
    grid-template-columns: 130px 90px 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--pub-dark);
    border: 1px solid var(--pub-border);
    border-radius: 8px;
    transition: border-color .15s, box-shadow .15s;
}

.fc-game-row-upcoming { border-left: 3px solid var(--fc-yellow); }
.fc-game-row-past     { opacity: .72; }
.fc-game-row:hover    { border-color: rgba(255,217,0,.3); box-shadow: 0 2px 10px rgba(0,0,0,.2); }

/* Datum-Spalte */
.fc-gr-date {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.fc-gr-weekday { font-size: .7rem;  color: var(--pub-muted); text-transform: uppercase; letter-spacing: .04em; }
.fc-gr-datestr { font-size: .88rem; font-weight: 700; color: var(--pub-text); }
.fc-gr-time    { font-size: .75rem; color: var(--pub-muted); }

/* Wettbewerb-Spalte */
.fc-gr-competition { display: flex; flex-direction: column; gap: 3px; }
.fc-gr-comp-badge {
    display: inline-block;
    font-size: .62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--fc-yellow);
    background: rgba(255,217,0,.1);
    padding: 2px 7px;
    border-radius: 3px;
    white-space: nowrap;
}
.fc-gr-matchday { font-size: .7rem; color: var(--pub-muted); }

/* Teams-Spalte */
.fc-gr-teams {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.fc-gr-home,
.fc-gr-away {
    font-size: .9rem;
    font-weight: 600;
    color: var(--pub-text);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fc-gr-home { text-align: right; }
.fc-gr-away { text-align: left; }
.fc-gr-bvb  { color: var(--fc-yellow) !important; font-weight: 800; }

.fc-gr-score  { flex-shrink: 0; min-width: 52px; text-align: center; }
.fc-gr-result { font-size: 1rem;  color: var(--fc-yellow); font-weight: 800; }
.fc-gr-vs     { font-size: .8rem; color: var(--pub-muted); font-weight: 700; }

/* Badges-Spalte */
.fc-gr-badges { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.fc-gr-badge {
    font-size: .65rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    white-space: nowrap;
}
.fc-gr-badge-fanclub {
    background: rgba(255,217,0,.12);
    color: var(--fc-yellow);
    border: 1px solid rgba(255,217,0,.25);
}
.fc-gr-venue { font-size: .7rem; color: var(--pub-muted); text-align: right; max-width: 160px; line-height: 1.3; }

/* ============================================================
   BUNDESLIGA TABELLE
   ============================================================ */

.fc-bl-table-wrap {
    font-family: var(--fc-font);
    max-width: 760px;
}

.fc-bl-table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.fc-bl-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--pub-text);
    margin: 0;
}

.fc-bl-source { font-size: .7rem; color: var(--pub-muted); }

.fc-bl-table-scroll { overflow-x: auto; }

.fc-bl-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .85rem;
    color: var(--pub-text);
}

.fc-bl-table th {
    text-align: center;
    padding: 8px 10px;
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--pub-muted);
    border-bottom: 2px solid var(--pub-border);
    font-weight: 700;
    white-space: nowrap;
}

.fc-bl-th-rank { width: 36px; }
.fc-bl-th-team { text-align: left; }
.fc-bl-th-pts  { color: var(--pub-text) !important; }

.fc-bl-table td {
    padding: 10px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,.04);
    vertical-align: middle;
}

.fc-bl-row { transition: background .12s; }
.fc-bl-row:hover td { background: rgba(255,255,255,.03); }

/* BVB-Zeile hervorheben */
.fc-bl-bvb td       { background: rgba(255,217,0,.06) !important; }
.fc-bl-bvb:hover td { background: rgba(255,217,0,.1)  !important; }

/* Rang */
.fc-bl-rank { text-align: center; }
.fc-bl-rank-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    font-size: .78rem;
    font-weight: 700;
    background: var(--pub-dark-2);
    color: var(--pub-muted);
}

/* Team-Spalte */
.fc-bl-team {
    text-align: left;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.fc-bl-logo     { width: 22px; height: 22px; object-fit: contain; flex-shrink: 0; }

.fc-bl-teamname {
    font-weight: 600;
    color: var(--pub-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fc-bl-bvb .fc-bl-teamname { color: var(--fc-yellow); font-weight: 800; }

.fc-bl-bvb-tag {
    font-size: .6rem;
    font-weight: 800;
    background: var(--fc-yellow);
    color: #000;
    padding: 1px 5px;
    border-radius: 3px;
    flex-shrink: 0;
    letter-spacing: .04em;
}

/* Punkte */
.fc-bl-pts strong        { color: var(--pub-text); font-size: 1rem; }
.fc-bl-bvb .fc-bl-pts strong { color: var(--fc-yellow); }

/* Diff */
.fc-bl-pos { color: var(--pub-green); font-weight: 700; }
.fc-bl-neg { color: var(--pub-red);   font-weight: 700; }

/* Zonen-Farbpunkte */
.fc-bl-zone-cl   .fc-bl-rank-dot { background: rgba(59,130,246,.2);  color: var(--pub-blue);   border: 2px solid var(--pub-blue); }
.fc-bl-zone-el   .fc-bl-rank-dot { background: rgba(249,115,22,.15); color: var(--pub-orange); border: 2px solid var(--pub-orange); }
.fc-bl-zone-ecl  .fc-bl-rank-dot { background: rgba(34,197,94,.12);  color: var(--pub-green);  border: 2px solid var(--pub-green); }
.fc-bl-zone-rel  .fc-bl-rank-dot { background: rgba(239,68,68,.12);  color: #f87171;           border: 2px solid #f87171; }
.fc-bl-zone-abst .fc-bl-rank-dot { background: rgba(239,68,68,.2);   color: var(--pub-red);    border: 2px solid var(--pub-red); }

/* Legende */
.fc-bl-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--pub-border);
}

.fc-bl-legend-item {
    font-size: .68rem;
    font-weight: 600;
    color: var(--pub-muted);
    padding-left: 12px;
    position: relative;
}

.fc-bl-legend-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.fc-bl-legend .fc-bl-zone-cl::before  { background: var(--pub-blue); }
.fc-bl-legend .fc-bl-zone-el::before  { background: var(--pub-orange); }
.fc-bl-legend .fc-bl-zone-ecl::before { background: var(--pub-green); }
.fc-bl-legend .fc-bl-zone-rel::before { background: #f87171; }

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 700px) {
    .fc-next-game { padding: 20px 18px; }
    .fc-ng-team   { font-size: 1rem; }

    .fc-game-row {
        grid-template-columns: 110px 1fr;
        grid-template-rows: auto auto;
        gap: 6px 10px;
    }
    .fc-gr-competition { grid-row: 2; grid-column: 1; }
    .fc-gr-teams       { grid-row: 1; grid-column: 2; }
    .fc-gr-badges      { grid-row: 2; grid-column: 2; align-items: flex-start; }

    .fc-bl-logo { display: none; }
    .fc-bl-table th:nth-child(4),
    .fc-bl-table th:nth-child(5),
    .fc-bl-table th:nth-child(6),
    .fc-bl-table td:nth-child(4),
    .fc-bl-table td:nth-child(5),
    .fc-bl-table td:nth-child(6) { display: none; }
}
