﻿/* ========== Base Typography & Layout ========== */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f8;
    margin: 0;
    padding: 0;
}

/* ========== Headings ========== */
h1, h2, h3 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    color: #222;
    margin-bottom: 1rem;
    text-align: center;
}

h1 {
    font-size: 2.25rem;
}

h2 {
    font-size: 1.75rem;
}

/* ========== StatBox Section ========== */
.StatBox {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 2rem 1.5rem;
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    text-align: center;
}

/* ========== News Article / Copy ========== */
.NewsCopy {
    text-align: left;
    margin: 0 auto;
    max-width: 900px;
    padding: 1.5rem;
    background-color: #fafafa;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
    font-size: 1.05rem;
    line-height: 1.8;
}

    .NewsCopy p {
        margin-bottom: 1.2rem;
    }

/* ========== Player Table ========== */
/* GridView support styles */
.PlayerTable {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem auto;
    font-size: 1rem;
    text-align: center;
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

    .PlayerTable th {
        background-color: #004b6b;
        color: white;
        padding: 12px;
        font-weight: 600;
    }

    .PlayerTable td {
        padding: 10px;
        border-bottom: 1px solid #eaeaea;
    }

    .PlayerTable tr:nth-child(even) {
        background-color: #f9f9f9;
    }

    .PlayerTable tr:hover {
        background-color: #eef4f8;
    }

.table-selected-row {
    background-color: #339966;
    color: #fff;
    font-weight: bold;
}

.table-pager {
    background-color: #004b6b;
    color: white;
}


/* ========== Team Colors ========== */
.team-blue {
    background-color: #0074cc;
    color: #ffffff;
}

.team-red {
    background-color: #cc0033;
    color: #ffffff;
}

/* ========== Utility ========== */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-4 {
    margin-top: 2rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-4 {
    margin-bottom: 2rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.byline {
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    color: #777;
    margin-bottom: 20px;
    text-align: left; /* change to center if you prefer */
}


.CupNav {
    margin: 2rem auto;
    padding: 1rem 2rem;
    max-width: 800px;
    text-align: center;
}

.section-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #003344;
}

/* Image Styling */
.full-width-image {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    margin-bottom: 1.5rem;
}

/* Section Titles */
.section-title {
    font-size: 2rem;
    margin: 1rem 0 0.5rem;
    text-align: center;
    color: #003344;
}

.section-description {
    text-align: center;
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: #444;
}

/* History List */
.HistoryList {
    list-style: none;
    padding: 0;
    margin: 0 auto;
    max-width: 800px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 1.1rem;
    line-height: 1.5;
    color: #333;
}

    .HistoryList li {
        display: flex;
        align-items: center; /* vertically center label and text */
        text-align:left;
        margin-bottom: 12px;
        padding-left: 0; /* no padding needed now */
        border-bottom: 1px solid #eee;
        font-size: 1rem;
    }

        .HistoryList li::before {
            content: attr(data-label);
            display: inline-block;
            background-color: #007BFF; /* default blue, override for red below */
            color: white;
            border-radius: 12px;
            font-weight: 700;
            font-size: 0.75rem; /* slightly smaller */
            padding: 3px 8px; /* smaller padding */
            margin-right: 12px;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            white-space: nowrap;
            min-width: 50px; /* fixed width */
            text-align: center; /* center the text */
        }


        /* Override for red */
        .HistoryList li.red::before {
            background-color: #DC3545;
        }

        .HistoryList li.blue::before {
            background-color: #007BFF;
        }



        /* Updated labels */

        .HistoryList li.teamred::before {
            content: "RED";
            background-color: #c62828; /* deep red */
        }

        .HistoryList li.teamblue::before {
            content: "BLUE";
            background-color: #1565c0; /* strong blue */
        }

        .HistoryList li.halved::before {
            content: "HALVED";
            background-color: #9e9e9e; /* gray */
        }

        /* Optional hover effect for readability */

        .HistoryList li:hover {
            background-color: #f9f9f9;
        }



/* Team Colors */
.teamred {
    color: #cc0000;
    font-weight: bold;
}

.teamblue {
    color: #004b8d;
    font-weight: bold;
}

.halved {
    color: #999;
    font-style: italic;
}

.item-number {
    font-weight: 700;
    background-color: #2F4F4F; 
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    margin-right: 12px;
    min-width: 3ch;
    text-align: center;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    box-shadow: 0 2px 5px rgba(0, 123, 255, 0.4);
    user-select: none;
}

.team-link {
    color: inherit;
    text-decoration: none;
    margin-right: 12px; /* space between name and win-loss */
}

    .team-link:hover {
        text-decoration: underline;
    }

.win-loss {
    color: #888;
    font-weight: 600;
    white-space: nowrap;
}

.PillTag {
    display: inline-block;
    background-color: #007BFF; /* default blue */
    color: white;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.75rem;
    padding: 3px 8px;
    margin-right: 12px;
    margin-top: 3px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    white-space: nowrap;
    min-width: 50px; /* fixed width for uniform size */
    text-align: center;
}

    .PillTag.blue {
        background-color: #007BFF;
    }

    .PillTag.red {
        background-color: #DC3545;
    }

    .PillTag.halved 
    {
        background-color: lightgray;
    }

.roster-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #fefefe;
    border: 1px solid #ccc;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

.roster-table th,
.roster-table td {
    padding: 12px 16px;
    font-size: 0.95rem;
    vertical-align: middle;
    border-bottom: 1px solid #e2e2e2;
}

.roster-table th {
    background-color: #f5f5f5;
    font-weight: 700;
    text-align: center;
    font-size: 1rem;
}

.roster-table th.team-blue {
    background-color: #007BFF;
    color: white;
    border-right: 2px solid white;
}

.roster-table th.team-red {
    background-color: #DC3545;
    color: white;
    border-left: 2px solid white;
}

.roster-table td {
    background-color: #fff;
}

.roster-table tr:nth-child(even) td {
    background-color: #f9f9f9;
}

.roster-table td:nth-child(2),
.roster-table td:nth-child(4) {
    text-align: center;
    width: 60px;
    font-weight: bold;
    color: #333;
}

.roster-table td:nth-child(2) {
    border-right: 2px solid #ddd;
}

.roster-table td:nth-child(3) {
    border-left: 2px solid #ddd;
}

    /* Added styles for player-name and handicap */
    .roster-table td.player-name {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .roster-table td.handicap {
        text-align: center;
        font-weight: 700;
        font-size:1.2em;
        color: #333;
        width: 60px; /* Keep consistent width */
    }

.concord-cup {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 700;
    font-size: 3.5rem;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    background: linear-gradient(145deg, #444, #bbb);
    -webkit-background-clip: text;

}







/* Nav container */
.nav-container {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #fefefe;
    padding: 0.5rem 1rem;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    position: relative;
    z-index: 1000; /* make sure nav stays on top */
}

/* Navigation list */
.cuplinks {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    list-style: none;
    margin: 0;
    padding: 0;
}

    /* Navigation links - light theme */
    .cuplinks a {
        display: inline-block;
        padding: 6px 16px;
        border-radius: 9999px;
        background: linear-gradient(135deg, #f7f7f7, #eaeaea); /* light background */
        color: #222; /* dark text */
        font-weight: 600;
        font-size: 0.9rem;
        text-decoration: none;
        transition: background 0.3s ease, box-shadow 0.3s ease;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* softer shadow for light background */
    }

        .cuplinks a:hover {
            background: linear-gradient(135deg, #e2e2e2, #d4d4d4); /* slightly darker on hover */
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
        }

        .cuplinks a:active {
            transform: scale(0.97);
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) inset;
        }


/* Reset images inside container */
.hole-diagram,
.hole-photo {
    width: 100%;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    object-fit: contain; /* ensure no distortion */
}

/* Course Navigation */
.course-navigation {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 10px 0;
}

    .course-navigation label {
        font-weight: 600;
        min-width: 40px;
        text-align: right;
    }

.hole-dropdown {
    min-width: 60px;
    max-width: 100px;
    padding: 6px;
    font-size: 1rem;
}

.nav-button {
    padding: 8px 14px;
    font-size: 1.2rem;
    cursor: pointer;
    border-radius: 5px;
    border: 1px solid #007bff;
    background: white;
    color: #007bff;
    transition: background-color 0.3s, color 0.3s;
}

    .nav-button:hover {
        background-color: #007bff;
        color: white;
    }

/* Hole Info Section */
.hole-info-section {
    padding: 20px;
    max-width: 900px;
    margin: auto;
}

/* Hole Info Card: container */
.hole-info-card {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    border: 1px solid #ddd;
    padding: 20px;
    border-radius: 8px;
    background-color: #fefefe;
    box-sizing: border-box;
}

/* Info Grid: labels and values */
.hole-info-grid {
    flex: 1 1 300px;
    min-width: 260px;
    display: grid;
    grid-template-columns: max-content auto;
    column-gap: 12px;
    row-gap: 10px;
    font-size: 2.0rem;
    overflow-wrap: break-word;
}

    .hole-info-grid .label {
        font-weight: 200;

        color: #555;
        min-width: 90px;
        white-space: nowrap;
    }
    .hole-info-grid span {
        font-weight: 600;
        color: #333;
        white-space: nowrap;
    }

    .hole-info-grid div {
        min-width: 0;
        color: #222;
    }

/* Images container */
.hole-info-images {
    flex: 1 1 300px;
    min-width: 280px;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    justify-content: center;
    align-items: center;
}

/* Hole Writeup */
.HoleWriteup {
    font-size: 1rem;
    line-height: 1.4;
    max-width: 900px;
    margin: 20px auto;
    padding: 0 10px;
}

/* Next Button */
.next-hole-button {
    padding: 10px 24px;
    font-size: 1rem;
    border-radius: 6px;
    border: none;
    background-color: #007bff;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s;
}

    .next-hole-button:hover {
        background-color: #0056b3;
    }

/* Responsive for smaller screens */
@media (max-width: 600px) {
    .hole-info-card {
        flex-direction: column;
        padding: 15px;
    }

    .hole-info-grid,
    .hole-info-images {
        flex: 1 1 100%;
        min-width: auto;
        max-width: 100%;
    }

    .hole-info-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px 24px;
        font-size: 0.85rem;
    }




    .hole-info-grid > div {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 4px 0;
        border-bottom: 1px solid #eee;
        min-width: 0; /* allow text wrap */
    }

    .hole-info-grid .label {
        font-weight: 200;
        color: #555;
        min-width: 90px;
        white-space: nowrap;
    }

    .HoleInfo {
        font-weight: 700;
        color: #222;
        text-align: right;
        white-space: normal; /* allow wrap if needed */
        flex-grow: 1; /* take remaining space */
        overflow-wrap: break-word;
    }


        .hole-info-grid span {
            white-space: normal;
            flex-shrink: 0;
            font-weight: 600;
            color: #555;
            margin-right: 12px;
        }

        .hole-info-grid span {
            font-weight: 600;
            color: #555; /* softer/dimmer */
        }

        .hole-info-grid div > .HoleInfo {
            font-weight: 700;
            color: #222; /* darker for data */
        }


    .course-navigation {
        gap: 6px;
    }

    .hole-dropdown,
    .nav-button {
        min-width: 50px;
        font-size: 1rem;
        padding: 6px 10px;
    }
}

.history-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 15px;
    text-align: center; /* center text and image */
}

.centered-image {
    height: auto;
    border-radius: 8px;
    margin-bottom: 30px;
    display: inline-block; /* keeps image centered */
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

@media (max-width: 600px) {
    .history-container {
        padding: 0 15px; /* less padding on phones */
    }
}

/* Show toggle only on small screens */
.nav-toggle {
    display: none; /* hide by default */
}


/* Default: Hide the menu on mobile */
@media (max-width: 720px) {
    #mainNav {
        display: none;
        flex-direction: column;
        background-color: white;
        padding: 10px;
        border-radius: 8px;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        margin-top: 10px;
        text-align: center;
    }

        #mainNav.show {
            display: flex;
        }

    .nav-toggle {
        display: flex;
        flex-direction: column;
        gap: 4px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 10px;
    }

        .nav-toggle .bar {
            width: 25px;
            height: 3px;
            background-color: #333;
            display: block;
            border-radius: 2px;
        }
}


.PairingsList {
    font-family: sans-serif;
    font-size: 1.1em;
    max-width: 800px;
    margin: auto;
    padding: 1em;
    text-align: center;
}

    .PairingsList h3 {
        margin: 1em 0 0.5em;
        font-size: 1.4em;
        color: #333;
    }

    .PairingsList ul {
        list-style: none;
        padding: 0;
        border: 2px solid #808080;
        border-radius: 8px;
        overflow: hidden;
        margin-bottom: 2em;
    }

        .PairingsList ul li {
            padding: 1em;
            border-bottom: 1px solid #ccc;
            background-color: #fdfdfd;
        }

            .PairingsList ul li:last-child {
                border-bottom: none;
            }

.match-header {
    font-weight: bold;
    margin-bottom: 0.5em;
    color: #555;
}

.teams {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5em;
    margin-bottom: 0.5em;
}

    .teams .RedTeam  {
        flex: 1 1 45%;
        text-align: left;
    }

    .teams .BlueTeam {
        flex: 1 1 45%;
        text-align: right;
    }

    .teams .vs {
        flex: 0 0 auto;
        align-self: center;
        padding: 0 0.5em;
        font-weight: bold;
        color: #444;
    }

.Tout {
    font-size: 0.9em;
    color: #666;
    margin-top: 0.25em;
}

.BlueOdds {font-size:1.1em; color: darkblue; font-weight:bold;}
.RedOdds  {font-size:1.1em; color:darkred; font-weight: bold;}
.EvenOdds {font-size:1.1em; color:black; font-weight: bold;}

/* Responsive: Stack teams vertically on small screens */
@media (max-width: 600px) {
    .teams {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

        .teams .RedTeam,
        .teams .BlueTeam {
            text-align: center;
            flex: 1 1 100%;
        }

        .teams .vs {
            margin: 0.5em 0;
        }
}
