﻿.match-events-feed-card {
    margin: 22px 0;
    overflow: hidden;
    border: 1px solid #e2e9e3;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(31, 52, 36, .06);
}

.match-events-feed-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 20px 22px;
    border-bottom: 1px solid #e9eeea;
    background: radial-gradient(circle at 8% 15%, rgba(91, 140, 59, .08), transparent 28%), linear-gradient(135deg, #fbfdfb, #f6f9f6);
}

.match-events-feed-kicker {
    display: block;
    margin-bottom: 4px;
    color: #5b8c3b;
    font-size: 10px;
    font-weight: 800;
}

.match-events-feed-heading h2 {
    margin: 0;
    color: #26332a;
    font-size: 19px;
    font-weight: 900;
}

.match-events-feed-heading p {
    margin: 5px 0 0;
    color: #7d887f;
    font-size: 10px;
    line-height: 1.7;
}

.match-events-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    padding: 14px 16px 4px;
}

    .match-events-summary-grid article {
        padding: 11px 13px;
        border: 1px solid #e7ece8;
        border-radius: 12px;
        background: #fbfcfb;
    }

    .match-events-summary-grid span,
    .match-events-summary-grid small {
        display: block;
    }

    .match-events-summary-grid span {
        color: #7d877f;
        font-size: 8px;
    }

    .match-events-summary-grid strong {
        display: block;
        margin: 2px 0;
        color: #28352c;
        font-size: 21px;
        font-weight: 900;
    }

    .match-events-summary-grid small {
        color: #9aa29c;
        font-size: 7px;
    }

    .match-events-summary-grid .is-goals {
        border-top: 3px solid #5b8c3b;
    }

    .match-events-summary-grid .is-cards {
        border-top: 3px solid #d8aa29;
    }

    .match-events-summary-grid .is-actions {
        border-top: 3px solid #456986;
    }

    .match-events-summary-grid .is-total {
        border-top: 3px solid #6e5b86;
    }

.match-events-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid #edf1ee;
}

.match-events-filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

    .match-events-filter-buttons button {
        padding: 5px 9px;
        border: 1px solid #e0e6e1;
        border-radius: 999px;
        background: #fff;
        color: #6f7a72;
        font-size: 8px;
        transition: .14s ease;
    }

        .match-events-filter-buttons button:hover,
        .match-events-filter-buttons button.is-active {
            border-color: #5b8c3b;
            background: #edf5e8;
            color: #4c7636;
        }

.match-events-search {
    display: flex;
    align-items: center;
    min-width: 260px;
    border: 1px solid #e0e6e1;
    border-radius: 10px;
    background: #fafcfa;
}

    .match-events-search span {
        padding-right: 10px;
        color: #89938b;
        font-size: 16px;
    }

    .match-events-search input {
        width: 100%;
        height: 37px;
        padding: 0 8px;
        border: 0;
        outline: 0;
        background: transparent;
        color: #344139;
        font-size: 9px;
    }

.match-events-timeline {
    position: relative;
    padding: 14px 16px 18px;
}

    .match-events-timeline::before {
        position: absolute;
        top: 20px;
        bottom: 24px;
        right: 74px;
        width: 1px;
        background: #e5ebe6;
        content: "";
    }

.match-event-item {
    position: relative;
    display: grid;
    grid-template-columns: 54px 40px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: start;
    min-height: 66px;
    padding: 9px 10px;
    border: 1px solid #e8ede9;
    border-radius: 12px;
    background: #fff;
}

    .match-event-item + .match-event-item {
        margin-top: 8px;
    }

    .match-event-item[hidden] {
        display: none !important;
    }

.match-event-time {
    padding-top: 4px;
    text-align: center;
}

    .match-event-time strong {
        display: block;
        color: #344139;
        font-size: 11px;
        font-weight: 900;
        direction: ltr;
    }

    .match-event-time span {
        display: block;
        margin-top: 2px;
        color: #929a94;
        font-size: 6px;
        line-height: 1.35;
    }

