.sf-match-timeline {
    --sf-match-timeline-home: #3DC18D;
    --sf-match-timeline-away: #4E5054;
    --sf-match-timeline-red: #AB1A39;
    --sf-match-timeline-yellow: #FFBA33;
    margin: 0;
    padding: 18px;
    border: 1px solid #E3E7EC;
    border-radius: 8px;
    background: #f4f5f6;
    color: #22252A;
}

.sf-match-timeline__head {
    margin-bottom: 14px;
}

.sf-match-timeline__title {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
}

.sf-match-timeline__legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px 14px;
    font-size: 13px;
    line-height: 1.35;
}

.sf-match-timeline__legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.sf-match-timeline__legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.sf-match-timeline__filters {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
    overflow-x: auto;
    padding-bottom: 2px;
}

.sf-match-timeline__filter {
    flex: 0 0 auto;
    border: 1px solid #D8DEE6;
    border-radius: 999px;
    background: #FFFFFF;
    color: #4E5054;
    cursor: pointer;
    font-size: 13px;
    line-height: 1;
    padding: 9px 13px;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.sf-match-timeline__filter:hover,
.sf-match-timeline__filter:focus {
    border-color: #3DC18D;
    outline: none;
}

.sf-match-timeline__filter_active {
    border-color: #3DC18D;
    background: #3DC18D;
    color: #FFFFFF;
}

.sf-match-timeline__chart-shell {
    position: relative;
    height: 320px;
    min-height: 320px;
}

.sf-match-timeline__chart {
    position: relative;
    z-index: 1;
}

.sf-match-timeline__event-layer {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
}

.sf-match-timeline__marker {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 2px solid #FFFFFF;
    border-radius: 50%;
    background: #FFFFFF;
    box-shadow: 0 6px 14px rgba(26, 33, 42, .18);
    color: #22252A;
    cursor: pointer;
    font-size: 15px;
    line-height: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%);
    transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}

.sf-match-timeline__marker:hover,
.sf-match-timeline__marker:focus {
    box-shadow: 0 8px 18px rgba(26, 33, 42, .24);
    outline: none;
    transform: translate(-50%, -50%) scale(1.08);
}

.sf-match-timeline__marker_goal {
    background: #EAF8F1;
    color: var(--sf-match-timeline-home);
}

.sf-match-timeline__marker_yellow_card {
    background: #FFF6E3;
    color: var(--sf-match-timeline-yellow);
}

.sf-match-timeline__marker_red_card {
    background: #F9E9EE;
    color: var(--sf-match-timeline-red);
}

.sf-match-timeline__marker_substitution {
    background: #EEF4F2;
    color: var(--sf-match-timeline-away);
}

.sf-match-timeline__marker_hidden {
    opacity: 0;
    pointer-events: none;
}

.sf-match-timeline__tooltip {
    position: absolute;
    z-index: 3;
    width: min(260px, calc(100vw - 32px));
    padding: 10px 12px;
    border-radius: 8px;
    background: #22252A;
    box-shadow: 0 10px 24px rgba(26, 33, 42, .24);
    color: #FFFFFF;
    font-size: 13px;
    line-height: 1.35;
    pointer-events: none;
}

.sf-match-timeline__tooltip-title {
    margin-bottom: 6px;
    font-weight: 700;
}

.sf-match-timeline__tooltip-row {
    color: rgba(255, 255, 255, .82);
}

.sf-match-timeline__tooltip-row + .sf-match-timeline__tooltip-row {
    margin-top: 3px;
}

.sf-match-timeline__tooltip-substitution {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}

.sf-match-timeline__tooltip-substitution-player {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
}

.sf-match-timeline__tooltip-substitution-player_in .sf-match-timeline__tooltip-substitution-label {
    color: #72D8AE;
}

.sf-match-timeline__tooltip-substitution-player_out .sf-match-timeline__tooltip-substitution-label {
    color: #FF8A9E;
}

.sf-match-timeline__tooltip-substitution-label {
    font-weight: 700;
}

.sf-match-timeline__tooltip-substitution-name {
    color: #FFFFFF;
}

.sf-match-timeline__tooltip-substitution-arrow {
    color: rgba(255, 255, 255, .72);
    font-weight: 700;
}

.sf-match-timeline__state {
    color: #6F7680;
    font-size: 14px;
    line-height: 1.4;
}

.sf-match-timeline__state_pressure {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    padding: 8px 12px;
    border-radius: 6px;
    background: rgba(255, 255, 255, .86);
    transform: translate(-50%, -50%);
}

.sf-match-timeline__state_events {
    margin-top: 10px;
}

@media (max-width: 768px) {
    .sf-match-timeline {
        padding: 14px;
    }

    .sf-match-timeline__legend {
        gap: 6px 10px;
    }

    .sf-match-timeline__chart-shell {
        height: 300px;
        min-height: 300px;
    }
}

@media (max-width: 480px) {
    .sf-match-timeline__chart-shell {
        height: 280px;
        min-height: 280px;
    }

    .sf-match-timeline__marker {
        width: 30px;
        height: 30px;
    }
}
