/* Shared VIPL layout and responsive containment. */

#vipl-site-frame {
    width: 1500px;
    max-width: calc(100vw - 16px);
    min-width: 0;
    min-height: 100vh;
    margin: 0 auto;
    overflow-x: hidden;
}

#vipl-wide-content {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

#vipl-container {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0 auto;
    overflow-x: hidden;
}

.vipl-table-scroll {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

.vipl-table-scroll > table {
    margin-right: auto;
    margin-left: auto;
}


.theader,
.blank {
    color: #ccc;
    background: linear-gradient(86deg, rgb(116, 116, 116) 0%, rgb(55, 55, 55) 50%, rgb(116, 116, 116) 100%);
}

.theader {
    border-top: 1px solid #ccc;
    border-left: 1px solid #ccc;
    border-right: 1px solid #ccc;
}

.divider,
.bluedivider,
.reddivider {
    width: 100%;
    height: 27px;
    color: #ccc;
    border-top: 2px solid #ccc;
    border-bottom: 2px solid #ccc;
    vertical-align: top;
}

.divider {
    background: linear-gradient(86deg, rgb(31, 31, 31) 0%, rgb(49, 106, 96) 50%, rgb(31, 31, 31) 100%);
}

.bluedivider {
    background: radial-gradient(circle, rgb(24, 34, 162) 0%, rgb(12, 20, 71) 50%);
}

.reddivider {
    background: radial-gradient(circle, rgb(159, 16, 16) 0%, rgb(101, 14, 21) 50%, rgb(125, 13, 13) 100%);
}

.dark {
    background: radial-gradient(circle, rgb(0, 0, 0) 0%, rgb(142, 116, 121) 100%);
}

.winnerwinnerrubberchickendinner {
    color: #ccc;
    font-size: 18px;
    font-weight: bold;
    background: linear-gradient(86deg, rgb(26, 31, 87) 0%, rgb(21, 34, 185) 50%, rgb(26, 31, 87) 100%);
}

.gold,
.silver,
.bronze {
    font-size: 20px;
    font-weight: bold;
    text-align: center;
}

.gold {
    background: linear-gradient(86deg, rgb(131, 97, 66) 0%, rgb(233, 199, 12) 50%, rgb(131, 97, 66) 100%);
}

.silver {
    background: linear-gradient(86deg, rgb(126, 126, 126) 0%, rgb(192, 192, 192) 50%, rgb(126, 126, 126) 100%);
}

.bronze {
    background: linear-gradient(86deg, rgb(131, 98, 68) 0%, rgb(161, 102, 36) 50%, rgb(131, 98, 68) 100%);
}


.dot {
    display: inline-block;
    width: 11px;
    height: 11px;
    margin: 0 8px;
    background: linear-gradient(
        135deg,
        #ddd 0%,
        #999 45%,
        #666 100%
    );
    border: 1px solid #bbb;
    border-radius: 1px;
    box-sizing: border-box;
    transform: rotate(45deg);
    vertical-align: 0.08em;
}

.legend_fifth,
.legend_fourth,
.legend_third,
.legend_second,
.legend_first {
    display: inline-block;
    margin: 0 5px;
    color: #000;
    font-size: 20px;
    text-align: center;
    border: 1px solid #ccc;
}

.legend_fifth {
    background: linear-gradient(86deg, rgb(94, 129, 100) 0%, rgb(142, 180, 142) 50%, rgb(94, 129, 100) 100%);
}

.legend_fourth {
    background: radial-gradient(circle, rgb(209, 204, 112) 0%, rgb(156, 154, 101) 52%);
}

.legend_third {
    background: radial-gradient(circle, rgb(243, 243, 243) 0%, rgb(222, 221, 219) 52%);
}

.legend_second {
    background: radial-gradient(circle, rgb(209, 112, 112) 0%, rgb(156, 101, 101) 52%);
}

.legend_first {
    color: #eee;
    background: linear-gradient(86deg, rgb(71, 106, 200) 0%, rgb(33, 56, 102) 50%, rgb(71, 106, 200) 100%);
}

.month {
    color: #eee;
    background: radial-gradient(circle, rgb(75, 75, 75) 0%, rgb(110, 110, 110) 100%);
    border: 1px solid #ccc;
}

.rimfire {
    background: linear-gradient(86deg, rgb(112, 132, 152) 0%, rgb(153, 164, 175) 50%, rgb(112, 132, 152) 100%);
}

.centerfire {
    background: linear-gradient(86deg, rgb(94, 129, 100) 0%, rgb(142, 180, 142) 50%, rgb(94, 129, 100) 100%);
}

.combined {
    background: linear-gradient(86deg, rgb(145, 120, 71) 0%, rgb(172, 137, 88) 50%, rgb(129, 117, 94) 100%);
}

.total {
    background: linear-gradient(86deg, rgb(147, 83, 83) 0%, rgb(176, 102, 102) 50%, rgb(147, 83, 83) 100%);
}

.first,
.second,
.third,
.fourth,
.fifth {
    text-align: center;
}

.first {
    color: #eee;
    background: linear-gradient(86deg, rgb(71, 106, 200) 0%, rgb(33, 56, 102) 50%, rgb(71, 106, 200) 100%);
}

.second,
.third,
.fourth,
.fifth {
    font-weight: bold;
}

.second {
    background: radial-gradient(circle, rgb(209, 112, 112) 0%, rgb(156, 101, 101) 52%);
}

.third {
    background: radial-gradient(circle, rgb(243, 243, 243) 0%, rgb(222, 221, 219) 52%);
}

.fourth {
    background: radial-gradient(circle, rgb(209, 204, 112) 0%, rgb(156, 154, 101) 52%);
}

.fifth {
    background: linear-gradient(86deg, rgb(94, 129, 100) 0%, rgb(142, 180, 142) 50%, rgb(94, 129, 100) 100%);
}

.rf_score {
    text-align: center;
    background: #acb9c5;
}

.cf_score {
    text-align: center;
    background: #bec6bd;
}

.combined_score {
    text-align: center;
    background: #beb6aa;
}

.ranks {
    text-align: center;
}

#vipl-container .rf_score {
    text-align: center;
    background: #acb9c5;
}

