/* =========================================================
   leadingJockey.css
   リーディングジョッキー
   ========================================================= */

.leading-jockey-content {
    max-width: 780px;
    margin: 0 auto;
}

.leading-jockey-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.leading-jockey-season-control {
    display: flex;
    justify-content: flex-end;
    flex-shrink: 0;
}

.leading-jockey-season-select {
    min-width: 132px;
    min-height: 38px;
    padding: 5px 34px 5px 12px;
    background-color: #ffffff;
    color: var(--color-text);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    font: inherit;
    font-size: .9rem;
    font-weight: 700;
    cursor: pointer;
}

.leading-jockey-season-select:focus {
    border-color: var(--color-main);
    box-shadow: 0 0 0 3px rgba(12, 96, 64, .12);
    outline: 0;
}

.leading-jockey-type-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 14px 0 16px;
}

.leading-jockey-type-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 7px 12px;
    background: #ffffff;
    color: var(--color-main-dark);
    border: 1px solid var(--color-main);
    border-radius: 6px;
    font-size: .9rem;
    font-weight: 700;
    text-decoration: none;
}

.leading-jockey-type-tab:hover {
    background: rgba(12, 96, 64, .06);
    color: var(--color-main-dark);
}

.leading-jockey-type-tab.is-active {
    background: var(--color-main);
    color: #ffffff;
}

.leading-jockey-table-card {
    padding: 0;
    overflow: hidden;
}

.leading-jockey-table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: .85rem;
}

.leading-jockey-ranking-column {
    width: 58px;
}

.leading-jockey-name-column {
    width: 27%;
}

.leading-jockey-result-column {
    width: auto;
}

.leading-jockey-total-point-column {
    width: 21%;
}

.leading-jockey-table th,
.leading-jockey-table td {
    padding: 9px 8px;
    border-right: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    vertical-align: middle;
}

.leading-jockey-table th:last-child,
.leading-jockey-table td:last-child {
    border-right: 0;
}

.leading-jockey-table tbody tr:last-child td {
    border-bottom: 0;
}

.leading-jockey-table thead th {
    background: var(--color-section);
    color: var(--color-text);
    text-align: center;
    font-weight: 700;
    white-space: nowrap;
}

.leading-jockey-result-heading span,
.leading-jockey-result-heading small {
    display: block;
}

.leading-jockey-result-heading small {
    margin-top: 2px;
    color: var(--color-text-light);
    font-size: .68rem;
    font-weight: 400;
    line-height: 1.2;
}

.leading-jockey-table tbody tr:nth-child(even) {
    background: #fafafa;
}

.leading-jockey-table tbody tr:hover {
    background: #f2f8f5;
}

.leading-jockey-table .leading-jockey-ad-row:hover {
    background: transparent;
}

.leading-jockey-ad-row td {
    padding: 0;
    border-right: 0;
}

.leading-jockey-ad-row .ad-inline {
    margin: 12px 0;
}

.leading-jockey-ranking {
    text-align: center;
}

.leading-jockey-current-ranking {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1.3;
}

.leading-jockey-information {
    text-align: left;
}

.leading-jockey-name-line {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 3px 5px;
    white-space: nowrap;
}

.leading-jockey-name {
    min-width: 0;
    font-weight: 700;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.leading-jockey-training-center {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    min-height: 18px;
    padding: 1px 5px;
    border-radius: 4px;
    color: #ffffff;
    font-size: .65rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

.leading-jockey-training-center.is-miho {
    background: #356ea8;
}

.leading-jockey-training-center.is-ritto {
    background: #a94442;
}

.leading-jockey-result {
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.leading-jockey-finish-counts {
    font-weight: 700;
    line-height: 1.35;
    white-space: nowrap;
}

.leading-jockey-rates {
    margin-top: 3px;
    color: var(--color-text-light);
    font-size: .72rem;
    line-height: 1.3;
    white-space: nowrap;
}

.leading-jockey-number {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.leading-jockey-empty {
    margin: 0;
    padding: 24px 16px;
    background: var(--color-section);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    color: var(--color-text-light);
    text-align: center;
}

.leading-jockey-pagination {
    display: grid;
    grid-template-columns: minmax(90px, 1fr) auto minmax(90px, 1fr);
    align-items: center;
    gap: 12px;
    margin-top: 12px;
}

.leading-jockey-page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 90px;
    min-height: 38px;
    padding: 6px 14px;
    background: #ffffff;
    color: var(--color-main-dark);
    border: 1px solid var(--color-main);
    border-radius: 6px;
    font-size: .85rem;
    font-weight: 700;
    text-decoration: none;
}

.leading-jockey-page-link:first-child {
    justify-self: end;
}

.leading-jockey-page-link:last-child {
    justify-self: start;
}

.leading-jockey-page-link:hover:not(.is-disabled) {
    background: rgba(12, 96, 64, .06);
    color: var(--color-main-dark);
}

.leading-jockey-page-link:focus-visible {
    box-shadow: 0 0 0 3px rgba(12, 96, 64, .12);
    outline: 0;
}

.leading-jockey-page-link.is-disabled {
    background: #f5f5f5;
    color: var(--color-text-light);
    border-color: var(--color-border);
    opacity: .65;
}

.leading-jockey-page-status {
    min-width: 54px;
    text-align: center;
    font-size: .85rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

@media (max-width: 767.98px) {
    .leading-jockey-header {
        gap: 8px;
    }

    .leading-jockey-header .section-title {
        font-size: 1.1rem;
    }

    .leading-jockey-season-select {
        min-width: 124px;
        min-height: 36px;
        font-size: .85rem;
    }

    .leading-jockey-type-tabs {
        gap: 6px;
        margin: 12px 0 14px;
    }

    .leading-jockey-type-tab {
        min-height: 38px;
        padding: 6px 8px;
        font-size: .82rem;
    }

    .leading-jockey-table {
        font-size: .68rem;
    }

    .leading-jockey-table th,
    .leading-jockey-table td {
        padding: 7px 3px;
    }

    .leading-jockey-ranking-column {
        width: 44px;
    }

    .leading-jockey-name-column {
        width: 31%;
    }

    .leading-jockey-total-point-column {
        width: 22%;
    }

    .leading-jockey-current-ranking {
        font-size: .86rem;
    }

    .leading-jockey-name {
        font-size: .75rem;
    }

    .leading-jockey-training-center {
        min-height: 16px;
        padding: 1px 4px;
        font-size: .58rem;
    }

    .leading-jockey-result-heading small {
        font-size: .58rem;
    }

    .leading-jockey-finish-counts {
        font-size: .67rem;
    }

    .leading-jockey-rates {
        margin-top: 2px;
        font-size: .58rem;
    }

    .leading-jockey-pagination {
        grid-template-columns: minmax(80px, 1fr) auto minmax(80px, 1fr);
        gap: 8px;
    }

    .leading-jockey-page-link {
        min-width: 80px;
        min-height: 36px;
        padding: 5px 10px;
        font-size: .78rem;
    }

    .leading-jockey-page-status {
        min-width: 48px;
        font-size: .78rem;
    }
}
