﻿.match-details-page {
    --match-navy: #071a33;
    --match-navy-soft: #0b2d57;
    --match-green: #5b8c3b;
    --match-green-dark: #47702f;
    --match-bg: #f4f7f3;
    --match-border: #e1e7df;
    --match-text: #172135;
    --match-muted: #6f7b8c;
    min-height: 100vh;
    background: var(--match-bg);
    color: var(--match-text);
}

.match-details-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
    padding: 28px 30px;
    border-radius: 22px;
    background: linear-gradient( 135deg, var(--match-navy), var(--match-navy-soft) );
    color: #ffffff;
    box-shadow: 0 14px 34px rgba(7, 26, 51, 0.18);
}

.match-details-eyebrow {
    display: block;
    margin-bottom: 8px;
    color: #bdd0e7;
    font-size: 0.78rem;
    font-weight: 800;
}

.match-details-header h1 {
    margin: 0 0 8px;
    font-size: clamp(1.7rem, 3vw, 2.35rem);
    font-weight: 900;
}

.match-details-header p {
    max-width: 760px;
    margin: 0;
    color: #d7e2ef;
    line-height: 1.8;
}

.match-details-header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

    .match-details-header-actions .btn {
        min-width: 145px;
        border-radius: 11px;
        font-weight: 800;
    }

.match-scoreboard {
    overflow: hidden;
    margin-bottom: 20px;
    border: 1px solid rgba(91, 140, 59, 0.24);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.07);
}

.match-scoreboard-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 15px 22px;
    border-bottom: 1px solid #e8ece7;
    background: #fafcf9;
}

.match-scoreboard-identity,
.match-scoreboard-flags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
}

.match-code-badge,
.match-status-badge,
.details-flag,
.match-live-state {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 900;
}

.match-code-badge {
    background: #edf2f7;
    color: #344155;
}

.match-status-badge.status-draft,
.record-status-list .status-draft {
    background: #edf0f3;
    color: #677384;
}

.match-status-badge.status-scheduled,
.record-status-list .status-scheduled {
    background: #e7efff;
    color: #275ba4;
}

.match-status-badge.status-live,
.record-status-list .status-live {
    background: #fee4e4;
    color: #c22b2b;
}

.match-status-badge.status-completed,
.record-status-list .status-completed {
    background: #e3f5e6;
    color: #26713b;
}

.match-status-badge.status-problem,
.record-status-list .status-problem {
    background: #fff1dd;
    color: #9b6200;
}

.match-live-state {
    gap: 6px;
    background: #fff0f0;
    color: #c92d2d;
}

    .match-live-state span {
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: #dc2929;
        box-shadow: 0 0 0 4px rgba(220, 41, 41, 0.12);
    }

.details-flag {
    background: #edf0f3;
    color: #687485;
}

    .details-flag.is-positive {
        background: #e2f3e5;
        color: #26713b;
    }

    .details-flag.is-warning {
        background: #fff2d8;
        color: #8c6205;
    }

    .details-flag.is-public {
        background: #e7efff;
        color: #2b5ca0;
    }

    .details-flag.is-hidden {
        background: #f0f1f3;
        color: #747d89;
    }

    .details-flag.is-featured {
        background: #fff0c8;
        color: #8d6500;
    }

.match-scoreboard-title {
    padding: 24px 24px 5px;
    text-align: center;
}

    .match-scoreboard-title > span {
        color: var(--match-green-dark);
        font-size: 0.76rem;
        font-weight: 900;
    }

    .match-scoreboard-title h2 {
        margin: 6px 0;
        color: var(--match-text);
        font-size: clamp(1.25rem, 3vw, 1.85rem);
        font-weight: 900;
    }

    .match-scoreboard-title p {
        margin: 0;
        color: var(--match-muted);
        font-size: 0.84rem;
    }

.match-teams-score {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(170px, auto) minmax(0, 1fr);
    align-items: center;
    gap: 24px;
    padding: 30px;
}

.match-team {
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 0;
}

.match-away-team {
    flex-direction: row-reverse;
    text-align: left;
}

