/* Match Insights Section */
.match-insights-section {
    padding: 1rem;
    margin-bottom: 1rem;
    background: #fff;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.insights-teams-legend {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 1rem;
    font-size: 13px;
    font-weight: 600;
}

.legend-dot {
    display: inline-block;
    width: 18px;
    height: 12px;
    border-radius: 3px;
}

.legend-home { background-color: rgba(66, 145, 205, 0.8); }
.legend-away { background-color: rgba(140, 185, 30, 0.8); }
.legend-label { color: #333; margin-right: 12px; }

/* Form badges */
.form-badges-wrap {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 1rem;
    padding: 8px 10px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.form-badges-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.form-badges-name {
    font-size: 12px;
    font-weight: 600;
    color: #555;
    min-width: 110px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.form-badges-dots {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.form-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    cursor: default;
    flex-shrink: 0;
}

.form-dot-w { background-color: #28a745; }
.form-dot-d { background-color: #f0a500; }
.form-dot-l { background-color: #dc3545; }

/* Two-column layout: radar left, bars right */
.insights-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: flex-start;
}

.insights-radar-wrap {
    flex: 0 0 280px;
    max-width: 300px;
}

.insights-bars-wrap {
    flex: 1 1 280px;
    min-width: 260px;
}

/* Comparison bar rows */
.insights-bar-row {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    gap: 6px;
}

.bar-pct {
    font-size: 12px;
    font-weight: 700;
    color: #555;
    min-width: 34px;
}

.bar-pct-home { text-align: right; }
.bar-pct-away { text-align: left; }

.bar-label-wrap {
    flex: 1;
    min-width: 0;
}

.bar-label-title {
    text-align: center;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #888;
    margin-bottom: 3px;
    text-transform: uppercase;
}

.bar-track {
    display: flex;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    background: #e9ecef;
}

.bar-fill {
    height: 100%;
    transition: width 0.4s ease;
}

.bar-fill-home {
    background-color: rgba(66, 145, 205, 0.85);
    border-radius: 4px 0 0 4px;
}

.bar-fill-away {
    background-color: rgba(140, 185, 30, 0.85);
    border-radius: 0 4px 4px 0;
}

.bar-fill-draw {
    background-color: rgba(180, 180, 180, 0.7);
}

/* Single-value stat bar (e.g. BTTS %) — neutral teal, not home/away */
.bar-fill-stat {
    background-color: rgba(80, 160, 160, 0.75);
    border-radius: 4px;
    height: 100%;
}

.bar-stat-label {
    text-align: center;
    font-size: 11px;
    color: #666;
    margin-top: 2px;
}

/* Odds badge in predictions */
.tip-odds-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding: 3px 10px;
    background: #f0f8e8;
    border: 1px solid #8fb920;
    border-radius: 12px;
    font-size: 13px;
}

.tip-odds-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

.tip-odds-link:hover .tip-odds-value {
    color: #8fb920;
}

.tip-odds-label {
    color: #6a8a10;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
}

.tip-odds-value {
    color: #2d5a1b;
    font-weight: 700;
    font-size: 15px;
}

.tip-odds-locked {
    margin-top: 8px;
}

.tip-odds-lock-link {
    font-size: 12px;
    color: #888;
    text-decoration: none;
    border: 1px dashed #ccc;
    border-radius: 12px;
    padding: 2px 10px;
    display: inline-block;
}

.tip-odds-lock-link:hover {
    color: #555;
    border-color: #aaa;
}

/* Glossary / metric explanations */
/* Mini league table */
.mini-league-wrap {
    margin: 1rem 0;
    padding: 10px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.mini-league-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #555;
    margin-bottom: 8px;
}

.mini-league-table {
    width: 100%;
    font-size: 12px;
    border-collapse: collapse;
}

.mini-league-table th {
    color: #999;
    font-weight: 600;
    padding: 3px 6px;
    text-align: center;
    border-bottom: 1px solid #dee2e6;
}

.mini-league-table th:nth-child(2) { text-align: left; }

.mini-league-table td {
    padding: 5px 6px;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
}

.mini-league-team {
    text-align: left !important;
    font-weight: 700;
    max-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mini-league-home {
    background: rgba(66, 145, 205, 0.08);
    border-left: 3px solid rgba(66, 145, 205, 0.8);
}

.mini-league-home .mini-league-team { color: #2a6fb0; }

.mini-league-away {
    background: rgba(140, 185, 30, 0.08);
    border-left: 3px solid rgba(140, 185, 30, 0.8);
}

.mini-league-away .mini-league-team { color: #4a7c10; }

.mini-gd-pos { color: #28a745; font-weight: 600; }
.mini-gd-neg { color: #dc3545; font-weight: 600; }

/* Predictions + Scorelines side-by-side layout */
.predictions-scorelines-layout {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.predictions-col {
    flex: 1;
    min-width: 0;
}

.scorelines-col {
    width: 200px;
    flex-shrink: 0;
    padding: 0.5rem 1rem 1rem;
    background: #fff;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.scorelines-col .match-section-title {
    font-size: 13px;
    margin-bottom: 0.75rem;
}

.scorelines-locked {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 1.5rem 0.5rem;
    text-align: center;
    color: #aaa;
    font-size: 12px;
}

.scorelines-locked .fa-lock {
    font-size: 22px;
    color: #ccc;
}

.scorelines-lock-link {
    font-size: 12px;
    font-weight: 600;
    color: #2a6fb0;
    text-decoration: none;
    border: 1px solid #2a6fb0;
    border-radius: 12px;
    padding: 3px 12px;
}

.scorelines-lock-link:hover {
    background: #2a6fb0;
    color: #fff;
}

@media (max-width: 600px) {
    .predictions-scorelines-layout {
        flex-direction: column;
    }
    .scorelines-col {
        width: 100%;
    }
}

/* Scorelines table */
.scorelines-wrap {
    margin: 1rem 0;
    padding: 10px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.scorelines-header {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 8px;
}

.scorelines-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #555;
}

.scorelines-subtitle {
    font-size: 11px;
    color: #aaa;
}

.scorelines-table {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.scoreline-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.scoreline-score {
    font-size: 13px;
    font-weight: 700;
    min-width: 42px;
    text-align: center;
    padding: 1px 6px;
    border-radius: 4px;
    flex-shrink: 0;
}

.scoreline-home { background: #e8f2fb; color: #2a6fb0; }
.scoreline-draw { background: #f5f5f5; color: #666; }
.scoreline-away { background: #eef6e0; color: #4a7c10; }

.scoreline-bar-track {
    flex: 1;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.scoreline-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.4s ease;
}

.scoreline-bar-home { background: rgba(66, 145, 205, 0.7); }
.scoreline-bar-draw { background: rgba(150, 150, 150, 0.6); }
.scoreline-bar-away { background: rgba(140, 185, 30, 0.7); }

.scoreline-pct {
    font-size: 12px;
    font-weight: 600;
    color: #888;
    min-width: 36px;
    text-align: right;
    flex-shrink: 0;
}

.insights-glossary {
    margin-top: 1rem;
    border-top: 1px solid #e9ecef;
    padding-top: 0.75rem;
}

.insights-glossary summary {
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 6px;
}

.insights-glossary summary::-webkit-details-marker { display: none; }

.insights-glossary summary::before {
    content: '▸';
    font-size: 10px;
    transition: transform 0.2s;
}

.insights-glossary[open] summary::before {
    transform: rotate(90deg);
}

.insights-glossary-list {
    margin: 0.75rem 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 4px 12px;
    font-size: 12px;
}

.insights-glossary-list dt {
    font-weight: 700;
    color: #444;
    white-space: nowrap;
    padding: 2px 0;
}

.insights-glossary-list dd {
    color: #666;
    margin: 0;
    padding: 2px 0;
    border-bottom: 1px solid #f0f0f0;
}

/* Responsive: stack on mobile */
@media (max-width: 576px) {
    .insights-radar-wrap {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .insights-bars-wrap {
        flex: 0 0 100%;
    }
}
