/* Team Pages CSS - Colors driven by CSS variables set in header.php */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-family: "Lucida Sans", "Lucida Grande", sans-serif;
    background-color: #000000;
    color: #ffffff;
}

body {
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px;
}

/* Header */
.header {
    padding: 20px 10px;
}

.header img {
    max-width: 100%;
    height: auto;
}

/* Navigation Menu */
.menu {
    margin-bottom: 20px;
}

.menu ul {
    list-style-type: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.menu li {
    padding: 8px 16px;
    background-color: var(--color-primary);
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.menu li:hover {
    background-color: var(--color-primary-hover);
}

.menu li a {
    display: block;
    text-decoration: none;
    color: #ffffff;
    font-weight: 500;
    transition: color 0.3s ease;
}

.menu li:hover a {
    color: #000000;
}

/* Admin nav button — orange stands out from any team color scheme */
.menu li:has(.nav-admin-btn) {
    background-color: #e67e22;
    margin-left: auto; /* push to right end of flex row */
}
.menu li:has(.nav-admin-btn):hover {
    background-color: #ca6f1e;
}
.nav-admin-btn {
    font-weight: bold;
    letter-spacing: 0.03em;
}

/* Mobile menu - stack vertically on small screens */
@media (max-width: 768px) {
    .menu ul {
        flex-direction: column;
    }

    .menu li {
        width: 100%;
    }
}

/* Main Content */
.content {
    background-color: #ffffff;
    color: #000000;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 20px;
    min-height: 400px;
}

/* Headings */
h1 {
    color: var(--color-primary);
    margin-bottom: 15px;
    font-size: 1.8rem;
}

h2 {
    color: var(--color-primary);
    margin-bottom: 10px;
    margin-top: 20px;
    font-size: 1.4rem;
}

h3 {
    color: var(--color-heading-alt);
    margin-bottom: 8px;
    font-size: 1.2rem;
}

h4 {
    color: var(--color-heading-alt);
    margin-bottom: 8px;
    margin-top: 15px;
    font-size: 1.1rem;
}

/* Tables */
table {
    background-color: white;
    width: 100%;
    border-collapse: collapse;
    font-family: Arial, Helvetica, sans-serif;
    margin: 15px 0;
    font-size: 0.95rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

table, th, td {
    border: 1px solid #333;
}

th {
    background-color: #ccd4cc;
    color: var(--color-accent);
    font-weight: bold;
    padding: 10px 8px;
    text-align: left;
}

td {
    padding: 8px;
}

/* Stats tables */
table.stats-table th {
    text-align: right;
}

table.stats-table td {
    text-align: right;
}

table.stats-table td:first-child {
    text-align: left;
    font-weight: bold;
}

/* Standings table */
table#stand th {
    background-color: #ccd4cc;
    color: var(--color-accent);
    font-weight: bold;
}

table#stand tr td:nth-child(1) {
    font-weight: bold;
}

table#stand tr td:nth-child(2),
table#stand tr td:nth-child(3) {
    text-align: right;
}

table#stand tr td:nth-child(4) {
    text-align: center;
}

table#stand tr:nth-child(even) {
    background: #ebedde;
}

table#stand tr:nth-child(odd) {
    background: #e3e2cf;
}

/* Alternating row colors for all tables */
tbody tr:nth-child(even) {
    background: #ebedde;
}

tbody tr:nth-child(odd) {
    background: #e3e2cf;
}

/* Table row hover effect */
tbody tr:hover {
    background-color: #d4d9d4 !important;
    cursor: pointer;
}

/* Links */
a {
    color: var(--color-primary);
    text-decoration: none;
}

a:hover {
    color: var(--color-accent);
    text-decoration: underline;
}

/* Home icon/back link */
.back-link {
    display: inline-block;
    margin-bottom: 10px;
}

.back-link img {
    vertical-align: middle;
    margin-right: 5px;
}

/* Footer */
.footer {
    background-color: var(--color-primary);
    border-radius: 5px;
    color: #ffffff;
    text-align: left;
    font-size: 0.9rem;
    padding: 15px;
    margin-top: 20px;
}

.footer p {
    margin: 0;
}

/* Responsive table on mobile */
@media (max-width: 768px) {
    table {
        font-size: 0.85rem;
    }

    th, td {
        padding: 6px 4px;
    }

    /* Allow horizontal scroll for wide tables */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* Utility classes */
.text-right {
    text-align: right;
}

.text-center {
    text-align: center;
}

.bold {
    font-weight: bold;
}

/* Grid layout for stats cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.stat-card {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #ddd;
}

.stat-card h3 {
    margin-top: 0;
    border-bottom: 2px solid var(--color-primary);
    padding-bottom: 5px;
}

/* Note text */
.note {
    font-size: 0.85rem;
    color: #666;
    margin-top: 10px;
    font-style: italic;
}

/* Loading state */
.loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

/* Error message */
.error {
    background-color: #ffebee;
    border-left: 4px solid #f44336;
    padding: 15px;
    margin: 15px 0;
    border-radius: 3px;
}

/* Success message */
.success {
    background-color: #e8f5e9;
    border-left: 4px solid #4caf50;
    padding: 15px;
    margin: 15px 0;
    border-radius: 3px;
}