.team-initial {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 68px;
    height: 68px;
    border: 1px solid #d8e4d1;
    border-radius: 21px;
    background: linear-gradient( 135deg, #eef5ea, #ffffff );
    color: var(--match-green-dark);
    font-size: 1.65rem;
    font-weight: 900;
}

.match-team span {
    display: block;
    margin-bottom: 3px;
    color: #8a94a2;
    font-size: 0.7rem;
    font-weight: 800;
}

.match-team h3 {
    overflow: hidden;
    margin: 0;
    color: #172135;
    font-size: 1.08rem;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.match-team small {
    color: #6f7b8c;
    font-size: 0.75rem;
}

.match-team em {
    display: block;
    margin-top: 5px;
    color: #9b6500;
    font-size: 0.68rem;
    font-style: normal;
    font-weight: 700;
}

.match-score-center {
    display: grid;
    place-items: center;
    gap: 7px;
    min-width: 180px;
    text-align: center;
}

    .match-score-center > strong {
        color: var(--match-navy);
        font-size: clamp(2rem, 5vw, 3.3rem);
        font-weight: 900;
        letter-spacing: 2px;
        line-height: 1;
    }

    .match-score-center span {
        color: #8a6500;
        font-size: 0.72rem;
        font-weight: 800;
    }

    .match-score-center small {
        color: #768295;
        font-size: 0.75rem;
        font-weight: 700;
    }

.match-scoreboard-bottom {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-top: 1px solid #e8ece7;
    background: #fafcf9;
}

    .match-scoreboard-bottom > div {
        padding: 15px 18px;
        border-left: 1px solid #e8ece7;
    }

        .match-scoreboard-bottom > div:last-child {
            border-left: 0;
        }

    .match-scoreboard-bottom span,
    .detail-item span,
    .schedule-primary-card span,
    .venue-highlight span,
    .details-note span,
    .record-status-list span,
    .audit-list span,
    .live-stream-link span {
        display: block;
        margin-bottom: 4px;
        color: #8791a0;
        font-size: 0.7rem;
        font-weight: 800;
    }

    .match-scoreboard-bottom strong {
        display: block;
        overflow: hidden;
        color: #354256;
        font-size: 0.8rem;
        font-weight: 900;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

.match-details-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    align-items: start;
    gap: 20px;
}

.match-details-main,
.match-details-sidebar {
    display: grid;
    gap: 20px;
}

.details-card {
    padding: 22px;
    border: 1px solid var(--match-border);
    border-radius: 19px;
    background: #ffffff;
    box-shadow: 0 8px 25px rgba(15, 23, 42, 0.045);
}

.details-card-heading {
    margin-bottom: 18px;
    padding-bottom: 15px;
    border-bottom: 1px solid #edf0ec;
}

    .details-card-heading > div {
        display: flex;
        align-items: center;
        gap: 12px;
    }

.details-section-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 43px;
    height: 43px;
    border-radius: 13px;
    background: #eef5ea;
    font-size: 1.25rem;
}

.details-card-heading h2,
.sidebar-card-heading h2 {
    margin: 0;
    color: #1e293b;
    font-size: 1rem;
    font-weight: 900;
}

.details-card-heading p {
    margin: 4px 0 0;
    color: #7d8796;
    font-size: 0.75rem;
}

.details-information-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 11px;
}

.detail-item {
    min-width: 0;
    padding: 12px 13px;
    border: 1px solid #edf0ec;
    border-radius: 11px;
    background: #fbfcfb;
}

    .detail-item strong {
        display: block;
        overflow: hidden;
        color: #344155;
        font-size: 0.8rem;
        font-weight: 900;
        text-overflow: ellipsis;
    }

.parent-match-card,
.live-stream-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-top: 15px;
    padding: 14px 15px;
    border: 1px solid #dfe8da;
    border-radius: 12px;
    background: #f7faf5;
}

    .parent-match-card > div {
        min-width: 0;
    }

    .parent-match-card span {
        display: block;
        color: #788476;
        font-size: 0.7rem;
        font-weight: 800;
    }

    .parent-match-card strong {
        display: block;
        margin: 3px 0;
        color: #334328;
        font-size: 0.82rem;
    }

    .parent-match-card small {
        color: #74816e;
        font-size: 0.7rem;
    }

