/* ==========================================================
   sidebar_widgets.css — Right Aside Dynamic Widgets
========================================================== */

/* ── WIDGET SHELL ─────────────────────────────────────── */
.sidebar-widget {
    margin-top: 14px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,.07);
}

/* ── HEADERS — vibrant gradient by widget type ─────────── */
.sidebar-widget-header {
    padding: 9px 14px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #fff;
    /* default gradient — overridden per widget below */
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}

/* Banker of the Day — amber/gold */
.sidebar-widget.widget-banker .sidebar-widget-header {
    background: linear-gradient(135deg, #b45309 0%, #f59e0b 100%);
}

/* Regular Season table — deep blue */
.sidebar-widget.widget-table .sidebar-widget-header {
    background: linear-gradient(135deg, #1d4ed8 0%, #3b82f6 100%);
}

/* Top Trends — vivid purple-to-orange */
.sidebar-widget.widget-trends .sidebar-widget-header {
    background: linear-gradient(135deg, #6d28d9 0%, #f97316 100%);
}

.sidebar-widget-content {
    background: var(--bg-primary, #fff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-top: none;
    border-radius: 0 0 10px 10px;
    padding: 12px;
}

/* ── BANKER OF THE DAY ─────────────────────────────────── */
.banker-card { display: flex; flex-direction: column; gap: 8px; }

.banker-league {
    display: flex; align-items: center; gap: 8px;
    font-weight: 600; font-size: 13px;
    color: var(--text-primary, #0f172a);
}
.banker-league img { width: 20px; height: 20px; object-fit: contain; }

.banker-match-details {
    display: flex; align-items: center; justify-content: space-between;
    font-size: 11px; color: var(--text-secondary, #64748b);
}

.banker-pick-row {
    display: flex; align-items: center; gap: 10px; margin-top: 4px;
    background: var(--bg-secondary, #f8fafc);
    padding: 8px 12px; border-radius: 8px;
    border: 1px dashed #f59e0b;
}
.banker-pick-label { font-size: 12px; font-weight: 600; color: var(--text-secondary, #64748b); }
.banker-pick-badge {
    background: linear-gradient(135deg, #f97316, #f59e0b);
    color: white; min-width: 34px; height: 28px;
    border-radius: 14px; padding: 0 10px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 12px;
    box-shadow: 0 2px 6px rgba(249,115,22,.35);
}
.banker-confidence {
    margin-left: auto; font-size: 13px; font-weight: 800; color: #10b981;
}

/* ── SIDEBAR STANDINGS TABLE ───────────────────────────── */
.sb-table-card { padding: 0 !important; }

.sb-table-league-title {
    padding: 8px 12px;
    font-size: 10px; font-weight: 800; letter-spacing: 0.07em;
    color: var(--text-secondary, #64748b);
    text-align: center;
    border-bottom: 1px solid var(--border-color, #e2e8f0);
}
.sb-table-subtitle {
    display: block;
    margin-top: 3px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0;
    color: var(--text-primary, #0f172a);
    text-transform: none;
}

.sb-table-scroll { overflow-x: auto; }

.sidebar-standings {
    width: 100%; border-collapse: collapse; font-size: 11px;
}
.sidebar-standings th {
    color: var(--text-secondary, #64748b); font-weight: 700;
    padding: 7px 4px;
    border-bottom: 2px solid var(--border-color, #e2e8f0);
    text-align: center; white-space: nowrap; font-size: 10px;
    letter-spacing: 0.04em;
}
.sidebar-standings th.sb-team { text-align: left; }
.sidebar-standings td {
    padding: 5px 4px;
    border-bottom: 1px solid var(--bg-secondary, #f8fafc);
    text-align: center; color: var(--text-primary, #0f172a);
    font-size: 11px;
}
.sidebar-standings td.sb-team { text-align: left; }
.sidebar-standings td.col-pts { font-weight: 800; color: var(--text-primary); }
.sidebar-standings .gd-pos { color: #10b981; font-weight: 700; }
.sidebar-standings .gd-neg { color: #ef4444; font-weight: 700; }
.sidebar-standings tr.sb-fixture-team td {
    background: #eff6ff;
}
.sidebar-standings tr.sb-fixture-team td.sb-team {
    font-weight: 800;
}
.sidebar-standings tr.sb-fixture-home td:first-child {
    box-shadow: inset 3px 0 0 #2563eb;
}
.sidebar-standings tr.sb-fixture-away td:first-child {
    box-shadow: inset 3px 0 0 #f97316;
}

/* Team cell */
.sidebar-standings .team-cell {
    display: flex; align-items: center; gap: 5px; white-space: nowrap;
}
.sidebar-standings .team-logo-sm {
    width: 16px; height: 16px; object-fit: contain; flex-shrink: 0;
}

/* Zone left-border on td:first-child (matches stats.css pattern) */
.sidebar-standings tr.sb-standing-row.zone-champions   td:first-child { border-left: 3px solid #1d4ed8; }
.sidebar-standings tr.sb-standing-row.zone-champions-q td:first-child { border-left: 3px solid #3b82f6; }
.sidebar-standings tr.sb-standing-row.zone-europa      td:first-child { border-left: 3px solid #f97316; }
.sidebar-standings tr.sb-standing-row.zone-europa-q    td:first-child { border-left: 3px solid #eab308; }
.sidebar-standings tr.sb-standing-row.zone-conference  td:first-child { border-left: 3px solid #16a34a; }
.sidebar-standings tr.sb-standing-row.zone-conference-q td:first-child { border-left: 3px solid #84cc16; }
.sidebar-standings tr.sb-standing-row.zone-continental  td:first-child { border-left: 3px solid #0e7490; }
.sidebar-standings tr.sb-standing-row.zone-continental-q td:first-child { border-left: 3px solid #22d3ee; }
.sidebar-standings tr.sb-standing-row.zone-continental2  td:first-child { border-left: 3px solid #0369a1; }
.sidebar-standings tr.sb-standing-row.zone-continental2-q td:first-child { border-left: 3px solid #7dd3fc; }
.sidebar-standings tr.sb-standing-row.zone-promotion   td:first-child { border-left: 3px solid #7c3aed; }
.sidebar-standings tr.sb-standing-row.zone-promotion-q td:first-child { border-left: 3px solid #a855f7; }
.sidebar-standings tr.sb-standing-row.zone-relegation-q td:first-child { border-left: 3px solid #ea580c; }
.sidebar-standings tr.sb-standing-row.zone-relegation  td:first-child { border-left: 3px solid #c0152a; }

/* Rank badge — uses stats.css classes directly, just size-override */
.sidebar-standings .rank-badge {
    display: inline-flex; align-items: center; justify-content: center;
    width: 20px; height: 20px; border-radius: 50%;
    font-size: 9px; font-weight: 800; color: white;
    background: var(--text-tertiary, #64748b);
    flex-shrink: 0;
}

/* Rank badge colours matching the zone colours */
.sidebar-standings .rank-badge.zone-champions   { background: #1d4ed8; }
.sidebar-standings .rank-badge.zone-champions-q { background: #3b82f6; }
.sidebar-standings .rank-badge.zone-europa      { background: #f97316; }
.sidebar-standings .rank-badge.zone-europa-q    { background: #eab308; }
.sidebar-standings .rank-badge.zone-conference  { background: #16a34a; }
.sidebar-standings .rank-badge.zone-conference-q { background: #84cc16; }
.sidebar-standings .rank-badge.zone-continental  { background: #0e7490; }
.sidebar-standings .rank-badge.zone-continental-q { background: #22d3ee; }
.sidebar-standings .rank-badge.zone-continental2  { background: #0369a1; }
.sidebar-standings .rank-badge.zone-continental2-q { background: #7dd3fc; color: #0c4a6e; }
.sidebar-standings .rank-badge.zone-promotion   { background: #7c3aed; }
.sidebar-standings .rank-badge.zone-promotion-q { background: #a855f7; }
.sidebar-standings .rank-badge.zone-relegation-q { background: #ea580c; }
.sidebar-standings .rank-badge.zone-relegation  { background: #c0152a; }

/* ── ZONE LEGEND ──────────────────────────────────────── */
.sb-table-legend {
    padding: 10px 12px;
    border-top: 1px solid var(--border-color, #e2e8f0);
    display: flex; flex-direction: column; gap: 5px;
}
.sb-legend-item {
    display: flex; align-items: center; gap: 7px;
}
.sb-legend-dot {
    width: 10px; height: 10px; border-radius: 2px; flex-shrink: 0;
}
/* Dot colours — mirror the zone colours */
.sb-legend-dot.zone-champions   { background: #1d4ed8; }
.sb-legend-dot.zone-champions-q { background: #3b82f6; }
.sb-legend-dot.zone-europa      { background: #f97316; }
.sb-legend-dot.zone-europa-q    { background: #eab308; }
.sb-legend-dot.zone-conference  { background: #16a34a; }
.sb-legend-dot.zone-conference-q { background: #84cc16; }
.sb-legend-dot.zone-continental  { background: #0e7490; }
.sb-legend-dot.zone-continental-q { background: #22d3ee; }
.sb-legend-dot.zone-continental2  { background: #0369a1; }
.sb-legend-dot.zone-continental2-q { background: #7dd3fc; }
.sb-legend-dot.zone-promotion   { background: #7c3aed; }
.sb-legend-dot.zone-promotion-q { background: #a855f7; }
.sb-legend-dot.zone-relegation-q { background: #ea580c; }
.sb-legend-dot.zone-relegation  { background: #c0152a; }

.sb-legend-label {
    font-size: 10px; color: var(--text-secondary, #64748b);
    font-weight: 500;
}

/* ── TOP TRENDS ───────────────────────────────────────── */
.trends-card { padding: 0; }

.trends-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color, #e2e8f0);
}
.trend-tab {
    flex: 1; padding: 10px 0;
    background: var(--bg-secondary, #f8fafc);
    border: none; font-size: 12px; font-weight: 700;
    color: var(--text-tertiary, #94a3b8);
    cursor: pointer; transition: color .15s;
}
.trend-tab.active {
    background: var(--bg-primary, #fff);
    color: var(--text-primary, #0f172a);
    border-bottom: 2px solid #f97316;
}
.trend-tab.disabled { cursor: not-allowed; opacity: 0.5; }

.trends-list { display: flex; flex-direction: column; }
.trend-item {
    display: flex; gap: 11px;
    padding: 11px 13px;
    border-bottom: 1px solid var(--border-color, #e2e8f0);
    transition: background .15s;
}
.trend-item:last-child { border-bottom: none; }
.trend-item:hover { background: var(--bg-secondary, #f8fafc); }

.trend-team-logo img { width: 30px; height: 30px; object-fit: contain; }
.placeholder-logo { width: 30px; height: 30px; background: #e2e8f0; border-radius: 50%; }

.trend-details { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.trend-text {
    font-size: 12px; font-weight: 600;
    color: var(--text-primary, #0f172a);
    line-height: 1.35; margin: 0;
}
.trend-match-info {
    font-size: 11px; color: var(--text-secondary, #64748b);
}
.trend-badge-row {
    display: flex; align-items: center;
    justify-content: space-between; flex-wrap: wrap; gap: 4px;
}
.trend-badge {
    padding: 3px 8px; border-radius: 4px;
    font-size: 10px; font-weight: 800; color: white; white-space: nowrap;
}
.trend-badge.type-wins     { background: #10b981; }
.trend-badge.type-defeats  { background: #ef4444; }
.trend-badge.type-over25   { background: #3b82f6; }
.trend-badge.type-over15   { background: #6366f1; }
.trend-badge.type-btts     { background: #8b5cf6; }
.trend-badge.type-cs       { background: #0ea5e9; }

.trend-pick {
    font-size: 11px; color: var(--text-secondary, #64748b);
    display: flex; align-items: center; gap: 3px;
}
.trend-pick b { color: var(--text-primary, #0f172a); font-weight: 700; }
.trend-odd {
    background: var(--bg-secondary, #f1f5f9);
    color: #f97316;
    border: 1px solid #fed7aa;
    border-radius: 4px; padding: 1px 6px;
    font-size: 10px; font-weight: 800; margin-left: 2px;
}