#vipl-container .cf_score {
    text-align: center;
    background: #bec6bd;
}

#vipl-container .combined_score {
    text-align: center;
    background: #beb6aa;
}

/* VIPL shooter-table body column colors.
 * League tables retain their dedicated shared styling.
 */

#vipl-container .vipl-table-scroll table:not(.league-scores):not(.vipl-club-table) tbody td:nth-child(-n+3) {
    background-color: #999;
}

#vipl-container .vipl-table-scroll table:not(.league-scores):not(.vipl-club-table) tbody td:nth-child(n+4):nth-child(-n+12) {
    background-color: #acb9c5;
}

#vipl-container .vipl-table-scroll table:not(.league-scores):not(.vipl-club-table) tbody td:nth-child(n+13):nth-child(-n+15) {
    background-color: #beb6aa;
}

#vipl-container .vipl-table-scroll table:not(.league-scores):not(.vipl-club-table) tbody td:nth-child(n+16):nth-child(-n+24) {
    background-color: #bec6bd;
}

#vipl-container .vipl-table-scroll table:not(.league-scores):not(.vipl-club-table) tbody td:nth-child(n+25):nth-child(-n+27) {
    background-color: #beb6aa;
}

#vipl-container .vipl-table-scroll table:not(.league-scores):not(.vipl-club-table) tbody td:nth-child(n+28):nth-child(-n+29) {
    background-color: #ddbab7;
}

/* Selected-club tables have two leading columns:
   Rank and Shooter. */
#vipl-container .vipl-club-table tbody td:nth-child(-n+2) {
    background-color: #999;
}

/* Rimfire stages. */
#vipl-container .vipl-club-table tbody td:nth-child(n+3):nth-child(-n+11) {
    background-color: #acb9c5;
}

/* Rimfire Total. */
#vipl-container .vipl-club-table tbody td:nth-child(n+12):nth-child(-n+14) {
    background-color: #c7bfb1;
}

/* Centerfire stages. */
#vipl-container .vipl-club-table tbody td:nth-child(n+15):nth-child(-n+23) {
    background-color: #bec6bd;
}

/* Centerfire Total. */
#vipl-container .vipl-club-table tbody td:nth-child(n+24):nth-child(-n+26) {
    background-color: #c7bfb1;
}

/* Combined Total. */
#vipl-container .vipl-club-table tbody td:nth-child(n+27):nth-child(-n+28) {
    background-color: #d7bbbb;
}

/* Compact VIPL shooter-table headers. */
#vipl-container .vipl-table-scroll table:not(.league-scores) thead td {
    height: auto;
    padding: 2px 4px;
    font-size: 15px;
    line-height: 1.1;
}

#vipl-container .vipl-table-scroll table:not(.league-scores) thead td.month {
    font-size: 14px;
}

#vipl-container .vipl-table-scroll table:not(.league-scores) thead .dt-column-title {
    line-height: 1.1;
}

