﻿* {
    box-sizing: border-box;
}

.select2-result-label .wrap:before {
    position: absolute;
    left: 4px;
    font-family: fontAwesome;
    color: #999;
    content: "\f096";
    width: 25px;
    height: 25px;
}

.select2-result-label .wrap.checked:before {
    content: "\f14a";
}

.select2-result-label .wrap {
    margin-left: 15px;
}

/* Ensure the button has no border and a cool white color */
#refreshStatsButton {
    position: relative; /* Set relative positioning for absolute children */
    border: none;
    background: none;
    color: white;
    font-size: 20px; /* Adjust the icon size */
    padding: 0;
    display: inline-block; /* Ensure the button doesn't stretch */
}

    /* Make the refresh icon white */
    #refreshStatsButton i {
        color: white;
        font-size: 1.5rem; /* Adjust icon size */
    }

/* Position the countdown timer directly on top of the icon */
#cooldownTimer {
    position: absolute;
    top: 2px; /* Position the timer 5px from the top of the button */
    left: 50%; /* Center horizontally within the button */
    transform: translateX(-50%); /* Offset the timer back to center */
    font-size: 1.0rem; /* Smaller font size for the timer */
    background-color: rgba(0, 0, 0, 0.7); /* Dark background */
    border-radius: 50%; /* Make it circular */
    padding: 2px 6px; /* Padding to fit text neatly */
    color: white; /* White text color */
    display: none; /* Initially hidden */
    text-align: center; /* Center the text inside */
}

    /* Show the cooldown timer when active */
    #cooldownTimer.show {
        display: block; /* Show when cooldown is active */
    }

.overlay-content {
    text-align: center;
}

.row {
    padding: 10px;
}

.grid-container-rounds {
    display: grid;
    width: 100%;
    padding-top: 10px;
    margin: 0 auto; /* Centers the container horizontally */
    gap: 15px; /* Space between rows and columns */
    grid-template-columns: 1fr;
}

    .grid-container-rounds .row-1,
    .grid-container-rounds .row-2,
    .grid-container-rounds .row-3 {
        display: grid;
        max-height: 300px; /* Set a max height for rows */
        align-items: start; /* Align content to the top */
        gap: 6px; /* Add space between columns */
    }

    .grid-container-rounds .row-1 {
        grid-template-columns: 7.0fr 3.0fr;
    }

    .grid-container-rounds .row-2 {
        grid-template-columns: 1.9fr 1.5fr 1.5fr 1.5fr 1.9fr 1.7fr;
    }

    .grid-container-rounds .row-3 {
        grid-template-columns: 1fr;
    }

    .grid-container-rounds .grid-item {
        display: flex;
        padding: 0px 2px 2px 2px;
    }

        .grid-container-rounds .row-1 .grid-item canvas {
            width: 100% !important;
            height: 290px !important;
        }

        .grid-container-rounds .row-2 .grid-item canvas {
            width: 100% !important;
            height: 200px !important;
            /*border: dashed*/
        }

#roundContainer {
    max-height: 286px;
    overflow-y: auto;
    /*border: 2px solid #ddd;*/
}

#roundTable thead {
    position: sticky;
    top: 0;
    background-color: white; /* Ensures header remains visible */
    z-index: 2;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1); /* Adds shadow to separate header */
}

#roundTable th {
    background-color: #324958;
    color: #FFFFFF;
    padding: 4px;
    text-align: left;
}

#roundTable td {
    padding: 4px;
    text-align: left;
}

#roundTable tr {
    cursor: pointer;
}

    #roundTable tr:hover {
        color: #FFFFFF !important;
        background-color: #2A3D4666 !important;
    }

    #roundTable tr:hover a.shot-link {
        color: #FFFFFF !important;
    }

        #roundTable tr:hover a.shot-link:hover {
            color: #1A80C8 !important;
        }

#roundTable tr:nth-child(odd) {
    background-color: #FFFFFF;
}

#roundTable tr:nth-child(even) {
    background-color: #E6E6E666;
}

#roundTable .highlight {
    color: #FFFFFF !important;
    background-color: #2A3D4699 !important;
}

    #roundTable .highlight a.shot-link {
        color: #FFFFFF !important;
    }

        #roundTable .highlight a.shot-link:hover {
            color: #33333333 !important;
        }

