﻿
/* last 30 games table */
th.num, td.num {
    text-align: right;
    word-wrap: break-word;
}

.badge {
    padding: 2px 6px !important;
    border-radius: 12px;
    font-size: 0.8em !important;
    margin: 2px 4px 2px 0;
    display: inline-block;
    white-space: nowrap;
    font-weight: 800 !important;
}

.badge-line {
    display: block;
    margin-bottom: 2px;
}

.badge-legend-wrapper {
    position: relative;
    display: inline-block;
    margin-top: 1rem;
    cursor: pointer;
    z-index: 20;
}

.badge-legend-label {
    font-weight: bold;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
    display: inline-block;
}

.badge-legend-content {
    display: none;
    position: absolute;
    top: 130%;
    left: 0;
    background: #000;
    border: 1px solid #ccc;
    padding: 12px 14px;
    border-radius: 8px;
    min-width: 300px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
    font-size: 0.85em;
    line-height: 1.6;
}

.badge-legend-wrapper:hover .badge-legend-content,
.badge-legend-wrapper:focus-within .badge-legend-content {
    display: block;
}

.badge-legend-content hr {
    margin: 10px 0;
    border: none;
    border-top: 1px solid #ccc;
}

.legend-row {
    display: flex;
    align-items: center;
    margin-bottom: 6px;
}

.legend-label {
    margin-left: 8px;
}

.win-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 0.85em;
    color: white;
}

.win-high {
    background-color: #28a745;
    color: black;
}

.win-mid {
    background-color: #ffc107;
    color: black;
}

.win-low {
    background-color: #dc3545;
    color: black;
}


.top3 {
    background-color: rgb(203, 42, 182);
    color: black;
}

.top10 {
    background-color: rgb(25, 118, 210);
    color: black;
}

.top20 {
    background-color: #28a745;
    color: black;
}

.milestone {
    background-color: cyan;
    color: #333 !important;
    font-weight: bold;
}

.megamilestone {
    background-color: gold;
    color: #333 !important;
    font-weight: bold;
}

.filter-button-group {
    margin-bottom: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-btn {
    padding: 6px 12px;
    border: 1px solid #666;
    border-radius: 6px;
    background-color: #666;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.2s ease;
}

.filter-btn:hover {
    background-color: #e0e0e0;
}

.filter-btn.active {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}


.badge[data-tooltip] {
    position: relative;
    cursor: help;
}

    .badge[data-tooltip]::after {
        content: attr(data-tooltip);
        position: absolute;
        bottom: 120%;
        left: 50%;
        transform: translateX(-50%);
        background: #222;
        color: #fff;
        padding: 4px 8px;
        border-radius: 4px;
        white-space: nowrap;
        font-size: 12px;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s;
        z-index: 100;
    }

    .badge[data-tooltip]:hover::after {
        opacity: 1;
    }


/* MVP */

.badge.mvp {
    color: #fff;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 5px;
    display: inline-block;
    margin: 2px;
    font-size: 0.85rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

    /* MVP GOD (Top 1%) */
    .badge.mvp.top1 {
        background: linear-gradient(90deg, #ff5722, #d500f9);
        box-shadow: 0 0 10px rgba(213, 0, 249, 0.9), 0 0 15px rgba(255, 87, 34, 0.7);
        transform: scale(1.05);
    }

    /* Elite MVP (Top 3%) */
    .badge.mvp.top3 {
        background: linear-gradient(90deg, #7c4dff, #6200ea);
        box-shadow: 0 0 8px rgba(124, 77, 255, 0.8);
        border: 1px solid rgba(255, 255, 255, 0.2);
    }

    /* Valuable Player (Top 10%) */
    .badge.mvp.top10 {
        background: linear-gradient(135deg, #3f51b5, #1a237e);
        box-shadow: 0 0 5px rgba(63, 81, 181, 0.6);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    /* Team Backbone (Top 25%) */
    .badge.mvp.solid {
        background: linear-gradient(135deg, #009688, #004d40);
        box-shadow: inset 0 0 2px rgba(255, 255, 255, 0.1);
    }

    /* Reliable Impact (Everyone else doing well) */
    .badge.mvp.decent {
        background: linear-gradient(135deg, #607d8b, #37474f);
        color: #e0f7fa;
        opacity: 0.85;
    }

    /* Aight (everyone under top 50%) */
    .badge.mvp.aight {
        background: linear-gradient(135deg, #90a4ae, #546e7a); /* cool grey blend */
        color: #eceff1;
        opacity: 0.75;
        box-shadow: inset 0 0 1px rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.05);
    }