/* ================================================================
   FBCV Basketball Plugin — Public Styles
   ================================================================ */
@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@600;700;900&family=Barlow:wght@400;500;600&display=swap');

:root {
    --fbcv-primary:   #e05c00;
    --fbcv-dark:      #1a1a2e;
    --fbcv-mid:       #16213e;
    --fbcv-light:     #f5f5f5;
    --fbcv-white:     #ffffff;
    --fbcv-success:   #27ae60;
    --fbcv-danger:    #c0392b;
    --fbcv-border:    #e0e0e0;
    --fbcv-highlight: #fff3e0;
    --fbcv-radius:    8px;
}

/* ── Wrapper ──────────────────────────────────────────────────── */
.fbcv-wrap {
    font-family: 'Barlow', sans-serif;
    font-size: 15px;
    color: #222;
    line-height: 1.5;
    margin: 0 0 24px;
}

/* ── Section header ───────────────────────────────────────────── */
.fbcv-section-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 900;
    font-size: 22px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--fbcv-dark);
    border-left: 5px solid var(--fbcv-primary);
    padding: 6px 12px;
    margin: 0 0 16px;
    background: var(--fbcv-light);
    border-radius: 0 var(--fbcv-radius) var(--fbcv-radius) 0;
}

/* ── Tabs (full view) ─────────────────────────────────────────── */
.fbcv-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 3px solid var(--fbcv-primary);
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.fbcv-tab-btn {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 20px;
    border: none;
    border-radius: var(--fbcv-radius) var(--fbcv-radius) 0 0;
    background: #ddd;
    color: #555;
    cursor: pointer;
    transition: background .2s, color .2s;
}
.fbcv-tab-btn.active,
.fbcv-tab-btn:hover {
    background: var(--fbcv-primary);
    color: var(--fbcv-white);
}
.fbcv-tab-pane { display: none; }
.fbcv-tab-pane.active { display: block; }

/* ── Standing Table ───────────────────────────────────────────── */
.fbcv-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.fbcv-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.fbcv-table thead th {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    background: var(--fbcv-dark);
    color: var(--fbcv-white);
    padding: 10px 12px;
    text-align: center;
    white-space: nowrap;
}
.fbcv-table thead th:first-child { text-align: left; border-radius: var(--fbcv-radius) 0 0 0; }
.fbcv-table thead th:last-child  { border-radius: 0 var(--fbcv-radius) 0 0; }