a.shot-link {
    color: #1A80C899;
    position: relative;
    display: inline-block;
    z-index: 1;
}

    a.shot-link::after {
        content: '';
        position: absolute;
        top: -10px;
        bottom: -10px;
        left: -10px;
        right: -10px;
        z-index: -1; /* Place the pseudo-element behind the link */
    }

#roundScorecardContainer {
    max-height: 300px;
    overflow-y: auto;
    /*border: 2px solid #ddd;*/
}

#roundScorecardTable th {
    background-color: #324958;
    color: white;
    padding: 4px;
    text-align: center;
}

#roundScorecardTable td {
    padding: 4px;
    text-align: center;
}

.team-color-indicator {
    position: absolute;
    top: 0;
    right: 0;
    width: 3px;
    height: 100%;
}

.grid-container-shots {
    display: grid;
    width: 100%;
    margin: 0 auto;
    gap: 25px;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto auto;
}

    .grid-container-shots .dropdown-container {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
        width: 100%;
    }

    .grid-container-shots .row-1 {
        display: grid;
        width: 100%;
        grid-template-columns: 7.5fr 2.5fr;
        gap: 10px;
    }

    .grid-container-shots .row-3 {
        display: flex;
        gap: 10px;
        width: 100%;
    }

        .grid-container-shots .row-3 .grid-item {
            flex: 1 1 0;
            min-width: 0;
        }

    .grid-container-shots .grid-item {
        display: flex;
        padding: 0px 2px 2px 2px;
    }

        .grid-container-shots .grid-item canvas {
            width: 100% !important;
            height: 250px !important;
            max-width: 100%;
        }

#roundCourseNamesContainer,
#roundRoundTypesContainer,
#roundRoundBeginsContainer {
    flex: 1;
    min-width: 150px; /* Prevent too small width */
}

select {
    width: 100%; /* Make each dropdown fill its container */
    padding: 5px;
    font-size: 14px;
}

.form-actions {
    display: flex;
    justify-content: flex-start;
    align-items: center; /* Align both items (button and message) vertically */
    gap: 10px; /* Space between button and message */
    width: 100%;
}

.submit-btn {
    width: 100px;
    font-weight: bold;
    font-size: 14px;
    padding: 5px;
    border: 2px solid #ccc;
    background-color: #1A80C8;
    color: white;
    cursor: pointer;
    text-align: center;
    border-radius: 5px;
    min-height: 40px; /* Ensures uniform height */
    transition: background-color 0.2s ease-in-out, transform 0.1s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 15px 0px 5px 5px;
}

    /* Hover effect */
    .submit-btn:hover {
        transform: scale(1.05);
    }

.roundinfo-container {
    /*display: flex !important;*/
    align-items: center; /* Aligns items vertically */
    justify-content: flex-start; /* Ensures the items are aligned to the left */
    gap: 15px; /* Space between the button and the text */
}

.roundinfo-text {
    font-size: 26px;
    margin: 0; /* Remove margin to align it properly with the button */
    display: inline-block; /* Makes sure it stays on the same line */
    white-space: nowrap; /* Prevents text wrapping to the next line */
}

.back-btn {
    background-color: #1A80C8;
    color: white;
    border: none;
    padding: 8px 15px;
    font-size: 12px;
    cursor: pointer;
    border-radius: 5px;
    transition: background 0.2s ease-in-out;
    display: inline-flex; /* Ensures button is inline with the text */
    align-items: center; /* Vertically center button content */
}

    .back-btn:hover {
        background-color: #0056b3;
    }

.shotcount-container {
    display: flex;
    justify-content: center; /* Center the content horizontally */
    flex-grow: 1; /* Take up the remaining space */
    text-align: center; /* Center-align the text */
    flex-direction: column; /* Stack elements vertically */
}

.shotcount-subtext {
    font-size: 12px; /* Smaller text */
    font-weight: normal;
    color: #666;
}

#shotCount {
    display: block; /* Block-level to allow stacking vertically */
    margin: 10px auto 0px auto; /* Top: 5px, Bottom: 0px */
    padding: 5px 5px 2px 5px; /* Reduce bottom padding */
    line-height: 1.2; /* Reduce space between lines */
    font-size: 18px;
    text-align: center; /* Ensure text is centered */
}

    #shotCount span {
        margin: 0; /* Remove auto margin that was pushing elements */
    }