.schedule-primary-card {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 13px;
}

    .schedule-primary-card > div {
        padding: 15px;
        border-radius: 13px;
        background: linear-gradient( 135deg, #f3f8f0, #fafcf9 );
    }

    .schedule-primary-card strong {
        display: block;
        color: #2e4323;
        font-size: 0.98rem;
        font-weight: 900;
    }

    .schedule-primary-card small {
        color: #71806a;
        font-size: 0.7rem;
    }

.venue-highlight {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 14px;
    padding: 16px;
    border-radius: 14px;
    background: linear-gradient( 135deg, #0b2d57, #071a33 );
    color: #ffffff;
}

.venue-icon {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 55px;
    height: 55px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.11);
    font-size: 1.55rem;
}

.venue-highlight span {
    color: #b9cce1;
}

.venue-highlight h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 900;
}

.venue-highlight p {
    margin: 4px 0 0;
    color: #d4e0ec;
    font-size: 0.74rem;
}

.coordinates-line {
    margin-top: 12px;
    padding: 8px 11px;
    border-radius: 9px;
    background: #f1f4f6;
    color: #667286;
    font-size: 0.72rem;
    text-align: center;
}

.score-details-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.score-detail-card {
    padding: 15px 12px;
    border: 1px solid #e4e9e2;
    border-radius: 13px;
    background: #fafcf9;
    text-align: center;
}

    .score-detail-card.is-main {
        border-color: #cfe0c5;
        background: #f1f7ed;
    }

    .score-detail-card span {
        display: block;
        margin-bottom: 7px;
        color: #7f8998;
        font-size: 0.7rem;
        font-weight: 800;
    }

    .score-detail-card strong {
        color: #263548;
        font-size: 1.15rem;
        font-weight: 900;
    }

.details-note {
    margin-top: 15px;
    padding: 13px 15px;
    border-right: 4px solid var(--match-green);
    border-radius: 10px;
    background: #f6f9f4;
}

    .details-note.is-admin {
        border-right-color: #7b8798;
        background: #f5f6f8;
    }

    .details-note p {
        margin: 0;
        color: #566276;
        font-size: 0.8rem;
        line-height: 1.8;
        white-space: pre-line;
    }

.details-empty {
    padding: 25px 15px;
    border-radius: 12px;
    background: #f7f8f9;
    color: #7b8797;
    font-size: 0.8rem;
    text-align: center;
}

.live-stream-link {
    background: #f7f9fc;
}

    .live-stream-link > div {
        min-width: 0;
    }

    .live-stream-link strong {
        display: block;
        overflow: hidden;
        color: #34516e;
        font-size: 0.72rem;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

.notes-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 13px;
}

    .notes-grid .details-note {
        margin-top: 0;
    }

.sidebar-card {
    padding: 18px;
}

.sidebar-card-heading {
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid #edf0ec;
}

.record-status-list,
.audit-list {
    display: grid;
    gap: 10px;
}

    .record-status-list > div,
    .audit-list > div {
        padding-bottom: 10px;
        border-bottom: 1px solid #f0f2ef;
    }

        .record-status-list > div:last-child,
        .audit-list > div:last-child {
            padding-bottom: 0;
            border-bottom: 0;
        }

    .record-status-list strong,
    .audit-list strong {
        display: block;
        color: #344155;
        font-size: 0.78rem;
        font-weight: 900;
    }

        .record-status-list strong.status-live,
        .record-status-list strong.status-completed,
        .record-status-list strong.status-problem,
        .record-status-list strong.status-scheduled,
        .record-status-list strong.status-draft {
            width: fit-content;
            padding: 4px 8px;
            border-radius: 999px;
        }

    .audit-list small {
        display: block;
        margin-top: 3px;
        color: #7a8595;
        font-size: 0.68rem;
    }

.record-guid {
    overflow-wrap: anywhere;
    font-size: 0.66rem !important;
}

.verification-box {
    margin-top: 15px;
    padding: 13px;
    border: 1px solid #cfe1c6;
    border-radius: 11px;
    background: #f3f8f0;
}

    .verification-box strong,
    .verification-box span,
    .verification-box small {
        display: block;
    }

    .verification-box strong {
        color: #3e612a;
        font-size: 0.8rem;
    }

    .verification-box span,
    .verification-box small {
        margin-top: 3px;
        color: #6d7c66;
        font-size: 0.7rem;
    }

    .verification-box p {
        margin: 8px 0 0;
        color: #586b50;
        font-size: 0.74rem;
        line-height: 1.7;
    }

