/*------------------------------------------------------
  Game summary page additions

  This file is loaded AFTER summaries.css.
  summaries.css provides the filters, cards, typography,
  buttons and general page styling.
------------------------------------------------------*/

.game-table-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}

.game-table-column {
    min-width: 0;
}

.game-table-column .table-wrapper {
    overflow-x: auto;
}

.game-summary-table {
    width: 100%;
    min-width: 970px;
    border-collapse: collapse;
    background: #ffffff;
    font-size: 0.74rem;
    font-variant-numeric: tabular-nums;
    table-layout: fixed;
}

.game-summary-table th,
.game-summary-table td {
    border-right: 1px solid #e1e6ee;
    border-bottom: 1px solid #e3e7ee;
    padding: 4px 2px;
    text-align: center;
    white-space: nowrap;
}

.game-summary-table thead th {
    background: #243852;
    color: #ffffff;
    font-size: 0.70rem;
    font-weight: 800;
}

.game-summary-table thead th:first-child,
.game-summary-table tbody th {
    width: 92px;
}

.game-summary-table thead th:nth-child(2) {
    width: 60px;
}

.game-summary-table thead th:last-child {
    width: 84px;
}

.game-summary-table tbody th {
    background: #f1f4f8;
    font-weight: 800;
}

.game-summary-table tbody tr:nth-child(even) td {
    background: var(--row-stripe);
}

.game-summary-table tbody tr:hover td {
    background: #eaf2fc;
}

.game-summary-table .average-column {
    font-weight: 700;
}

.game-table-caption {
    border: 1px solid var(--border-color);
    border-bottom: 0;
    border-radius: 9px 9px 0 0;
    font-size: 0.84rem;
    font-weight: 800;
    padding: 7px 10px;
}

.batting-table-caption {
    background: var(--batting-header);
    color: var(--primary-blue);
}

.pitching-table-caption {
    background: var(--pitching-header);
    color: var(--pitching-accent);
}


/*------------------------------------------------------
  Table 4 - Record and winning percentage by count
------------------------------------------------------*/

.game-record-table-column {
    min-width: 0;
}

.game-record-table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.game-record-summary-table {
    width: 100%;
    min-width: 1020px;
    border-collapse: collapse;
    background: #ffffff;
    font-size: 0.73rem;
    font-variant-numeric: tabular-nums;
    table-layout: fixed;
}

.game-record-summary-table th,
.game-record-summary-table td {
    border-right: 1px solid #e1e6ee;
    border-bottom: 1px solid #e1e6ee;
    padding: 2px 3px;
    text-align: center;
    vertical-align: middle;
}

.game-record-summary-table thead th {
    background: #243852;
    color: #ffffff;
    font-weight: 800;
    line-height: 1.08;
}

.game-record-summary-table thead tr:first-child th {
    padding-top: 5px;
    padding-bottom: 5px;
}

.game-record-summary-table tbody th {
    width: 58px;
    background: #f1f4f8;
    font-weight: 800;
}

.game-record-summary-table tbody tr:nth-child(even) td {
    background: var(--row-stripe);
}

.game-record-summary-table tbody tr:hover td {
    background: #eaf2fc;
}

.game-record-count-heading {
    width: 58px;
}

.game-record-group-heading {
    letter-spacing: 0.02em;
}

.batting-record-group {
    background: var(--primary-blue) !important;
}

.pitching-record-group {
    border-left: 3px solid #91a1b6 !important;
    background: #8a5a15 !important;
}

.pitching-record-start {
    border-left: 3px solid #91a1b6 !important;
}

.game-record-cell {
    height: 34px;
}

.game-record-line {
    display: block;
    color: var(--primary-text);
    font-size: 0.73rem;
    font-weight: 800;
    line-height: 1;
}

.game-winning-percentage-line {
    display: block;
    margin-top: 1px;
    color: var(--secondary-text);
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1;
}

.game-record-no-data {
    color: #929bad;
    font-size: 0.78rem;
}


/*------------------------------------------------------
  Table 5 - Cumulative record and winning percentage
------------------------------------------------------*/

.cumulative-record-table-column {
    min-width: 0;
}

.cumulative-record-table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.cumulative-record-summary-table {
    width: 100%;
    min-width: 1500px;
    border-collapse: collapse;
    background: #ffffff;
    font-size: 0.68rem;
    font-variant-numeric: tabular-nums;
    table-layout: fixed;
}

.cumulative-record-summary-table th,
.cumulative-record-summary-table td {
    border-right: 1px solid #e1e6ee;
    border-bottom: 1px solid #e1e6ee;
    padding: 2px;
    text-align: center;
    vertical-align: middle;
}

.cumulative-record-summary-table thead th {
    background: #243852;
    color: #ffffff;
    font-weight: 800;
    line-height: 1.05;
}

.cumulative-record-summary-table thead tr:first-child th {
    padding-top: 5px;
    padding-bottom: 5px;
}

.cumulative-record-summary-table thead tr:nth-child(2) th {
    padding-top: 4px;
    padding-bottom: 4px;
}

.cumulative-record-summary-table tbody th {
    width: 54px;
    background: #f1f4f8;
    font-weight: 800;
    font-size: 0.74rem;
}

.cumulative-record-summary-table tbody tr:nth-child(even) td {
    background: var(--row-stripe);
}

.cumulative-record-summary-table tbody tr:hover td {
    background: #eaf2fc;
}

.cumulative-count-heading {
    width: 54px;
}

.cumulative-direction-header th {
    padding-top: 2px !important;
    padding-bottom: 2px !important;
    font-size: 0.66rem;
}

.cumulative-record-value {
    height: 31px;
    padding-left: 2px !important;
    padding-right: 2px !important;
}