.match-event-marker {
    position: relative;
    z-index: 2;
}

    .match-event-marker > span {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        border: 3px solid #fff;
        border-radius: 50%;
        background: #f1f5f1;
        font-size: 13px;
        box-shadow: 0 0 0 1px #dfe6e0;
    }

.match-event-item.is-goal .match-event-marker > span {
    background: #e8f5e9;
}

.match-event-item.is-yellow .match-event-marker > span {
    background: #fff5bf;
}

.match-event-item.is-red .match-event-marker > span {
    background: #fde5e5;
}

.match-event-item.is-var .match-event-marker > span {
    background: #f1eafa;
}

.match-event-item.is-penalty .match-event-marker > span,
.match-event-item.is-setpiece .match-event-marker > span {
    background: #fff0dc;
}

.match-event-item.is-defense .match-event-marker > span,
.match-event-item.is-goalkeeper .match-event-marker > span {
    background: #e8f0f8;
}

.match-event-item.is-data .match-event-marker > span {
    background: #e9f2f4;
}

.match-event-item.is-medical .match-event-marker > span {
    background: #fff0f0;
}

.match-event-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

    .match-event-title-row > div:first-child {
        min-width: 0;
    }

    .match-event-title-row strong {
        display: block;
        color: #303d34;
        font-size: 10px;
        font-weight: 900;
    }

    .match-event-title-row small {
        display: block;
        margin-top: 1px;
        color: #9aa29c;
        font-family: Consolas, monospace;
        font-size: 6px;
    }

.match-event-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 4px;
}

.match-event-kind-badge,
.match-event-state-badge {
    padding: 2px 6px;
    border-radius: 999px;
    font-size: 6px;
    font-weight: 800;
}

.match-event-kind-badge {
    background: #edf2ef;
    color: #68736b;
}

.match-event-state-badge.is-muted {
    background: #efefef;
    color: #777;
}

.match-event-state-badge.is-warning {
    background: #fff3d4;
    color: #886620;
}

.match-event-state-badge.is-success {
    background: #e8f5e9;
    color: #3f7748;
}

.match-event-state-badge.is-failed {
    background: #fdeaea;
    color: #a04a4a;
}

.match-event-team-line {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 5px;
}

    .match-event-team-line > span {
        padding: 2px 6px;
        border-radius: 999px;
        font-size: 7px;
        font-weight: 800;
    }

        .match-event-team-line > span.is-home {
            background: #edf5e8;
            color: #50763c;
        }

        .match-event-team-line > span.is-away {
            background: #edf2f7;
            color: #3f5e78;
        }

        .match-event-team-line > span.is-neutral {
            background: #f2f2f2;
            color: #676d68;
        }

    .match-event-team-line small {
        color: #9aa29c;
        font-size: 6px;
    }

.match-event-person-line {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin-top: 5px;
    color: #566158;
    font-size: 8px;
}

    .match-event-person-line strong {
        color: #334038;
        font-size: 9px;
    }

    .match-event-person-line span {
        color: #78827b;
    }

.match-event-official-line {
    margin-top: 4px;
    color: #79837c;
    font-size: 7px;
}

    .match-event-official-line strong {
        color: #4d5a51;
    }

.match-event-detail,
.match-event-note {
    margin: 5px 0 0;
    line-height: 1.6;
}

.match-event-detail {
    color: #68746b;
    font-size: 7px;
}

.match-event-note {
    padding: 5px 7px;
    border-right: 2px solid #dce5dd;
    border-radius: 5px;
    background: #fafcfa;
    color: #7d877f;
    font-size: 7px;
}

.match-event-actions {
    align-self: center;
}

    .match-event-actions .btn {
        min-width: 54px;
        font-size: 7px;
    }

.match-events-empty {
    padding: 34px 18px 38px;
    text-align: center;
}

    .match-events-empty > span {
        font-size: 34px;
    }

    .match-events-empty h3 {
        margin: 7px 0 3px;
        font-size: 14px;
        font-weight: 900;
    }

    .match-events-empty p {
        margin: 0 0 10px;
        color: #7d877f;
        font-size: 9px;
    }

