/*
    College-style color scheme with a data-centric feel.
    - Deep Blue: #003366 (Primary text, headers)
    - Gold: #FFD700 (Accents, links, highlights)
    - Light Gray: #F4F4F4 (Background)
    - Medium Gray: #DDDDDD (Borders, table headers)
    - Dark Gray: #333333 (Body text)
    - White: #FFFFFF (Card backgrounds)
*/

/* Apply a modern, geometric font similar to Geogrotesque */
body {
    font-family: 'Poppins', sans-serif;
    background-color: #F4F4F4;
    color: #333333;
    line-height: 1.6;
    /* Improved for readability */
    margin: 0;
    padding: 0;
    /* Remove body padding to allow header to span full-width */
}

/* New Navbar styles */
header {
    background-color: #003366;
    color: #FFFFFF;
    padding: 4px 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    margin-bottom: 10px;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.navbar-brand a {
    color: #FFFFFF;
    font-size: 1.1em;
    font-weight: 600;
    text-decoration: none;
    margin: 0;
}

.navbar-brand a:hover {
    color: #FFD700;
}

nav a {
    color: #FFFFFF;
    text-decoration: none;
    margin-left: 20px;
    font-size: 0.9em;
    transition: color 0.3s ease;
}

nav a:hover {
    color: #FFD700;
}

/* End of Navbar styles */

h1,
h2,
h3 {
    color: #003366;
    margin-bottom: 0.5em;
}

/* This is now used for page titles within the container, not the site title */
.page-title {
    text-align: center;
    margin-bottom: 20px;
    font-size: 2.2em;
}

.table-toolbar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 8px 0;
}

.table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0;
    /* Remove margin-top as toolbar provides spacing */
    background-color: #FFFFFF;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

th,
td {
    padding: 10px 15px;
    text-align: left;
    border-bottom: 1px solid #DDDDDD;
    white-space: nowrap;
}

th {
    background-color: #003366;
    color: #FFFFFF;
    font-weight: 600;
}

tbody tr:nth-child(even) {
    background-color: #F8F8F8;
}

tbody tr:hover {
    background-color: #FFFDE7;
    /* Light gold on hover */
}

.container {
    max-width: 1200px;
    margin: auto;
    overflow: auto;
    padding: 0 2rem;
}

