﻿.match-directory-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
    max-height: 70vh;
    overflow-y: auto;
    padding-right: 4px;
    position: relative;
}

    .match-directory-list::-webkit-scrollbar {
        width: 6px;
    }

    .match-directory-list::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.02);
        border-radius: 4px;
    }

    .match-directory-list::-webkit-scrollbar-thumb {
        background: var(--brand-gold);
        border-radius: 4px;
    }

        .match-directory-list::-webkit-scrollbar-thumb:hover {
            background: var(--brand-green);
        }

.directory-match-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 12px;
    background-color: var(--bg-glass);
    border: 1px solid var(--border-bg-glass);
    border-radius: 4px;
    text-decoration: none;
    color: var(--text-bright);
    min-height: 32px;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

    .directory-match-row.single-item {
        justify-content: flex-start;
    }

    .directory-match-row:hover {
        background-color: rgba(255, 255, 255, 0.12);
        border-color: var(--brand-green);
    }

.school-name {
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--text-light);
}

.text-truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
}

.directory-crest {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: contain;
    background-color: var(--bg-input);
    border: 1px solid var(--border-input);
    padding: 1px;
    flex-shrink: 0;
}

.row-meta-group {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 155px;
    flex-shrink: 0;
}

    .row-meta-group .badge-sport,
    .row-meta-group .badge-gender {
        height: 20px !important;
        padding: 2px 6px !important;
        font-size: 0.62rem !important;
    }

.row-matchup-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-grow: 1;
    padding: 0 12px;
    min-width: 0;
}

.vs-divider {
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.row-score-group {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 110px;
    justify-content: flex-end;
    flex-shrink: 0;
}

.row-date {
    color: var(--text-muted);
    font-size: 0.75rem;
    white-space: nowrap;
}



.alphabet-group-header {
    position: sticky;
    top: 0;
    background-color: var(--bg-main-overlay);
    color: var(--brand-gold);
    font-size: 0.9rem;
    font-weight: 700;
    padding: 6px 12px;
    margin: 8px 0 4px 0;
    border-radius: 4px;
    border-left: 3px solid var(--brand-gold);
    z-index: 10;
}

.score-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 2px 8px;
    border-radius: 4px;
    height: 20px;
    background-color: var(--bg-glass);
    border: 1px solid var(--border-matrix-row);
    white-space: nowrap;
}

.score-num {
    display: inline-block;
}

    .score-num.win {
        color: var(--color-success-text) !important;
    }

    .score-num.loss {
        color: var(--color-loss-text) !important;
    }

    .score-num.draw {
        color: var(--text-muted) !important;
    }

.score-dash {
    color: var(--text-muted);
    margin: 0 2px;
}

@media (max-width: 768px) {
    .directory-match-row {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        padding: 8px 10px;
        min-height: auto;
    }

    .row-meta-group {
        width: 100%;
        min-width: 0;
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 6px;
    }

    .row-matchup-group {
        width: 100%;
        padding: 4px 0;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 6px;
    }

        .row-matchup-group .school-name {
            font-size: 0.82rem;
            font-weight: 600;
            flex: 1 1 0;
            min-width: 0;
        }

            .row-matchup-group .school-name:first-of-type {
                text-align: right;
            }

            .row-matchup-group .school-name:last-of-type {
                text-align: left;
            }

    .row-score-group {
        width: 100%;
        min-width: 0;
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        padding-top: 6px;
        margin-top: 2px;
    }

        .row-score-group .score-badge {
            grid-column: 2;
            grid-column-start: 2;
            height: 22px;
            padding: 0 10px;
            font-size: 0.82rem;
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.15);
        }

        .row-score-group .row-date {
            grid-column: 3;
            justify-self: end;
            font-size: 0.72rem;
            opacity: 0.7;
        }
}

/* Container for matchup + score bar */
.row-center-column {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-grow: 1;
    min-width: 0;
}

/* Track layout */
.score-bar-track {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 240px;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.06);
    border-radius: 2px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

/* Left/Right Halves */
.score-bar-side {
    flex: 1;
    height: 100%;
    display: flex;
}

    .score-bar-side.left {
        justify-content: flex-end; /* Grows from center outward to LEFT */
    }

    .score-bar-side.right {
        justify-content: flex-start; /* Grows from center outward to RIGHT */
    }

/* Center Pin Divider */
.score-bar-center-pin {
    width: 2px;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.3);
    z-index: 1;
}

/* Fill Bars */
.score-bar-fill {
    height: 100%;
    width: var(--score-pct, 0%);
    transition: width 0.3s ease-in-out;
    border-radius: 1px;
}

    /* Green for Winner, Red for Loser, Muted for Draw */
    .score-bar-fill.win {
        background-color: var(--color-success-text, #2e7d32);
    }

    .score-bar-fill.loss {
        background-color: var(--color-loss-text, #d32f2f);
    }

    .score-bar-fill.draw {
        background-color: var(--text-muted, #757575);
    }