.club-buttons-container {
    display: flex;
    flex-wrap: wrap; /* Allows wrapping, but only when necessary */
    justify-content: flex-start; /* Spread buttons evenly */
    gap: 5px; /* Small spacing */
    width: 100%;
}

.club-button {
    flex: 1; /* Ensures buttons shrink evenly */
    min-width: 80px; /* Prevents buttons from getting too small */
    max-width: 100px; /* Controls maximum button width */
    padding: 1px;
    border:1px solid #ccc;
    background-color: #f8f8f8;
    cursor: pointer;
    text-align: center;
    border-radius: 5px;
    min-height: 30px; /* Ensures uniform height */
    transition: background-color 0.2s ease-in-out, transform 0.1s ease-in-out;
    display: flex;
    flex-direction: column; /* Stack text & shot count */
    align-items: center;
    justify-content: center;
}

    /* Hover effect */
    .club-button:hover {
        background-color: #e0e0e0;
        transform: scale(1.05);
    }

    /* Selected state */
    .club-button.selected {
        background-color: #5B6265;
        color: white;
        border-color: #5B6265;
    }

/* Club name styling */
.club-name {
    font-weight: bold;
    font-size: 16px;
}

/* Club name styling */
.shot-count {
    font-weight: normal;
    font-size: 12px;
}

/* "Select All" button should span full width */
.select-all-button {
    flex: 1; /* Ensures buttons shrink evenly */
    min-width: 80px;
    max-width: 120px;
    padding: 5px;
    background-color: #1A80C833;
    cursor: pointer;
    text-align: center;
    border-radius: 5px;
    min-height: 30px;
    transition: background-color 0.2s ease-in-out, transform 0.1s ease-in-out;
    display: flex;
    flex-direction: column; /* Stack text if needed */
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 12px;
}

    /* Hover effect for Select All button */
    .select-all-button:hover {
        background-color: #1A80C833;
        transform: scale(1.05);
    }

#playerShotMeasuresContainer {
    max-height: 330px; /* Max height for ~20 rows */
    overflow-y: auto; /* Enable vertical scrolling if needed */
    position: relative;
}

#playerShotMeasuresTable {
    width: 100%; /* Full width */
    border-collapse: collapse; /* Clean borders */
    text-align: center; /* Center text */
    table-layout: fixed; /* Equal column widths */
}

    #playerShotMeasuresTable thead {
        position: sticky;
        top: 0;
        background-color: white; /* Ensure header stays visible */
        z-index: 2;
        box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1);
    }

    /* Header styles */
    #playerShotMeasuresTable th {
        background-color: #324958;
        color: #FFFFFF;
        font-weight: bold;
        padding: 4px;
        border: 1px solid black;
        vertical-align: middle;
    }

    /* Header and cell border styles */
    #playerShotMeasuresTable th,
    #playerShotMeasuresTable td {
        padding: 4px;
        border: 1px solid black;
        text-align: center;
    }

        /* First column special styling (Club Name or Measure label) */
        #playerShotMeasuresTable th:first-child,
        #playerShotMeasuresTable td:first-child {
            background-color: #324958;
            color: #FFFFFF;
            font-weight: bold;
            text-align: left;
            width: 5%;
        }

        /* All other columns */
        #playerShotMeasuresTable th:not(:first-child),
        #playerShotMeasuresTable td:not(:first-child) {
            width: auto;
        }

    /* Alternating row colors */
    #playerShotMeasuresTable tbody tr:nth-child(odd) {
        background-color: #FFFFFF;
    }

    #playerShotMeasuresTable tbody tr:nth-child(even) {
        background-color: #E6E6E666;
    }

    /* Row hover effect */
    #playerShotMeasuresTable tbody tr:hover {
        color: #FFFFFF !important;
        background-color: #2A3D4666 !important;
    }

    #playerShotMeasuresTable tr.highlighted-shot td {
        background-color: #FFCC00 !important;
        color: white;
    }

.print-scorecard-icon {
    cursor: pointer;
    color: #1A80C8;
    font-size: 1.5rem;
    transition: color 0.3s ease, transform 0.2s ease;
}

    .print-scorecard-icon:hover {
        color: #155a8a;
        transform: scale(1.15);
    }