.match-content-counts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

    .match-content-counts > div {
        display: grid;
        place-items: center;
        padding: 15px 8px;
        border-radius: 12px;
        background: #f6f8f5;
    }

    .match-content-counts span {
        font-size: 1.25rem;
    }

    .match-content-counts strong {
        margin-top: 4px;
        color: #2f3e50;
        font-size: 1.25rem;
        font-weight: 900;
    }

    .match-content-counts small {
        color: #7c8795;
        font-size: 0.68rem;
    }

.sidebar-help-text {
    margin: 12px 0 0;
    color: #7c8795;
    font-size: 0.69rem;
    line-height: 1.7;
}

.sidebar-actions {
    display: grid;
    gap: 9px;
}

    .sidebar-actions .btn {
        width: 100%;
        border-radius: 10px;
        font-weight: 800;
    }

@media (max-width: 1200px) {
    .match-details-grid {
        grid-template-columns: 1fr;
    }

    .match-details-sidebar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sidebar-actions {
        align-self: stretch;
    }
}

@media (max-width: 992px) {
    .match-details-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .match-teams-score {
        grid-template-columns: 1fr;
    }

    .match-team,
    .match-away-team {
        justify-content: center;
        flex-direction: row;
        text-align: right;
    }

    .match-score-center {
        order: -1;
        margin-bottom: 8px;
    }

    .match-scoreboard-bottom {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .details-information-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .score-details-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .match-details-header {
        padding: 22px 18px;
        border-radius: 18px;
    }

    .match-details-header-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        width: 100%;
    }

        .match-details-header-actions .btn {
            min-width: 0;
        }

    .match-scoreboard-top {
        align-items: flex-start;
        flex-direction: column;
    }

    .match-teams-score {
        padding: 22px 16px;
    }

    .match-scoreboard-bottom {
        grid-template-columns: 1fr;
    }

        .match-scoreboard-bottom > div {
            border-bottom: 1px solid #e8ece7;
            border-left: 0;
        }

            .match-scoreboard-bottom > div:last-child {
                border-bottom: 0;
            }

    .details-information-grid,
    .schedule-primary-card,
    .score-details-grid,
    .notes-grid,
    .match-details-sidebar {
        grid-template-columns: 1fr;
    }

    .details-card {
        padding: 17px;
        border-radius: 15px;
    }

    .parent-match-card,
    .live-stream-link {
        align-items: flex-start;
        flex-direction: column;
    }

        .parent-match-card .btn,
        .live-stream-link .btn {
            width: 100%;
        }
}

@media (max-width: 480px) {
    .match-details-header-actions {
        grid-template-columns: 1fr;
    }

    .match-team {
        flex-direction: column;
        text-align: center;
    }

        .match-team h3 {
            white-space: normal;
        }

    .team-initial {
        width: 58px;
        height: 58px;
    }

    .match-score-center {
        min-width: 0;
    }
}
/* =========================================================
   Club logos and links in MatchDetails
   ========================================================= */

.details-team-logo-link {
    display: inline-flex;
    flex: 0 0 auto;
    border-radius: 50%;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

    .details-team-logo-link:hover {
        transform: translateY(-3px) scale(1.03);
    }

.details-team-logo {
    position: relative;
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 78px;
    height: 78px;
    overflow: hidden;
    border: 3px solid #ffffff;
    border-radius: 50%;
    background: #f3f7f1;
    box-shadow: 0 0 0 1px #d6e2d0, 0 9px 22px rgba(15, 23, 42, 0.13);
}

    .details-team-logo img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        padding: 7px;
        background: #ffffff;
    }

.details-team-logo-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: linear-gradient( 135deg, #eef5ea, #d8e7d0 );
    color: #47702f;
    font-size: 1.65rem;
    font-weight: 900;
}

.details-team-name-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

    .details-team-name-link h3 {
        transition: color 0.2s ease;
    }

    .details-team-name-link:hover h3 {
        color: #5b8c3b;
    }

@media (max-width: 480px) {
    .details-team-logo {
        width: 68px;
        height: 68px;
    }

    .details-team-logo-fallback {
        font-size: 1.4rem;
    }
}