.gs-subtitle {
    color: #666;
    font-size: 0.9em;
    margin-top: -6px;
}

@media (max-width: 900px) {
    .gs-subtitle {
        padding-left: 12px;
    }
}

.gs-country-toggle {
    display: inline-flex;
    margin: 4px 0 10px;
    border: 1px solid #d3d3d3;
    border-radius: 4px;
    overflow: hidden;
    font-size: 0.9em;
}

    .gs-country-toggle a {
        padding: 6px 14px;
        color: #333;
        text-decoration: none;
        background: #fff;
    }

        .gs-country-toggle a + a {
            border-left: 1px solid #d3d3d3;
        }

        .gs-country-toggle a.active {
            background: #333;
            color: #fff;
        }

@media (max-width: 900px) {
    .gs-country-toggle {
        margin-left: 12px;
    }
}

.gs-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.gs-scroll-hint {
    display: none;
    font-size: 0.8em;
    color: #666;
    margin: 0 0 6px;
}

@media (max-width: 900px) {
    .gs-scroll-hint {
        display: block;
        padding-left: 12px;
    }

    .gs-table th:nth-child(3),
    .gs-table td:nth-child(3),
    .gs-table th:nth-child(4),
    .gs-table td:nth-child(4) {
        display: none;
    }

    .gs-table td {
        white-space: nowrap;
    }

    .gs-ad-row .div-gpt-ad-DTGeneralLower {
        display: none;
    }
}

.gs-table {
    width: 100%;
    min-width: 900px;
    border-collapse: collapse;
    font-size: 0.85em;
}

    .gs-table th,
    .gs-table td {
        padding: 8px 10px;
        text-align: right;
        white-space: normal;
        border-bottom: 1px solid #d3d3d3;
    }

    .gs-table-stakes th:not(.gs-rank-col),
    .gs-table-stakes td:not(.gs-rank-col) {
        padding: 8px 6px;
    }

    .gs-table-stakes thead th {
        white-space: nowrap;
    }

    .gs-table th.gs-rank-col,
    .gs-table td.gs-rank-col {
        width: 36px;
        text-align: center;
        color: #999;
        position: sticky;
        left: 0;
        background: #fff;
    }

    .gs-table th:nth-child(2),
    .gs-table td:nth-child(2) {
        text-align: left;
        position: sticky;
        left: 36px;
        background: #fff;
    }

    .gs-table thead th {
        cursor: pointer;
        user-select: none;
        background: #f5f5f5;
        position: sticky;
        top: 0;
        white-space: normal;
    }

        .gs-table thead th:hover {
            background: #e8e8e8;
        }

        .gs-table thead th.gs-rank-col {
            cursor: default;
        }

            .gs-table thead th.gs-rank-col:hover {
                background: #f5f5f5;
            }

        .gs-table thead th.gs-sorted-asc::after {
            content: " \25B2";
        }

        .gs-table thead th.gs-sorted-desc::after {
            content: " \25BC";
        }

    .gs-table tbody tr:hover {
        background: #fafafa;
    }

    .gs-table tbody tr:hover td.gs-rank-col,
    .gs-table tbody tr:hover td:nth-child(2) {
        background: #fafafa;
    }

    .gs-table .gs-ad-row td {
        white-space: normal;
        padding-left: 0;
        padding-right: 0;
    }

    .gs-ad-row [class^="div-gpt-ad-"] {
        position: sticky;
        left: 0;
    }

/* Rnrs / S/Wnrs counts on the Broodmare Sires table link to the per-runner breakdown */
/* Uses the site's teal accent (#4daece, as on the More Tables menu); the darker #1a7596 text keeps it readable on the light chip. */
.gs-table a.gs-drill,
.gs-drill-hint .gs-drill-sample {
    display: inline-block;
    padding: 1px 7px;
    border-radius: 3px;
    background: #e3f4fa;
    color: #1a7596;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}

    .gs-table a.gs-drill:hover,
    .gs-table a.gs-drill:focus {
        background: #4daece;
        color: #fff;
    }

.gs-drill-hint {
    font-size: 0.9em;
    margin: 0 0 10px;
    padding: 8px 12px;
    border-left: 3px solid #4daece;
    background: #f3fafc;
}

@media (max-width: 900px) {
    .gs-drill-hint {
        margin-left: 12px;
        margin-right: 12px;
    }
}

.gs-totals {
    font-size: 0.9em;
    margin: 0 0 10px;
}

/* broodmare-runners: fewer columns than the sire tables, and the Sire/Starts columns
   (3rd/4th) are worth keeping on mobile, so undo the generic narrow-screen hiding */
.gs-table-runners {
    min-width: 640px;
}

@media (max-width: 900px) {
    .gs-totals {
        padding-left: 12px;
    }

    .gs-table-runners th:nth-child(3),
    .gs-table-runners td:nth-child(3),
    .gs-table-runners th:nth-child(4),
    .gs-table-runners td:nth-child(4) {
        display: table-cell;
    }
}
