.team-timeline {
    position: relative;
    display: flex;
    align-items: center;
    margin: 0 -2rem;
    padding: 1rem 0.5rem 0.5rem;
    gap: 0.5rem;
}

.team-timeline__viewport {
    flex: 1 1 auto;
    overflow: hidden;
    padding: 0 0.25rem;
}

.team-timeline__chevron {
    flex: 0 0 auto;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.08);
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s ease-out, opacity 0.15s ease-out;
}

.team-timeline__chevron:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.18);
}

.team-timeline__chevron:disabled {
    opacity: 0.25;
    cursor: not-allowed;
}

.team-timeline__track {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: max-content;
    padding-top: 1rem;
    transition: transform 0.25s ease-out;
    will-change: transform;
}

.team-timeline__track::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 3px;
    background: #e9e9e9;
    z-index: 0;
}

.team-timeline__item {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    min-width: 78px;
    text-align: center;
    text-decoration: none;
    color: inherit;
    border-bottom: none !important;
}

.team-timeline__item--future {
    opacity: 0.5;
}

.team-timeline__item--cup .team-timeline__emblem-wrapper::after {
    content: "\f091"; /* fa-trophy */
    font-family: FontAwesome, sans-serif;
    position: absolute;
    bottom: -4px;
    right: -4px;
    font-size: 10px;
    color: #f1c40f;
    background: rgba(0, 0, 0, 0.75);
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.team-timeline__emblem-wrapper {
    position: relative;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.team-timeline__emblem-wrapper svg,
.team-timeline__emblem-wrapper img {
    width: 100%;
    height: 100%;
}

.team-timeline__badge {
    font-size: 14px;
    font-weight: bold;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    color: #fff;
}

.team-timeline__badge--win {
    background: #28a745;
}

.team-timeline__badge--loss {
    background: #dc3545;
}

.team-timeline__badge--draw {
    background: #6c757d;
}

.team-timeline__badge--upcoming {
    background: transparent;
    border: 1px dashed rgba(255, 255, 255, 0.4);
    color: rgba(255, 255, 255, 0.6);
}

.team-timeline__empty {
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
    padding: 1rem 0.5rem;
}

/* Head-to-head overlay */
.head-to-head-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.5rem 0 1rem;
}

.head-to-head-team {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    color: inherit;
    text-decoration: none;
    min-width: 0;
}

.head-to-head-team-name {
    font-weight: 600;
    margin-top: 0.25rem;
    font-size: 0.9rem;
    word-break: break-word;
}

.head-to-head-summary {
    flex: 1 1 0;
    text-align: center;
    min-width: 0;
}

.head-to-head-record {
    display: flex;
    justify-content: center;
    gap: 1rem;
    font-size: 1.6rem;
    font-weight: 700;
}

.head-to-head-record-labels {
    display: flex;
    justify-content: center;
    gap: 1rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #888;
    margin-top: 0.1rem;
}

.head-to-head-record-labels > span,
.head-to-head-record > span {
    flex: 1 1 0;
    text-align: center;
}

.head-to-head-wins {
    color: #198754;
}

.head-to-head-draws {
    color: #6c757d;
}

.head-to-head-losses {
    color: #dc3545;
}

.head-to-head-goals {
    margin-top: 0.5rem;
    font-size: 0.95rem;
    color: #555;
}

.head-to-head-table th,
.head-to-head-table td {
    font-size: 0.9rem;
}