.card {
    background: #FFFFFF;
    border: 1px solid #DDDDDD;
    border-radius: 5px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.team-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.team-header img {
    width: 60px;
    height: 60px;
    margin-right: 20px;
}

/* Generic Pill Navigation Styles */
.pill-nav-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.pill-nav-label {
    font-weight: 600;
    color: #003366;
    margin-right: 15px;
    margin-bottom: 10px;
}

.pill-nav {
    list-style: none;
    padding: 0;
    margin: 0 0 10px 0;
    display: flex;
    flex-wrap: wrap;
    /* Allows wrapping on smaller screens */
    gap: 8px;
    /* Space between buttons */
}

.pill-nav li {
    margin: 0;
}

.pill-nav a {
    display: block;
    padding: 8px 15px;
    background-color: #FFFFFF;
    color: #003366;
    text-decoration: none;
    border-radius: 20px;
    /* Creates the "pill" shape */
    border: 1px solid #DDDDDD;
    font-size: 0.9em;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

.pill-nav a:hover {
    background-color: #FFFDE7;
    border-color: #FFD700;
}

.pill-nav a.active {
    background-color: #003366;
    color: #FFFFFF;
    border-color: #003366;
    font-weight: 600;
}

/* Sorting indicators */
th a {
    color: #FFFFFF;
    text-decoration: none;
}

th a:hover {
    color: #FFD700;
}

th a.asc::after {
    content: ' \25B2';
}

th a.desc::after {
    content: ' \25BC';
}

a.disabled {
    pointer-events: none;
    color: #999;
}

/* Dropdown Button */
.dropbtn {
    background-color: transparent;
    color: white;
    padding: 0;
    font-size: 0.9em;
    border: none;
    cursor: pointer;
    transition: color 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.dropbtn:hover {
    color: #FFD700;
}

/* The container <div> - needed to position the dropdown content */
.dropdown {
    position: relative;
    display: inline-block;
    margin-left: 20px;
}

/* Dropdown Content (Hidden by Default) */
.dropdown-content {
    display: none;
    position: absolute;
    background-color: #f1f1f1;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.dropdown-content.show {
    display: block;
}


/* Links inside the dropdown */
.dropdown-content a {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}

/* Change color of dropdown links on hover */
.dropdown-content a:hover {
    background-color: #ddd;
}

.dropbtn.active {
    color: #FFD700;
}

/* Filter icons and inputs */
.filter-icon {
    cursor: pointer;
    color: #003366;
    /* Match the dark blue */
    font-size: 1.2em;
}

.filter-icon:hover {
    color: #FFD700;
    /* Highlight with gold */
}

.filter-input {
    width: 100%;
    padding: 8px;
    border: 1px solid #DDDDDD;
    border-radius: 4px;
    font-size: 0.9em;
    box-sizing: border-box;
}

#filter-row {
    background-color: #E9E9E9;
}

.filter-row-hidden {
    display: none;
}

.favorite-team {
    background-color: #FFFDE7 !important;
    /* Light gold to highlight favorite teams */
}

.favorite-star {
    cursor: pointer;
    color: #CCCCCC;
    /* Default empty star color */
    transition: color 0.2s;
}

.fa-star.favorite-star {
    color: #FFD700;
    /* Gold for a favorited star */
}

/* -- Responsive Design -- */
@media (max-width: 768px) {
    .mobile-hide {
        display: none;
    }

    .container {
        padding: 0 1rem;
    }

    .navbar {
        flex-direction: column;
        align-items: flex-start;
    }

    nav {
        margin-top: 10px;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }

    nav a,
    .dropdown {
        margin-left: 0;
        margin-bottom: 5px;
        width: 100%;
        padding: 5px;
        box-sizing: border-box;
    }

    .dropdown-content {
        position: static;
        box-shadow: none;
        background-color: #004488;
        min-width: unset;
        width: 100%;
    }

    .dropdown-content a {
        padding-left: 25px;
    }

    .pill-nav-container {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 1.8em;
    }

    h1 {
        font-size: 1.5em;
    }
}

.winner {
    color: green;
    font-weight: bold;
}

.loser {
    color: red;
}

.collapsible {
    background-color: #e0e0e0;
    /* Darker background */
    color: #444;
    cursor: pointer;
    padding: 18px;
    width: 100%;
    border: 1px solid #ccc;
    /* Border */
    outline: none;
    font-size: 15px;
    margin-top: 5px;
    box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.2);
    /* Drop shadow */
    position: relative;
    /* For positioning the arrow */
    text-indent: 20px;
}

.collapsible::before {
    content: '\25B6';
    /* Right arrow for collapsed */
    font-size: 13px;
    color: #444;
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
}

.collapsible.active::before {
    content: "\25BC";
    /* Down arrow for expanded */
}

.collapsible-text {
    margin-left: 20px;
}

.content {
    padding: 0 18px;
    display: none;
    overflow: hidden;
    background-color: #f9f9f9;
    border: 1px solid #ccc;
    border-top: none;
}

/* Team stats container with chart */
.team-stats-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px;
    margin-bottom: 30px;
}

.conference-stats-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px;
    margin-bottom: 30px;
}

.chart-container {
    position: relative;
}

.chart-wrapper {
    position: relative;
    width: 100%;
    height: 400px;
}

.chart-wrapper canvas {
    width: 100% !important;
    height: 100% !important;
}

/* Responsive layout for team stats */
@media (max-width: 968px) {
    .team-stats-container {
        grid-template-columns: 1fr;
    }
}

/* Stats table styling */
.stats-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    background-color: #FFFFFF;
    box-shadow: none;
    /* Remove shadow as it's inside a card */
}

.stats-table tbody tr {
    border-bottom: 1px solid #EEEEEE;
}

.stats-table tbody tr:last-child {
    border-bottom: none;
}

.stats-table tbody tr:hover {
    background-color: #F8F8F8;
}

.stats-table td {
    padding: 12px 8px;
    text-align: left;
    border-bottom: none;
    white-space: normal;
}

.stats-table .stat-label {
    font-weight: 600;
    color: #003366;
    width: 60%;
}

.stats-table .stat-value {
    color: #333333;
    font-weight: 500;
    width: 40%;
    text-align: right;
}

.stats-table .stat-context {
    color: #666666;
    font-size: 0.9em;
    font-weight: normal;
}