/* Keep the John Holt shooter table inside the VIPL frame on desktop. */
@media screen and (min-width: 1025px) {
    #vipl-container table.john-holt-scores {
        width: 96% !important;
        max-width: 96%;
        margin-right: auto;
        margin-left: auto;
        table-layout: fixed;
    }

    #vipl-container table.john-holt-scores th,
    #vipl-container table.john-holt-scores td {
        min-width: 0;
        overflow: hidden;
    }
    #vipl-container table.john-holt-scores col:nth-child(1),
    #vipl-container table.john-holt-scores th:nth-child(1),
    #vipl-container table.john-holt-scores td:nth-child(1) {
        width: 40px !important;
    }

    #vipl-container table.john-holt-scores col:nth-child(2),
    #vipl-container table.john-holt-scores th:nth-child(2),
    #vipl-container table.john-holt-scores td:nth-child(2) {
        width: 170px !important;
    }

    #vipl-container table.john-holt-scores col:nth-child(3),
    #vipl-container table.john-holt-scores th:nth-child(3),
    #vipl-container table.john-holt-scores td:nth-child(3) {
        width: 120px !important;
    }

    /* Score columns. */
    #vipl-container table.john-holt-scores col:nth-child(4),
    #vipl-container table.john-holt-scores col:nth-child(7),
    #vipl-container table.john-holt-scores col:nth-child(10),
    #vipl-container table.john-holt-scores col:nth-child(13),
    #vipl-container table.john-holt-scores col:nth-child(16),
    #vipl-container table.john-holt-scores col:nth-child(19),
    #vipl-container table.john-holt-scores col:nth-child(22),
    #vipl-container table.john-holt-scores col:nth-child(25),
    #vipl-container table.john-holt-scores col:nth-child(28) {
        width: 50px !important;
    }

    /* X-count columns. */
    #vipl-container table.john-holt-scores col:nth-child(5),
    #vipl-container table.john-holt-scores col:nth-child(8),
    #vipl-container table.john-holt-scores col:nth-child(11),
    #vipl-container table.john-holt-scores col:nth-child(14),
    #vipl-container table.john-holt-scores col:nth-child(17),
    #vipl-container table.john-holt-scores col:nth-child(20),
    #vipl-container table.john-holt-scores col:nth-child(23),
    #vipl-container table.john-holt-scores col:nth-child(26),
    #vipl-container table.john-holt-scores col:nth-child(29) {
        width: 28px !important;
    }

    /* Place/rank columns within each score group. */
    #vipl-container table.john-holt-scores col:nth-child(6),
    #vipl-container table.john-holt-scores col:nth-child(9),
    #vipl-container table.john-holt-scores col:nth-child(12),
    #vipl-container table.john-holt-scores col:nth-child(15),
    #vipl-container table.john-holt-scores col:nth-child(18),
    #vipl-container table.john-holt-scores col:nth-child(21),
    #vipl-container table.john-holt-scores col:nth-child(24),
    #vipl-container table.john-holt-scores col:nth-child(27) {
        width: 40px !important;
    }

    #vipl-container table.vipl-club-table {
        table-layout: fixed;
    }

    #vipl-container table.vipl-club-table col:nth-child(1),
    #vipl-container table.vipl-club-table th:nth-child(1),
    #vipl-container table.vipl-club-table td:nth-child(1) {
        width: 55px !important;
    }

    #vipl-container table.vipl-club-table col:nth-child(2),
    #vipl-container table.vipl-club-table th:nth-child(2),
    #vipl-container table.vipl-club-table td:nth-child(2) {
        width: 220px !important;
    }

    /* Score columns */
    #vipl-container table.vipl-club-table col:nth-child(3),
    #vipl-container table.vipl-club-table col:nth-child(6),
    #vipl-container table.vipl-club-table col:nth-child(9),
    #vipl-container table.vipl-club-table col:nth-child(12),
    #vipl-container table.vipl-club-table col:nth-child(15),
    #vipl-container table.vipl-club-table col:nth-child(18),
    #vipl-container table.vipl-club-table col:nth-child(21),
    #vipl-container table.vipl-club-table col:nth-child(24),
    #vipl-container table.vipl-club-table col:nth-child(27) {
        width: 50px !important;
    }

    /* X columns */
    #vipl-container table.vipl-club-table col:nth-child(4),
    #vipl-container table.vipl-club-table col:nth-child(7),
    #vipl-container table.vipl-club-table col:nth-child(10),
    #vipl-container table.vipl-club-table col:nth-child(13),
    #vipl-container table.vipl-club-table col:nth-child(16),
    #vipl-container table.vipl-club-table col:nth-child(19),
    #vipl-container table.vipl-club-table col:nth-child(22),
    #vipl-container table.vipl-club-table col:nth-child(25),
    #vipl-container table.vipl-club-table col:nth-child(28) {
        width: 30px !important;
    }

    /* Place columns */
    #vipl-container table.vipl-club-table col:nth-child(5),
    #vipl-container table.vipl-club-table col:nth-child(8),
    #vipl-container table.vipl-club-table col:nth-child(11),
    #vipl-container table.vipl-club-table col:nth-child(14),
    #vipl-container table.vipl-club-table col:nth-child(17),
    #vipl-container table.vipl-club-table col:nth-child(20),
    #vipl-container table.vipl-club-table col:nth-child(23),
    #vipl-container table.vipl-club-table col:nth-child(26) {
        width: 42px !important;
    }

}

