/* ATP player ELO profile — /tennis-power-rankings/<slug>.
   Dark-card language consistent with tennis_power_rankings. */

.tp-page {
    max-width: 1000px;
    padding-bottom: 4rem;
}

.tp-breadcrumb {
    margin: 1.25rem 0 0;
    font-size: .85rem;
    color: var(--text-muted, #9aa7b4);
    display: flex;
    gap: .5rem;
    align-items: center;
}

.tp-breadcrumb a {
    color: var(--sport-tennis, #F2784B);
    text-decoration: none;
}

.tp-hero {
    padding: 1.5rem 0 1rem;
}

.tp-hero h1 {
    font-weight: 700;
    margin-bottom: .2rem;
}

.tp-hero-sub {
    color: var(--text-muted, #9aa7b4);
    margin-bottom: .9rem;
}

.tp-chips {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.tp-chip {
    font-size: .82rem;
    padding: .32rem .7rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .14);
    background: rgba(255, 255, 255, .04);
    color: var(--text-muted, #9aa7b4);
    white-space: nowrap;
}

.tp-chip strong {
    color: #e8edf2;
    font-weight: 700;
}

.tp-chip--elo {
    border-color: var(--sport-tennis, #F2784B);
    background: var(--sport-tennis-soft, rgba(242, 120, 75, .10));
}

.tp-chip--inactive {
    border-color: rgba(255, 193, 7, .45);
    color: #ffc107;
}

.tp-card {
    margin-top: 1.5rem;
    padding: 1.25rem 1.4rem;
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: 12px;
    background: rgba(255, 255, 255, .02);
}

.tp-card-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: .75rem;
}

.tp-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: .75rem;
}

.tp-controls {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.tp-control {
    display: flex;
    align-items: center;
    gap: .45rem;
    font-size: .82rem;
    color: var(--text-muted, #9aa7b4);
}

.tp-control select {
    background: rgba(0, 0, 0, .35);
    color: #e8edf2;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 6px;
    padding: .3rem .5rem;
    font-size: .85rem;
    max-width: 220px;
}

.tp-chart-wrap {
    position: relative;
    height: 360px;
}

.tp-note {
    margin: .8rem 0 0;
    font-size: .8rem;
    color: var(--text-muted, #9aa7b4);
}

.tp-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 1.5rem;
}

@media (max-width: 767.98px) {
    .tp-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

.tp-record {
    font-size: 1.7rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.tp-record-pct {
    display: block;
    font-size: .85rem;
    font-weight: 400;
    color: var(--text-muted, #9aa7b4);
}

.tp-surface-row {
    display: flex;
    align-items: center;
    gap: .7rem;
    margin-bottom: .55rem;
}

.tp-surface-name {
    flex: 0 0 4.5rem;
    font-size: .85rem;
    color: var(--text-muted, #9aa7b4);
}

.tp-surface-bar {
    flex: 1 1 auto;
    height: 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, .08);
    overflow: hidden;
}

.tp-surface-fill {
    height: 100%;
    border-radius: 4px;
    background: var(--sport-tennis, #F2784B);
}

.tp-surface-rec {
    flex: 0 0 3.6rem;
    text-align: right;
    font-size: .85rem;
    font-variant-numeric: tabular-nums;
}

.tp-table {
    color: #dfe6ec;
    font-size: .88rem;
    margin-bottom: 0;
}

.tp-table th {
    color: var(--text-muted, #9aa7b4);
    font-weight: 600;
    border-color: rgba(255, 255, 255, .08);
    white-space: nowrap;
}

.tp-table td {
    border-color: rgba(255, 255, 255, .06);
    vertical-align: middle;
}

.tp-peak {
    color: var(--sport-tennis, #F2784B);
    font-weight: 600;
}

.tp-tournament {
    white-space: nowrap;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tp-result {
    display: inline-block;
    width: 1.35rem;
    height: 1.35rem;
    line-height: 1.35rem;
    text-align: center;
    border-radius: 50%;
    font-size: .75rem;
    font-weight: 700;
    margin-right: .3rem;
}

.tp-result--w {
    background: rgba(64, 192, 87, .18);
    color: #51cf66;
}

.tp-result--l {
    background: rgba(250, 82, 82, .16);
    color: #ff6b6b;
}

.tp-link {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px dotted rgba(226, 232, 240, .35);
}

.tp-link:hover {
    color: var(--sport-tennis, #F2784B);
    border-bottom-color: var(--sport-tennis, #F2784B);
}

/* recent matches: rows of the same tournament week group under one
   date/tournament label */
.tp-table tr:not(.tp-group-start) td {
    border-top: 0;
}
