/* Styles for the highest-level containers on the page */

body {
    font-family: Open Sans, Arial, sans-serif;
    font-size: 16px;
    font-weight: 400;
    margin: 0 auto;
    background-color: #f5f5f5;
}
main {
    padding: 1.25rem;
    display: flex;
    flex-flow: column;
    justify-content: flex-start;
    align-items: center;
}
* {
    font-family: inherit;
}

/* Header styles */

header {
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
    background-color: #555e;
    color: #fff;
    display: flex;
    flex-flow: row;
    justify-content: space-between;
    align-items: center;
}
.site-name {
    margin: 0.75rem;
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
}
.league-link-container-desktop {
    height: 100%;
    display: flex;
    flex-flow: row;
    align-items: center;
    font-weight: 600;
}
.league-link {
    height: 100%;
    padding: 0.5rem;
    text-decoration: none;
    color: #fff;
}
.league-link:hover {
    background-color: #0004;
}
.search-bar {
    width: 14rem;
    margin: 0.25rem 1rem;
    padding: 0.5rem;
    border-radius: 6px;
    border: 2px solid #666;
    font-family: inherit;
}

/* Elements repeated across many or all pages */

.page-title {
    margin-bottom: 1.25rem;
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
}

.section-title {
    text-align: center;
    font-size: 1.75rem;
    margin: 2rem 0 0;
    color: #333;
    font-weight: 700;
}

.page-info-primary {
    text-align: center;
    margin: 0.5rem 0 1rem;
    font-size: 1.1rem;
}

.page-info-primary a {
    color: #07b;
    text-decoration: none;
    font-weight: bold;
}

.page-info-primary a:hover {
    text-decoration: underline;
}

.page-info-secondary {
    text-align: center;
    font-size: 1rem;
    color: #666;
}

.page-info-secondary a {
    color: #07b;
    text-decoration: none;
}

.page-info-secondary a:hover {
    text-decoration: underline;
}

/* Styles for main stat / reference tables */

.stat-table-container {
    max-width: 100%;
    margin: 2.5rem 0;
    overflow: auto;
}
.stat-table {
    border-collapse: collapse;
    background-color: #fff;
}
.stat-table th,
.stat-table td {
    padding: 0.75rem 0.5rem;
    text-align: center;
    border-bottom: 1px solid #ddd;
}
.stat-table th {
    background-color: #57c;
    font-weight: bold;
    color: #fff;
    position: sticky;
    top: 0;
}
.stat-table th:hover {
    background-color: #46b;
    cursor: pointer;
}
.stat-table tr:hover {
    background-color: #f8f9fa;
}
th.team-name {
    width: auto;
}
td.team-name {
    width: auto;
    text-align: left;
    padding: 0 25px 0 15px;
}
.team-name a {
    color: #07b;
    text-decoration: none;
    font-weight: bold;
}
.team-name a:hover {
    text-decoration: underline;
}
.rank-col {
    font-weight: bold;
    color: #666;
}
.positive {
    color: #070;
}
.negative {
    color: #700;
}
.zero {
    color: #345;
}

@media screen and (min-width) and (max-width: 1200px) {
    body {
        font-size: 14px;
    }
}

/* Mobile hamburger menu styles */

.hamburger-button {
    display: none;
    background: none;
    border: none;
    width: 2.5rem;
    height: 2.5rem;
    margin-right: 0.75rem;
    padding: 0.5rem 0.75rem;
    flex-direction: column;
    justify-content: space-around;
    z-index: 101;
    cursor: pointer;
}

.hamburger-line {
    width: 1.5rem;
    height: 2px;
    background-color: #fff;
    transition: all 0.3s ease;
    border-radius: 1px;
}

.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-overlay.open {
    opacity: 1;
    visibility: visible;
}

.mobile-sidebar {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100%;
    background-color: #fff;
    z-index: 1000;
    transition: right 0.3s ease;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.mobile-sidebar.open {
    right: 0;
}

.mobile-menu-header {
    background-color: #555e;
    padding: 1rem;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    min-height: 2.5rem;
    box-sizing: border-box;
}

.close-menu-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-icon {
    font-size: 1.5rem;
    color: #fff;
    line-height: 1;
}

.mobile-menu-content {
    flex: 1;
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
}

.mobile-search-form {
    margin-bottom: 2rem;
}

.mobile-search-bar {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    margin-bottom: 0.75rem;
    box-sizing: border-box;
}

.mobile-search-button {
    width: 100%;
    padding: 0.75rem;
    background-color: #57c;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.mobile-search-button:hover {
    background-color: #46b;
}

.mobile-league-links {
    display: flex;
    flex-direction: column;
}

.mobile-league-link {
    padding: 1rem 0.5rem;
    text-decoration: none;
    color: #333;
    font-weight: 600;
    font-size: 1.1rem;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s ease;
}

.mobile-league-link:hover {
    background-color: #f8f9fa;
}

.mobile-league-link:last-child {
    border-bottom: none;
}

@media screen and (max-width: 720px) {
    body {
        font-size: 12px;
    }

    .league-link-container-desktop {
        display: none;
    }

    .hamburger-button {
        display: flex;
    }

    .standings-table th,
    .standings-table td {
        padding: 0.5rem 0.25rem;
    }
}