.match-events-no-results {
    margin: 0 16px 16px;
    padding: 14px;
    border: 1px dashed #dce4de;
    border-radius: 10px;
    background: #fafcfa;
    color: #7c867f;
    text-align: center;
    font-size: 9px;
}

@media (max-width: 900px) {
    .match-events-feed-heading,
    .match-events-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .match-events-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .match-events-search {
        width: 100%;
        min-width: 0;
    }
}

@media (max-width: 640px) {
    .match-events-summary-grid {
        grid-template-columns: 1fr;
    }

    .match-events-timeline::before {
        display: none;
    }

    .match-event-item {
        grid-template-columns: 45px 34px minmax(0, 1fr);
    }

    .match-event-actions {
        grid-column: 3;
    }

    .match-event-title-row {
        flex-direction: column;
    }

    .match-event-badges {
        justify-content: flex-start;
    }
}


/* =========================================================
   Three-lane match event timeline
   Home = right, Neutral = center, Away = left
   ========================================================= */

.match-events-three-lane {
    position: relative;
    padding: 14px 16px 20px;
}

    .match-events-three-lane::before {
        position: absolute;
        top: 70px;
        bottom: 24px;
        left: 50%;
        width: 2px;
        background: linear-gradient( 180deg, rgba(91, 140, 59, .12), rgba(91, 140, 59, .32), rgba(91, 140, 59, .12) );
        content: "";
        transform: translateX(-50%);
    }

.match-events-lane-headings {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 110px minmax(0, 1fr);
    grid-template-areas: "home center away";
    gap: 14px;
    position: relative;
    z-index: 2;
    margin-bottom: 14px;
}

    .match-events-lane-headings > div {
        padding: 9px 12px;
        border: 1px solid #e5ebe6;
        border-radius: 11px;
        background: #fafcfa;
    }

        .match-events-lane-headings > div span,
        .match-events-lane-headings > div strong {
            display: block;
        }

        .match-events-lane-headings > div span {
            color: #8c958e;
            font-size: 7px;
        }

        .match-events-lane-headings > div strong {
            margin-top: 2px;
            color: #344139;
            font-size: 10px;
            font-weight: 900;
        }

    .match-events-lane-headings .is-away {
        grid-area: away;
        text-align: left;
        border-top: 3px solid #365875;
    }

    .match-events-lane-headings .is-center {
        grid-area: center;
        text-align: center;
        border-top: 3px solid #8b7a4b;
    }

    .match-events-lane-headings .is-home {
        grid-area: home;
        text-align: right;
        border-top: 3px solid #5b8c3b;
    }

.match-event-lane-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 110px minmax(0, 1fr);
    grid-template-areas: "home axis away";
    gap: 14px;
    align-items: start;
    position: relative;
    z-index: 1;
    min-height: 78px;
}

    .match-event-lane-row + .match-event-lane-row {
        margin-top: 9px;
    }

    .match-event-lane-row[hidden] {
        display: none !important;
    }

.match-event-axis {
    grid-area: axis;
    display: flex;
    align-items: center;
    flex-direction: column;
    position: relative;
    z-index: 3;
    padding-top: 5px;
    text-align: center;
}

.match-event-axis-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 3px solid #fff;
    border-radius: 50%;
    background: #f0f5ef;
    box-shadow: 0 0 0 1px #dfe7e0, 0 5px 12px rgba(27, 48, 33, .08);
    font-size: 13px;
}

.match-event-axis strong {
    display: block;
    margin-top: 4px;
    padding: 2px 6px;
    border-radius: 999px;
    background: #fff;
    color: #344139;
    font-size: 10px;
    font-weight: 900;
    direction: ltr;
}

.match-event-axis small {
    display: block;
    max-width: 100px;
    margin-top: 2px;
    padding: 0 3px;
    background: #fff;
    color: #8c958e;
    font-size: 6px;
    line-height: 1.35;
}