.fbcv-table tbody tr { border-bottom: 1px solid var(--fbcv-border); transition: background .15s; }
.fbcv-table tbody tr:hover { background: #fafafa; }
.fbcv-table tbody td {
    padding: 9px 12px;
    text-align: center;
    vertical-align: middle;
}
.fbcv-table tbody td.team-name { text-align: left; font-weight: 600; }

/* Highlight own team */
.fbcv-table tbody tr.fbcv-highlight {
    background: var(--fbcv-highlight);
    border-left: 4px solid var(--fbcv-primary);
}
.fbcv-table tbody tr.fbcv-highlight td { font-weight: 700; }

.fbcv-pos-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-weight: 700;
    font-size: 13px;
    background: var(--fbcv-light);
    border: 2px solid var(--fbcv-border);
}
.fbcv-pos-badge.top-1 { background: #ffd700; border-color: #d4af37; color: #5a4200; }
.fbcv-pos-badge.top-2 { background: #c0c0c0; border-color: #999; color: #333; }
.fbcv-pos-badge.top-3 { background: #cd7f32; border-color: #a0522d; color: #fff; }

/* ── Game cards (results / upcoming) ─────────────────────────── */
.fbcv-games-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }

.fbcv-game-card {
    background: var(--fbcv-white);
    border: 1px solid var(--fbcv-border);
    border-radius: var(--fbcv-radius);
    padding: 14px 16px;
    transition: box-shadow .2s;
}
.fbcv-game-card:hover { box-shadow: 0 3px 12px rgba(0,0,0,.08); }

.fbcv-game-meta {
    font-size: 12px;
    color: #888;
    margin-bottom: 8px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.fbcv-game-meta .round { font-weight: 600; color: var(--fbcv-primary); }

.fbcv-game-teams {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 8px;
}
.fbcv-team-home { text-align: right; }
.fbcv-team-away { text-align: left; }
.fbcv-team-name-game {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: 16px;
    line-height: 1.2;
}
.fbcv-team-name-game.own-team { color: var(--fbcv-primary); }

.fbcv-score { font-weight:900; font-size:1.4em; color:#444; text-align:center; }

.fbcv-upcoming-date {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 15px;
    font-weight: 700;
    background: var(--fbcv-primary);
    color: var(--fbcv-white);
    border-radius: var(--fbcv-radius);
    padding: 4px 12px;
    text-align: center;
    white-space: nowrap;
    min-width: 80px;
}

/* ── Widget styles ────────────────────────────────────────────── */
.fbcv-widget-card {
    background: var(--fbcv-light);
    border-radius: var(--fbcv-radius);
    padding: 12px;
    text-align: center;
}
.fbcv-widget-card .fbcv-game-teams { font-size: 14px; }
.fbcv-widget-card .fbcv-score      { font-size: 18px; background: none; }

/* ── Refresh button ───────────────────────────────────────────── */
.fbcv-refresh-btn {
    font-size: 12px;
    color: var(--fbcv-primary);
    background: none;
    border: 1px solid var(--fbcv-primary);
    border-radius: 4px;
    padding: 2px 8px;
    cursor: pointer;
    float: right;
    margin-top: -2px;
}
.fbcv-refresh-btn:hover { background: var(--fbcv-primary); color: var(--fbcv-white); }

/* ── Empty / error states ─────────────────────────────────────── */
.fbcv-empty {
    text-align: center;
    padding: 24px;
    color: #999;
    font-style: italic;
}
.fbcv-error {
    background: #fdecea;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 12px 16px;
    border-radius: var(--fbcv-radius);
    font-size: 14px;
}

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 560px) {
    .fbcv-table thead th:nth-child(n+6) { display: none; }
    .fbcv-table tbody td:nth-child(n+6) { display: none; }
    .fbcv-team-name-game { font-size: 14px; }
    .fbcv-score { font-size: 18px; }
}

/* ── Header bar ─────────────────────────────────────── */
.fbcv-header-bar {
    background: var(--fbcv-dark);
    color: var(--fbcv-white);
    border-radius: var(--fbcv-radius) var(--fbcv-radius) 0 0;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0;
}
.fbcv-header-name {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 900;
    font-size: 18px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.fbcv-header-bar .fbcv-refresh-btn { color: rgba(255,255,255,.6); border-color: rgba(255,255,255,.3); margin:0; }
.fbcv-header-bar .fbcv-refresh-btn:hover { background: rgba(255,255,255,.15); color:#fff; }

/* ── Streak dots ────────────────────────────────────── */
.fbcv-streak { display:inline-flex; gap:3px; align-items:center; }
.fbcv-streak-dot { display:inline-block; width:10px; height:10px; border-radius:50%; }
.fbcv-streak-dot.w { background: var(--fbcv-success); }
.fbcv-streak-dot.l { background: var(--fbcv-danger);  }

/* ── Result badge ───────────────────────────────────── */
.fbcv-result-badge { display:inline-block; font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.4px; padding:2px 7px; border-radius:4px; }
.fbcv-result-badge.win  { background:#d1fae5; color:#065f46; }
.fbcv-result-badge.loss { background:#fee2e2; color:#991b1b; }

/* ── Score separator ────────────────────────────────── */

/* ── Win/loss card accent ───────────────────────────── */
.fbcv-game-card.fbcv-win  { border-left:4px solid var(--fbcv-success); }
.fbcv-game-card.fbcv-loss { border-left:4px solid var(--fbcv-danger);  }

/* ── Widget date line ───────────────────────────────── */
.fbcv-widget-date { font-size:12px; color:#666; text-align:center; margin-bottom:4px; }