.cumulative-record-line {
    display: block;
    color: var(--primary-text);
    font-size: 0.66rem;
    font-weight: 800;
    line-height: 1;
}

.cumulative-winning-percentage-line {
    display: block;
    margin-top: 1px;
    color: var(--secondary-text);
    font-size: 0.59rem;
    font-weight: 700;
    line-height: 1;
}

.cumulative-record-no-data {
    display: block;
    color: #929bad;
    font-size: 0.70rem;
    line-height: 1.8;
}


/*------------------------------------------------------
  Related summary-page links
------------------------------------------------------*/

.page-title-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
}

.page-title-row h1 {
    margin: 0;
}

.summary-page-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 7px;
    padding-bottom: 2px;
}

.summary-page-links a {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: #ffffff;
    color: var(--primary-blue);
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1.1;
    text-decoration: none;
    padding: 5px 9px;
}

.summary-page-links a:hover {
    border-color: #aab6c6;
    background: var(--light-blue);
}


/*------------------------------------------------------
  Revised placement for inning-summary links
------------------------------------------------------*/

.summary-page-links-left {
    justify-content: flex-start;
    margin-top: 9px;
    padding-bottom: 0;
}


/*------------------------------------------------------
  Table 6 - Combined <=, = and >= comparison
------------------------------------------------------*/

.combined-record-table-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}

.combined-record-table-column {
    min-width: 0;
}

.combined-record-table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.combined-record-summary-table {
    width: 100%;
    min-width: 1120px;
    border-collapse: collapse;
    background: #ffffff;
    font-size: 0.68rem;
    font-variant-numeric: tabular-nums;
    table-layout: fixed;
}

.combined-record-summary-table th,
.combined-record-summary-table td {
    border-right: 1px solid #e1e6ee;
    border-bottom: 1px solid #e1e6ee;
    padding: 2px;
    text-align: center;
    vertical-align: middle;
}

.combined-record-summary-table thead th {
    background: #243852;
    color: #ffffff;
    font-weight: 800;
    line-height: 1.05;
}

.combined-record-summary-table thead tr:first-child th {
    padding-top: 5px;
    padding-bottom: 5px;
}

.combined-record-summary-table thead tr:nth-child(2) th {
    padding-top: 4px;
    padding-bottom: 4px;
}

.combined-record-summary-table tbody th {
    width: 54px;
    background: #f1f4f8;
    font-weight: 800;
    font-size: 0.74rem;
}

.combined-record-summary-table tbody tr:nth-child(even) td {
    background: var(--row-stripe);
}

.combined-record-summary-table tbody tr:hover td {
    background: #eaf2fc;
}

.combined-count-heading {
    width: 54px;
}

.combined-perspective-heading {
    letter-spacing: 0.02em;
}

.combined-record-batting-table .combined-perspective-heading {
    background: var(--primary-blue) !important;
}

.combined-record-pitching-table .combined-perspective-heading {
    background: #8a5a15 !important;
}

.combined-direction-header th {
    padding-top: 2px !important;
    padding-bottom: 2px !important;
    font-size: 0.66rem;
}

.combined-record-summary-table .cumulative-record-value {
    height: 31px;
}


/*------------------------------------------------------
  Site footer
------------------------------------------------------*/

.site-footer {
    margin-top: 40px;
    padding: 24px 20px;
    border-top: 1px solid #d9dee7;
    color: #667085;
    font-size: 0.85rem;
    text-align: center;
}

.footer-disclaimer {
    max-width: 850px;
    margin: 0 auto 14px;
    line-height: 1.6;
}

.footer-links {
    margin: 0 0 8px;
}

.footer-links a {
    color: #475467;
    font-weight: 600;
    text-decoration: underline;
}

.footer-links a:hover {
    color: #1d5f91;
    text-decoration: none;
}

.footer-copyright {
    margin: 0;
}


/*------------------------------------------------------
  Responsive layout
------------------------------------------------------*/

@media (max-width: 1050px) {

    .game-summary-table {
        min-width: 930px;
    }

}

@media (max-width: 780px) {

    .page-title-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 9px;
    }

    .summary-page-links {
        justify-content: flex-start;
    }

}

@media (max-width: 540px) {

    .game-summary-table {
        min-width: 900px;
        font-size: 0.70rem;
    }

    .game-summary-table th,
    .game-summary-table td {
        padding: 3px 2px;
    }

    .game-record-summary-table {
        min-width: 980px;
        font-size: 0.69rem;
    }

    .cumulative-record-summary-table {
        min-width: 1420px;
        font-size: 0.65rem;
    }

    .combined-record-summary-table {
        min-width: 1060px;
        font-size: 0.65rem;
    }

    .summary-page-links {
        width: 100%;
    }

    .site-footer {
        margin-top: 28px;
        padding: 20px 10px;
    }

}


/*------------------------------------------------------
  Print
------------------------------------------------------*/

@media print {

    .game-summary-table {
        min-width: 0;
        font-size: 0.54rem;
    }

    .game-summary-table th,
    .game-summary-table td {
        padding: 2px 1px;
    }

    .game-record-summary-table {
        min-width: 0;
        font-size: 0.54rem;
    }

    .game-record-summary-table th,
    .game-record-summary-table td {
        padding: 2px 1px;
    }

    .summary-page-links {
        display: none;
    }

    .cumulative-record-summary-table {
        min-width: 0;
        font-size: 0.44rem;
    }

    .cumulative-record-summary-table th,
    .cumulative-record-summary-table td {
        padding: 1px;
    }

    .combined-record-summary-table {
        min-width: 0;
        font-size: 0.45rem;
    }

    .combined-record-summary-table th,
    .combined-record-summary-table td {
        padding: 1px;
    }

    .site-footer {
        margin-top: 20px;
    }

}