@media screen and (max-width: 1024px) {
    /*
     * Use the entire viewport width on phones.
     */
    #vipl-site-frame {
        width: 100%;
        max-width: none;
        margin-right: 0;
        margin-left: 0;
        border-right: 0;
        border-left: 0;
    }

    #vipl-wide-content,
    #vipl-container {
        width: 100%;
        max-width: none;
        margin-right: 0;
        margin-left: 0;
    }
    #vipl-container table.vipl-club-table
    td.vipl-club-title center {
        position: sticky;
        left: 0;
        z-index: 4;
        box-sizing: border-box;
        width: calc(100vw - 32px);
        padding: 6px 8px;
        text-align: left;
        background: inherit;
    }

    #vipl-container table.league-scores
    td.vipl-league-title center {
        position: sticky;
        left: 0;
        z-index: 4;
        box-sizing: border-box;
        width: calc(100vw - 32px);
        padding: 6px 8px;
        text-align: left;
        background: inherit;
    }

    /*
     * Selected-club tables:
     * keep Shooter visible while Rank and scores scroll.
     */
    #vipl-container table.vipl-club-table
    tbody td.club-shooter-column {
        position: sticky;
        left: 0;
        z-index: 3;
        min-width: 100px;
        background-color: #999;
        box-shadow: 3px 0 5px rgba(0, 0, 0, 0.3);
    }

    #vipl-container .vipl-table-scroll
    table.vipl-club-table thead tr.month
    td:nth-child(2) {
        position: sticky !important;
        left: 0 !important;
        z-index: 10;
        min-width: 100px;
        background-color: #999;
        box-shadow: 3px 0 5px rgba(0, 0, 0, 0.3);
    }

    /*
     * Monthly and John Holt shooter tables:
     * keep Shooter visible while Rank, Club, and scores scroll.
     */
    #vipl-container table:not(.vipl-club-table):not(.league-scores)
    tbody td.vipl-shooter-column {
        position: sticky;
        left: 0;
        z-index: 3;
        min-width: 220px;
        background-color: #999;
        box-shadow: 3px 0 5px rgba(0, 0, 0, 0.3);
    }

    #vipl-container table:not(.vipl-club-table):not(.league-scores)
    thead tr.month td.vipl-shooter-column {
        position: sticky;
        left: 0;
        z-index: 5;
        min-width: 220px;
        background-color: #999;
        box-shadow: 3px 0 5px rgba(0, 0, 0, 0.3);
    }

    /*
     * League tables:
     * keep Club visible while Rank and score columns scroll.
     */
    #vipl-container table.league-scores
    tbody td.vipl-league-club-column {
        position: sticky;
        left: 0;
        z-index: 3;
        min-width: 100px;
        background-color: #999;
        box-shadow: 3px 0 5px rgba(0, 0, 0, 0.3);
    }

    #vipl-container table.league-scores
    thead tr.month td.vipl-league-club-column {
        position: sticky;
        left: 0;
        z-index: 5;
        min-width: 100px;
        background-color: #999;
        box-shadow: 3px 0 5px rgba(0, 0, 0, 0.3);
    }

}

.vipl-table-section {
    margin-bottom: 3rem;
}

.monthly-shooter-heading {
    color: #ccc;
    font-size: 20px;
}

#vipl-container table.monthly-shooter-scores {
    width: 1400px;
    text-align: center;
}

.score-scroll-hint + .vipl-table-scroll {
    margin-top: 0.5rem;
}

#vipl-container table.john-holt-league-scores {
    width: 1275px;
    text-align: center;
}

#vipl-container table.club-league-scores {
    width: 1275px;
    text-align: center;
}

#vipl-container table.vipl-club-table {
    width: 1475px;
    text-align: center;
}