.download-shots-icon {
    cursor: pointer;
    color: #1A80C8; /* or any color that matches your brand */
    margin-left: 8px;
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

    .download-shots-icon:hover {
        color: #155a8a; /* darker hover tone */
    }

@media print {
    @page {
        size: landscape;
    }
    body * {
        visibility: hidden;
        -webkit-print-color-adjust: exact !important; /* For Chrome/Safari */
        print-color-adjust: exact !important; /* For Firefox */
    }

    #printScorecardHeader, #printScorecardHeader *,
    #roundScorecardContainer, #roundScorecardContainer * {
        visibility: visible;
    }

    #printScorecardHeader {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        text-align: center;
        font-size: 20px;
        font-weight: bold;
        margin-top: 20px;
        z-index: 10; /* Ensures it stays on top */
    }

    #roundScorecardContainer {
        position: absolute;
        top: 60px; /* Push down to make space for header */
        left: 0;
        width: 100%;
        z-index: 5; /* Ensures it's below the header */
    }
}

#toggleCirclesContainer {
    position: absolute;
    top: 10px;
    left: 0px;
    z-index: 10;
    background-color: #ffffff;
    border-radius: 4px;
    padding: 6px 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

    #toggleCirclesContainer:hover {
        background-color: #f0f0f0ee;
    }

    #toggleCirclesContainer i {
        color: #1A80C8;
        font-size: 18px;
    }

#toggleCircles {
    cursor: pointer;
}

#toggleScaleContainer {
    position: absolute;
    width: 51px;
    top: 10px;
    left: 0px; /* You can change this to 'left' if you want it on the same side */
    z-index: 10;
    background-color: #ffffff;
    border-radius: 4px;
    padding: 6px 6px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

    #toggleScaleContainer:hover {
        background-color: #f0f0f0ee;
    }

    #toggleScaleContainer i {
        color: #1A80C8;
        font-size: 18px;
    }

    #toggleScaleContainer.disabled {
        opacity: 0.5;
        pointer-events: none;
        cursor: not-allowed;
    }

#toggleScale {
    cursor: pointer;
}

#selectedShotsActionsContainer {
    position: absolute;
    top: -34px;
    right: 10px;
    z-index: 10;
    display: flex;
    gap: 8px;
}

    #selectedShotsActionsContainer button {
        all: unset;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 6px;
        border-radius: 4px;
        background-color: #ffffff;
        box-shadow: 0 0 2px rgba(0, 0, 0, 0.1);
        transition: background-color 0.2s ease, box-shadow 0.2s ease;
    }

        #selectedShotsActionsContainer button:hover {
            background-color: #f0f0f0ee;
            box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);
        }

        #selectedShotsActionsContainer button i {
            color: #1A80C8;
            font-size: 18px;
        }

    #selectedShotsActionsContainer select {
        padding: 6px 8px;
        border-radius: 4px;
        border: 1px solid #ccc;
        font-size: 14px;
    }

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Grey-out effect */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background-color: #ffffff;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    max-width: 450px;
}

.modal-buttons {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

#confirmationModal.hidden {
    display: none;
}

.modal-buttons button {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#confirmYes {
    background-color: #dc3545; /* Bootstrap red for Delete/Confirm */
    color: white;
}

#confirmNo {
    background-color: #6c757d; /* Bootstrap gray for cancel */
    color: white;
}


#shotViewToggleContainer {
    position: absolute;
    top: -32px;
    left: 10px;
    z-index: 10;
    display: flex;
    gap: 8px;
}

    #shotViewToggleContainer button {
        all: unset;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 6px;
        border-radius: 4px;
        background-color: #ffffff;
        box-shadow: 0 0 2px rgba(0, 0, 0, 0.1);
        transition: background-color 0.2s ease, box-shadow 0.2s ease;
    }

        #shotViewToggleContainer button:hover {
            background-color: #f0f0f0ee;
            box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);
        }

        #shotViewToggleContainer button i {
            color: #1A80C8;
            font-size: 18px;
        }

#toggleSummary.active,
#toggleAllShots.active {
    background-color: #e6f2fb;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);
}

.wider-select {
    padding-right: 2rem; /* for dropdown arrow spacing */
    width: 100%; /* or adjust as needed */
}