.match-event-side-card {
    min-width: 0;
    padding: 11px 12px;
    border: 1px solid #e5ebe6;
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 5px 16px rgba(27, 48, 33, .045);
}

    .match-event-side-card.is-home {
        grid-area: home;
        border-right: 4px solid #5b8c3b;
    }

    .match-event-side-card.is-away {
        grid-area: away;
        border-left: 4px solid #365875;
    }

    .match-event-side-card.is-neutral {
        grid-column: 1 / -1;
        grid-row: 1;
        justify-self: center;
        width: min(620px, 72%);
        margin-top: 48px;
        border-top: 4px solid #8b7a4b;
        background: #fffdf8;
        text-align: center;
    }

        .match-event-side-card.is-neutral .match-event-title-row,
        .match-event-side-card.is-neutral .match-event-card-footer {
            justify-content: center;
        }

        .match-event-side-card.is-neutral .match-event-team-line,
        .match-event-side-card.is-neutral .match-event-person-line,
        .match-event-side-card.is-neutral .match-event-official-line {
            justify-content: center;
        }

        .match-event-side-card.is-neutral .match-event-detail,
        .match-event-side-card.is-neutral .match-event-note {
            text-align: center;
        }

.match-event-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 9px;
    margin-top: 9px;
    padding-top: 8px;
    border-top: 1px dashed #e4eae5;
}

.match-event-side-indicator {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 7px;
    font-weight: 800;
}

    .match-event-side-indicator.is-home {
        background: #edf5e8;
        color: #4d7737;
    }

    .match-event-side-indicator.is-away {
        background: #edf3f8;
        color: #365875;
    }

    .match-event-side-indicator.is-neutral {
        background: #f7f1df;
        color: #79672f;
    }

.match-event-team-line span.is-neutral {
    background: #f7f1df;
    color: #79672f;
}

/* Existing single-column timeline line is no longer used here. */
.match-events-three-lane.match-events-timeline::before {
    right: auto;
}

@media (max-width: 900px) {
    .match-events-lane-headings {
        grid-template-columns: minmax(0, 1fr) 84px minmax(0, 1fr);
    }

    .match-event-lane-row {
        grid-template-columns: minmax(0, 1fr) 84px minmax(0, 1fr);
        gap: 8px;
    }

    .match-event-side-card.is-neutral {
        width: min(560px, 84%);
    }
}

@media (max-width: 700px) {
    .match-events-three-lane::before {
        left: 30px;
        transform: none;
    }

    .match-events-lane-headings {
        display: none;
    }

    .match-event-lane-row {
        display: grid;
        grid-template-columns: 48px minmax(0, 1fr);
        grid-template-areas: "axis card";
        gap: 8px;
        min-height: 0;
    }

    .match-event-axis {
        grid-area: axis;
    }

    .match-event-side-card.is-home,
    .match-event-side-card.is-away,
    .match-event-side-card.is-neutral {
        grid-area: card;
        grid-column: auto;
        grid-row: auto;
        justify-self: stretch;
        width: auto;
        margin-top: 0;
        text-align: right;
    }

    .match-event-side-card.is-home {
        border-right: 4px solid #5b8c3b;
        border-left: 1px solid #e5ebe6;
    }

    .match-event-side-card.is-away {
        border-right: 4px solid #365875;
        border-left: 1px solid #e5ebe6;
    }

    .match-event-side-card.is-neutral {
        border-right: 4px solid #8b7a4b;
        border-top: 1px solid #e5ebe6;
        background: #fffdf8;
    }

        .match-event-side-card.is-neutral .match-event-title-row,
        .match-event-side-card.is-neutral .match-event-card-footer,
        .match-event-side-card.is-neutral .match-event-team-line,
        .match-event-side-card.is-neutral .match-event-person-line,
        .match-event-side-card.is-neutral .match-event-official-line {
            justify-content: initial;
        }

        .match-event-side-card.is-neutral .match-event-detail,
        .match-event-side-card.is-neutral .match-event-note {
            text-align: right;
        }
}