.vipl-table-divider {
    background-color: #333;
}

.vipl-totals-row {
    color: darkred;
    font-weight: bold;
}

#vipl-container table.vipl-club-table tfoot .vipl-totals-row {
    color: #d65b5b;
    font-weight: bold;
}

#vipl-container table.vipl-club-table tfoot .vipl-totals-row > td {
background:
    linear-gradient(
        90deg,
        #858585 0%,
        #666 40%,
        #555 50%,
        #666 60%,
        #858585 100%
    );
}

#vipl-container table.vipl-club-table tfoot td.rf_score {
    color: darkred;
    background: #acb9c5;
}

#vipl-container table.vipl-club-table tfoot td.cf_score {
    color: darkred;
    background: #bec6bd;
}

#vipl-container table.vipl-club-table tfoot td.combined_score {
    color: darkred;
    background: #ddbab7;
}

#vipl-container table.vipl-club-table tfoot td.vipl-totals-label {
    color: darkred;
    background: #999;
    font-weight: bold;
    text-align: center;
}

#vipl-container .vipl-club-table tbody td.vipl-rimfire-stage-cell {
    background-color: #acb9c5;
}

#vipl-container .vipl-club-table tbody td.vipl-rimfire-total-cell {
    background-color: #beb6aa;
}

#vipl-container .vipl-club-table tbody td.vipl-centerfire-stage-cell {
    background-color: #bec6bd;
}

#vipl-container .vipl-club-table tbody td.vipl-centerfire-total-cell {
    background-color: #beb6aa;
}

#vipl-container .vipl-club-table tbody td.vipl-combined-total-cell {
    background-color: #ddbab7;
}

#vipl-container .vipl-club-table tbody td.vipl-rimfire-stage-cell {
    background-color: #acb9c5;
}

#vipl-container .vipl-club-table tbody td.vipl-rimfire-total-cell {
    background-color: #beb6aa;
}

#vipl-container .vipl-club-table tbody td.vipl-centerfire-stage-cell {
    background-color: #bec6bd;
}

#vipl-container .vipl-club-table tbody td.vipl-centerfire-total-cell {
    background-color: #beb6aa;
}

#vipl-container .vipl-club-table tbody td.vipl-combined-total-cell {
    background-color: #ddbab7;
}

@media screen and (max-width: 600px) {
    /*
     * Use the entire viewport width on phones.
     */
    #vipl-site-frame {
        width: 100%;
        max-width: none;
        margin-right: 0;
        margin-left: 0;
        border-right: 0;
        border-left: 0;
    }

    #vipl-wide-content,
    #vipl-container {
        width: 100%;
        max-width: none;
        margin-right: 0;
        margin-left: 0;
    }

    #vipl-container .divider,
    #vipl-container .bluedivider,
    #vipl-container .reddivider {
        box-sizing: border-box;
        height: auto !important;
        min-height: 31px;
        padding: 6px 10px;
        line-height: 1.15;
        white-space: normal;
    }

    #vipl-container .divider strong,
    #vipl-container .divider b,
    #vipl-container .bluedivider strong,
    #vipl-container .bluedivider b,
    #vipl-container .reddivider strong,
    #vipl-container .reddivider b {
        display: block;
        font-size: 18px !important;
        line-height: 1.15;
        text-align: center;
        white-space: normal;
        overflow-wrap: normal;
    }

    #vipl-container .score-scroll-hint {
        position: relative;
        clear: both;
        margin: 8px 0 12px;
        padding: 7px 10px;
        line-height: 1.2;
        white-space: normal;
    }
}

.vipl-finals-notice {
    box-sizing: border-box;
    max-width: 760px;
    margin: 2rem auto;
    padding: 0.75rem 1rem;
    color: #d7f7f2;
    font-weight: 600;
    line-height: 1.3;
    text-align: center;
    white-space: normal;
    background: rgba(15, 54, 49, 0.82);
    border: 1px solid rgba(102, 228, 212, 0.72);
    border-radius: 6px;
    box-shadow: inset 0 0 12px rgba(69, 211, 193, 0.08);
}

.vipl-finals-notice strong,
.vipl-finals-notice span {
    display: block;
}

.vipl-finals-notice strong {
    margin-bottom: 0.4rem;
    color: #d7f7f2;
    font-size: 20px;
}

.vipl-finals-notice span {
    font-size: 17px;
    line-height: 1.4;
}

#pickyear,
#pickoption {
    color-scheme: dark;
    color: #d7f7f2;
    background-color: #0e413b;
    border: 1px solid rgba(102, 228, 212, 0.72);
}

