﻿/* Gedian Sports — Public MatchDetails — three-card, Arabic RTL layout.
   This stylesheet targets the ACTUAL .pmd-* markup in MatchDetails.cshtml.
   The supplied legacy .match-details-page styles do not target that page.
   Do not paste SQL/schema text into this file. */

.public-match-details-page {
    --pmd-green: #5b8c3b;
    --pmd-dark: #466f2d;
    --pmd-pale: #edf5e8;
    --pmd-navy: #122847;
    --pmd-text: #1f2937;
    --pmd-muted: #738094;
    --pmd-line: #e5e9e3;
    --pmd-surface: #fff;
    background: #f6f8f5;
    color: var(--pmd-text);
    min-height: 100vh;
    padding: 22px 0 46px;
    font-family: Tajawal,system-ui,sans-serif;
    direction: rtl;
    font-size: 15px;
}

    .public-match-details-page *, .public-match-details-page *::before, .public-match-details-page *::after {
        box-sizing: border-box
    }

    .public-match-details-page a {
        color: inherit;
        text-decoration: none
    }

        .public-match-details-page a:hover {
            color: var(--pmd-dark)
        }

    .public-match-details-page .container {
        max-width: 1220px;
        margin: 0 auto;
        padding-inline: 20px
    }

    .public-match-details-page [hidden] {
        display: none !important
    }

    .public-match-details-page button {
        font: inherit;
        cursor: pointer
    }

    .public-match-details-page img {
        max-width: 100%
    }

.pmd-backbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
    color: #667488;
    font-size: .85rem
}

    .pmd-backbar > a {
        display: inline-flex;
        align-items: center;
        gap: 9px;
        font-weight: 750
    }

.pmd-verified-mini {
    margin-inline-start: 10px;
    color: var(--pmd-green);
    font-weight: 800
}

.pmd-unavailable {
    background: white;
    border: 1px solid var(--pmd-line);
    border-radius: 18px;
    padding: 60px 20px;
    text-align: center
}

.pmd-unavailable-icon {
    font-size: 2rem
}

.pmd-unavailable h1 {
    font-size: 1.45rem
}

.pmd-unavailable a {
    display: inline-flex;
    margin-top: 18px;
    background: var(--pmd-green);
    color: #fff;
    padding: 12px 20px;
    border-radius: 10px
}

/* CARD ONE — match/competition summary */
.pmd-scoreboard {
    overflow: hidden;
    border: 1px solid #dfe8d8;
    background: var(--pmd-surface);
    border-radius: 19px;
    box-shadow: 0 8px 22px rgba(24,43,24,.04);
    margin-bottom: 12px
}

.pmd-scoreboard-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 16px 25px;
    background: linear-gradient(105deg,#f1f7ed,#fbfcfa);
    border-bottom: 1px solid var(--pmd-line)
}

.pmd-scoreboard-context {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 12px;
    min-width: 0
}

.pmd-competition-name {
    font-size: 1.12rem;
    line-height: 1.5;
    font-weight: 900;
    color: #173457
}

.pmd-season {
    font-size: .83rem;
    font-weight: 800;
    color: #5d6d80;
    unicode-bidi: isolate
}

.pmd-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
    font-size: .81rem;
    font-weight: 900;
    padding: 6px 12px;
    border-radius: 999px;
    background: #e8eff8;
    color: #395e8a
}

    .pmd-status-pill.status-completed {
        background: #e4f3e6;
        color: #227743
    }

    .pmd-status-pill.status-live {
        background: #fee8e7;
        color: #bd3131
    }

    .pmd-status-pill.status-problem {
        background: #fff1da;
        color: #95620d
    }

    .pmd-status-pill.status-draft {
        background: #f0f1f3;
        color: #667384
    }

    .pmd-status-pill i {
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: currentColor
    }

.pmd-scoreboard-main {
    display: grid;
    grid-template-columns: minmax(0,1fr) minmax(115px,.60fr) minmax(0,1fr);
    align-items: center;
    gap: 8px;
    min-height: 194px;
    padding: 26px 30px 21px
}

.pmd-score-team {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    text-align: center
}

.pmd-team-logo {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 62px;
    height: 62px;
    border: 1px solid #dce7d6;
    border-radius: 50%;
    background: #f9fbf8;
    overflow: hidden;
    color: var(--pmd-dark);
    font-weight: 900;
    font-size: 1.3rem
}

    .pmd-team-logo img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        padding: 6px
    }

    .pmd-team-logo span {
        width: 100%;
        height: 100%;
        display: grid;
        place-items: center
    }

.pmd-team-name {
    font-size: 1.14rem;
    line-height: 1.5;
    color: #1a2d45;
    font-weight: 900;
    max-width: 100%;
    overflow-wrap: anywhere
}

.pmd-side-label {
    font-size: .74rem;
    color: #94a0af;
    font-weight: 800
}

.pmd-score-center {
    display: grid;
    justify-items: center;
    gap: 6px;
    min-width: 0
}

.pmd-main-score {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    unicode-bidi: isolate
}

    .pmd-main-score > span {
        unicode-bidi: isolate
    }

.pmd-score-separator {
    font-size: .75em;
    color: #8795a5
}

.pmd-main-score {
    white-space: nowrap;
    font-size: clamp(2rem,4.4vw,3rem);
    font-weight: 900;
    color: #132d4b;
    line-height: 1.2;
    letter-spacing: .035em;
    unicode-bidi: isolate
}

.pmd-live-state {
    font-size: .77rem;
    color: #cc3030;
    font-weight: 800
}

.pmd-secondary-score {
    text-align: center;
    font-size: .73rem;
    color: #68768a
}

.pmd-scoreboard-facts {
    display: grid;
    grid-template-columns: repeat(5,minmax(0,1fr));
    border-top: 1px solid var(--pmd-line);
    background: #fcfdfb
}

    .pmd-scoreboard-facts > div {
        padding: 13px 15px;
        min-width: 0;
        border-inline-start: 1px solid #eef1eb;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 4px
    }

        .pmd-scoreboard-facts > div:last-child {
            border-inline-start: 0
        }

    .pmd-scoreboard-facts span {
        font-size: .72rem;
        font-weight: 800;
        color: #7b899a
    }

    .pmd-scoreboard-facts strong, .pmd-scoreboard-facts a {
        font-size: .83rem;
        font-weight: 850;
        color: #263e57;
        line-height: 1.5;
        overflow-wrap: anywhere
    }

    .pmd-scoreboard-facts a {
        color: var(--pmd-dark)
    }

/* CARD TWO — unchanged tab navigation (one unified card). */
.pmd-tabs {
    display: flex;
    align-items: stretch;
    gap: 3px;
    padding: 7px;
    border: 1px solid #e1e7dd;
    background: #fff;
    border-radius: 16px;
    margin-bottom: 12px;
    box-shadow: 0 5px 18px rgba(27,38,23,.03);
    overflow-x: auto;
    scrollbar-width: thin
}

.pmd-tab {
    display: inline-flex;
    flex: 1 0 auto;
    min-width: 116px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    white-space: nowrap;
    padding: 12px 14px;
    border: 0;
    border-radius: 11px;
    background: transparent;
    color: #6d7989;
    font-size: .9rem;
    font-weight: 900;
    transition: background .15s,color .15s
}

    .pmd-tab > span {
        font-size: 1.07rem
    }

    .pmd-tab b {
        display: grid;
        place-items: center;
        min-width: 19px;
        height: 19px;
        padding: 0 4px;
        font-size: .68rem;
        font-weight: 900;
        border-radius: 999px;
        background: #edf1eb;
        color: #536c44
    }

    .pmd-tab:hover {
        background: #f4f8f1;
        color: #3d6f2d
    }

    .pmd-tab.is-active {
        color: #fff;
        background: var(--pmd-green);
        box-shadow: 0 4px 12px rgba(91,140,59,.19)
    }

        .pmd-tab.is-active b {
            color: #305427;
            background: #e8f2e2
        }

/* CARD THREE — exactly ONE outer container for the selected panel. */
.pmd-panel {
    border: 1px solid #e0e8dc;
    border-radius: 18px;
    background: #fff;
    padding: 24px 26px;
    min-height: 180px;
    box-shadow: 0 8px 22px rgba(28,40,27,.04)
}

    .pmd-panel > :first-child {
        margin-top: 0
    }

    .pmd-panel > :last-child {
        margin-bottom: 0
    }

.pmd-section-message {
    padding: 12px 15px;
    margin-bottom: 15px;
    border-radius: 10px;
    background: #fff4df;
    color: #956000;
    line-height: 1.75
}

.pmd-empty-small, .pmd-empty-state, .pmd-pitch-empty {
    color: #82909e;
    font-size: .83rem;
    line-height: 1.8;
    padding: 15px;
    background: #f8faf7;
    border-radius: 10px
}

.pmd-empty-state {
    text-align: center;
    padding: 30px
}

    .pmd-empty-state h3 {
        font-size: 1rem
    }

.pmd-panel h2, .pmd-panel h3, .pmd-panel p {
    overflow-wrap: anywhere
}

/* Overview — sub-groups divided by whitespace and rules, NOT nested cards */
.pmd-overview-facts, .pmd-venue-facts {
    display: grid;
    gap: 15px;
    grid-template-columns: repeat(2,minmax(0,1fr))
}

    .pmd-overview-facts > div, .pmd-venue-facts > div {
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 5px
    }

    .pmd-overview-facts span, .pmd-venue-facts span {
        font-size: .8rem;
        font-weight: 750;
        color: #8390a0
    }

    .pmd-overview-facts strong, .pmd-overview-facts a, .pmd-venue-facts strong, .pmd-venue-facts a {
        font-size: .98rem;
        font-weight: 850;
        color: #203851;
        overflow-wrap: anywhere
    }

    .pmd-overview-facts a, .pmd-venue-facts a {
        color: var(--pmd-dark)
    }

.pmd-overview-heading {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin: 26px 0 14px;
    padding-top: 20px;
    border-top: 1px solid #ecf0ea
}

    .pmd-overview-heading h2 {
        margin: 0;
        font-size: 1rem;
        font-weight: 900;
        color: #20334c
    }

    .pmd-overview-heading small {
        font-size: .74rem;
        color: #8793a1
    }

.pmd-team-form-grid {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 24px
}

.pmd-form-team, .pmd-next-team {
    min-width: 0
}

    .pmd-form-team h3, .pmd-next-team h3 {
        font-size: .92rem;
        font-weight: 850;
        margin: 0 0 12px;
        color: #2e422d
    }

.pmd-form-list {
    display: grid;
    gap: 0
}

.pmd-form-row {
    display: grid;
    align-items: center;
    grid-template-columns: 28px minmax(0,1fr) 55px 85px;
    gap: 9px;
    min-height: 43px;
    border-bottom: 1px solid #edf1ec;
    padding: 6px 0;
    font-size: .8rem
}

    .pmd-form-row:last-child {
        border-bottom: 0
    }

.pmd-form-opponent {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap
}

.pmd-form-row strong {
    white-space: nowrap;
    text-align: center;
    font-size: .8rem
}

.pmd-form-row small {
    white-space: nowrap;
    color: #94a0ad;
    text-align: left;
    font-size: .72rem
}

.pmd-result-chip {
    display: grid;
    place-items: center;
    height: 26px;
    width: 26px;
    border-radius: 8px;
    font-size: .72rem;
    font-weight: 900;
    background: #ebeff2;
    color: #607185
}

    .pmd-result-chip.is-win {
        color: #18723a;
        background: #dff3e3
    }

    .pmd-result-chip.is-draw {
        color: #8b691e;
        background: #faf1d8
    }

    .pmd-result-chip.is-loss {
        color: #b63838;
        background: #fde8e7
    }

.pmd-next-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 0;
    border-top: 1px solid #eef1ed;
    color: #213b53;
    font-size: .84rem
}

    .pmd-next-link strong {
        font-size: .78rem;
        color: #6a788c
    }

.pmd-venue-facts {
    grid-template-columns: repeat(3,minmax(0,1fr))
}

/* Lineups — one outer panel; internal divisions are flat sections. */
.pmd-formations-bar {
    display: grid;
    grid-template-columns: minmax(0,1fr) auto minmax(0,1fr);
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #f5f9f1;
    border-radius: 12px;
    margin-bottom: 18px
}

    .pmd-formations-bar > div {
        display: flex;
        flex-direction: column;
        gap: 3px;
        min-width: 0
    }

        .pmd-formations-bar > div:last-child {
            text-align: left
        }

    .pmd-formations-bar span {
        font-size: .76rem;
        color: #71806d
    }

    .pmd-formations-bar strong {
        font-size: 1rem;
        color: #294b2c
    }

.pmd-pitch-shell {
    max-width: 680px;
    margin: 0 auto 22px
}

.pmd-football-pitch {
    position: relative;
    isolation: isolate;
    width: 100%;
    aspect-ratio: 1 / 1.45;
    min-height: 480px;
    max-height: 680px;
    border: 5px solid #3b8a44;
    border-radius: 10px;
    background: repeating-linear-gradient(0deg,#398b4c 0%,#398b4c 12.5%,#318144 12.5%,#318144 25%);
    overflow: hidden
}

    .pmd-football-pitch::after {
        content: "";
        position: absolute;
        inset: 13px;
        border: 2px solid rgba(255,255,255,.6);
        pointer-events: none
    }

.pitch-half-line {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 13px;
    right: 13px;
    border-top: 2px solid rgba(255,255,255,.68)
}

.pitch-center-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 110px;
    height: 110px;
    border: 2px solid rgba(255,255,255,.68);
    border-radius: 50%;
    transform: translate(-50%,-50%)
}

.pitch-box, .pitch-goal-box {
    position: absolute;
    left: 24%;
    width: 52%;
    height: 15%;
    border: 2px solid rgba(255,255,255,.6)
}

.pitch-box-top, .pitch-goal-box-top {
    top: 13px;
    border-top: 0
}

.pitch-box-bottom, .pitch-goal-box-bottom {
    bottom: 13px;
    border-bottom: 0
}

.pitch-goal-box {
    left: 38%;
    width: 24%;
    height: 5%
}

.pmd-pitch-half-label {
    position: absolute;
    z-index: 1;
    left: 12px;
    color: rgba(255,255,255,.8);
    font-size: .67rem;
    max-width: 36%
}

    .pmd-pitch-half-label.is-away {
        top: 25%
    }

    .pmd-pitch-half-label.is-home {
        bottom: 25%
    }

    .pmd-pitch-half-label strong {
        display: block
    }

.pmd-pitch-player {
    position: absolute;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 100px;
    min-width: 54px;
    transform: translate(-50%,-50%);
    color: #fff !important;
    text-shadow: 0 1px 3px #122b22;
    text-align: center;
    font-size: .68rem;
    line-height: 1.15
}

    .pmd-pitch-player strong {
        font-size: .68rem;
        max-width: 90px;
        overflow-wrap: anywhere
    }

    .pmd-pitch-player small {
        font-size: .56rem;
        color: #fff
    }

.pmd-pitch-photo {
    position: relative;
    display: grid;
    place-items: center;
    background: #fff;
    color: #26482c;
    text-shadow: none;
    border: 2px solid #fff;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    overflow: visible;
    font-style: normal
}

    .pmd-pitch-photo img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 50%
    }

    .pmd-pitch-photo i {
        font-style: normal
    }

    .pmd-pitch-photo b {
        position: absolute;
        bottom: -5px;
        right: -5px;
        background: #142c48;
        color: #fff;
        border-radius: 7px;
        padding: 1px 3px;
        font-size: .58rem
    }

.pmd-pitch-player em {
    font-style: normal;
    background: #ffd365;
    color: #132e45;
    border-radius: 5px;
    padding: 0 3px
}

.pmd-pitch-caption {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 8px;
    color: #778391;
    font-size: .7rem
}

.pmd-lineup-coaches, .pmd-official-block {
    padding-top: 18px;
    border-top: 1px solid #edf0eb;
    margin-top: 22px
}

.pmd-coach-columns, .pmd-lineup-columns, .pmd-staff-columns {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 20px
}

    .pmd-coach-columns > article, .pmd-lineup-team-card, .pmd-staff-columns > article {
        min-width: 0;
        padding: 0
    }

.pmd-staff-team-title, .pmd-lineup-team-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 0 11px;
    border-bottom: 1px solid #edf0ec
}

    .pmd-staff-team-title > span, .pmd-lineup-team-heading span {
        font-size: .7rem;
        color: #8895a2
    }

    .pmd-staff-team-title a, .pmd-lineup-team-heading h3 {
        color: #28462b;
        font-weight: 900;
        font-size: .94rem;
        margin: 0
    }

    .pmd-lineup-team-heading strong {
        color: #657f56;
        font-size: .8rem
    }

.pmd-squad-subheading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 16px 0 9px;
    font-size: .83rem;
    font-weight: 850
}

    .pmd-squad-subheading b {
        background: #ecf3e8;
        border-radius: 8px;
        padding: 2px 8px
    }

    .pmd-squad-subheading.is-sub {
        padding-top: 13px;
        border-top: 1px solid #eff2ec
    }

.pmd-player-list, .pmd-staff-profile-list {
    display: grid;
    gap: 0
}

    .pmd-player-list > *, .pmd-staff-profile-list > * {
        border-bottom: 1px solid #f0f2ee;
        padding: 10px 0
    }

/* Events and the timeline: no separate nested cards. */
.pmd-event-summary {
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 12px;
    margin-bottom: 22px;
    padding: 16px 0;
    border-bottom: 1px solid #edf1ec
}

    .pmd-event-summary > div {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 12px
    }

    .pmd-event-summary p {
        display: grid;
        gap: 2px;
        margin: 0
    }

    .pmd-event-summary small {
        font-size: .69rem;
        color: #8794a2
    }

    .pmd-event-summary strong {
        font-size: 1.17rem;
        color: #173453
    }

.pmd-events-timeline {
    display: grid;
    gap: 0
}

.pmd-event-item {
    display: grid;
    grid-template-columns: 88px 34px minmax(0,1fr);
    gap: 12px;
    align-items: start;
    padding: 15px 3px;
    border-bottom: 1px solid #edf0eb
}

    .pmd-event-item:last-child {
        border-bottom: 0
    }

.pmd-event-time {
    display: grid;
    gap: 3px;
    text-align: center;
    color: #384b5d;
    font-size: .85rem
}

    .pmd-event-time > span {
        font-size: .66rem;
        color: #8996a2
    }

.pmd-event-marker {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    background: #eef5e9;
    border-radius: 50%
}

.pmd-event-copy > div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap
}

.pmd-event-copy h3 {
    margin: 0;
    font-size: .9rem
}

.pmd-event-copy > div > span, .pmd-event-copy p, .pmd-event-copy small {
    font-size: .75rem;
    color: #8490a0;
    margin: 4px 0 0
}

.pmd-event-item.is-not-counted {
    opacity: .66
}

/* Statistics. Both regions remain INSIDE the single selected panel. */
.pmd-possession-card, .pmd-stat-table-card {
    margin: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 0
}

.pmd-possession-card {
    padding-bottom: 24px;
    margin-bottom: 22px;
    border-bottom: 1px solid #edf0eb
}

.pmd-possession-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 16px
}

    .pmd-possession-heading > div {
        display: grid;
        gap: 3px
    }

    .pmd-possession-heading span {
        color: #6d8465;
        font-size: .8rem
    }

    .pmd-possession-heading h3 {
        margin: 0;
        font-size: .96rem
    }

.pmd-possession-empty {
    padding: 20px;
    color: #8493a0;
    text-align: center;
    font-size: .83rem
}

    .pmd-possession-empty small {
        display: block;
        margin-top: 8px
    }

.pmd-possession-numbers {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 12px
}

    .pmd-possession-numbers > div {
        display: grid;
        gap: 4px
    }

        .pmd-possession-numbers > div:last-child {
            text-align: left
        }

    .pmd-possession-numbers strong {
        font-size: 1.4rem;
        color: #1d3952
    }

    .pmd-possession-numbers span {
        font-size: .8rem;
        color: #7d8b98
    }

.pmd-possession-track {
    display: flex;
    height: 12px;
    border-radius: 999px;
    overflow: hidden;
    background: #edf1ef
}

    .pmd-possession-track span.is-home {
        background: #5b8c3b
    }

    .pmd-possession-track span.is-away {
        background: #17446c
    }

.pmd-stat-team-head {
    display: grid;
    grid-template-columns: minmax(0,1fr) auto minmax(0,1fr);
    gap: 12px;
    align-items: center;
    margin-bottom: 18px
}

    .pmd-stat-team-head > div {
        display: flex;
        align-items: center;
        gap: 9px;
        min-width: 0
    }

        .pmd-stat-team-head > div:last-child {
            justify-content: flex-end
        }

    .pmd-stat-team-head strong {
        font-size: .85rem;
        overflow-wrap: anywhere
    }

    .pmd-stat-team-head > span {
        font-size: .7rem;
        color: #95a0aa
    }

.pmd-stat-logo {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid #e0e8dc
}

    .pmd-stat-logo img {
        height: 100%;
        width: 100%;
        object-fit: contain;
        padding: 4px
    }

.pmd-stat-rows > div {
    display: grid;
    grid-template-columns: 64px minmax(0,1fr) 64px;
    align-items: center;
    gap: 12px;
    min-height: 43px;
    border-bottom: 1px solid #eef1ec;
    text-align: center
}

.pmd-stat-rows strong {
    font-size: .95rem;
    color: #203e54
}

.pmd-stat-rows span {
    font-size: .8rem;
    color: #647486
}

.pmd-stat-note {
    font-size: .75rem;
    color: #8693a1;
    margin-top: 16px
}

/* Officials: integrated list, no nested cards. */
.pmd-official-block:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: 0
}

.pmd-block-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 15px
}

    .pmd-block-heading span {
        font-size: .7rem;
        color: #8b98a5
    }

    .pmd-block-heading h3 {
        font-size: .98rem;
        margin: 3px 0 0
    }

    .pmd-block-heading b {
        font-size: .76rem;
        border-radius: 9px;
        color: #547d3c;
        background: #edf5e8;
        padding: 4px 9px
    }

.pmd-referee-list {
    display: grid;
    gap: 0
}

.pmd-referee-list-row {
    display: grid;
    grid-template-columns: 30px 40px minmax(88px,.8fr) minmax(120px,1.2fr) minmax(90px,.9fr) 20px;
    gap: 12px;
    align-items: center;
    min-height: 75px;
    border-bottom: 1px solid #edf1ec;
    padding: 8px 0
}

    .pmd-referee-list-row:last-child {
        border-bottom: 0
    }

.pmd-referee-order {
    text-align: center;
    color: #94a0ab;
    font-size: .8rem
}

.pmd-referee-photo {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 1px solid #dce9d4;
    border-radius: 50%;
    overflow: hidden
}

    .pmd-referee-photo img {
        width: 100%;
        height: 100%;
        object-fit: cover
    }

.pmd-referee-role {
    font-size: .78rem;
    color: #476d3b
}

.pmd-referee-identity {
    display: grid;
    gap: 4px;
    font-size: .83rem
}

    .pmd-referee-identity small, .pmd-referee-meta small {
        font-size: .7rem;
        color: #8896a2
    }

.pmd-referee-meta {
    display: grid;
    gap: 4px;
    font-size: .8rem
}

.pmd-profile-chevron {
    color: #7b9a69
}

/* Public actions are links/buttons only, not a fourth card. */
.pmd-bottom-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 18px
}

.pmd-back-button, .pmd-share-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border: 1px solid #dbe6d4;
    border-radius: 10px;
    background: #fff;
    color: #426e32;
    font-size: .83rem;
    font-weight: 850
}

.pmd-share-button {
    background: var(--pmd-green);
    border-color: var(--pmd-green);
    color: #fff;
    cursor: pointer
}

    .pmd-share-button:hover {
        background: var(--pmd-dark)
    }

@media(max-width:900px) {
    .pmd-scoreboard-facts {
        grid-template-columns: repeat(3,minmax(0,1fr))
    }

        .pmd-scoreboard-facts > div {
            border-bottom: 1px solid #eef1eb
        }

    .pmd-team-form-grid {
        gap: 15px
    }

    .pmd-form-row {
        grid-template-columns: 26px minmax(0,1fr) 48px;
        gap: 7px
    }

        .pmd-form-row small {
            grid-column: 2 / -1;
            text-align: right
        }
}

@media(max-width:640px) {
    .public-match-details-page {
        padding: 14px 0 35px;
        font-size: 14px
    }

        .public-match-details-page .container {
            padding-inline: 10px
        }

    .pmd-backbar {
        margin-inline: 5px
    }

    .pmd-scoreboard-top {
        padding: 13px 14px
    }

    .pmd-competition-name {
        font-size: .97rem
    }

    .pmd-season {
        font-size: .74rem
    }

    .pmd-status-pill {
        font-size: .73rem
    }

    .pmd-scoreboard-main {
        grid-template-columns: minmax(0,1fr) 90px minmax(0,1fr);
        gap: 4px;
        min-height: 160px;
        padding: 20px 10px
    }

    .pmd-team-logo {
        width: 46px;
        height: 46px
    }

    .pmd-team-name {
        font-size: .91rem
    }

    .pmd-main-score {
        font-size: 1.7rem
    }

    .pmd-scoreboard-facts {
        grid-template-columns: repeat(2,minmax(0,1fr))
    }

        .pmd-scoreboard-facts > div {
            padding: 11px 7px
        }

        .pmd-scoreboard-facts span {
            font-size: .66rem
        }

        .pmd-scoreboard-facts strong, .pmd-scoreboard-facts a {
            font-size: .75rem
        }

    .pmd-tabs {
        padding: 5px
    }

    .pmd-tab {
        min-width: 94px;
        padding: 10px 8px;
        font-size: .8rem;
        gap: 5px
    }

    .pmd-panel {
        padding: 17px 14px;
        border-radius: 14px
    }

    .pmd-overview-facts, .pmd-team-form-grid {
        grid-template-columns: 1fr;
        gap: 16px
    }

    .pmd-venue-facts {
        grid-template-columns: repeat(2,minmax(0,1fr));
        row-gap: 15px
    }

    .pmd-overview-heading {
        margin-top: 20px;
        flex-wrap: wrap
    }

    .pmd-form-row {
        grid-template-columns: 27px minmax(0,1fr) 56px 86px
    }

        .pmd-form-row small {
            grid-column: auto;
            text-align: left
        }

    .pmd-formations-bar {
        grid-template-columns: 1fr;
        gap: 8px;
        text-align: center
    }

        .pmd-formations-bar > div:last-child {
            text-align: center
        }

    .pmd-coach-columns, .pmd-lineup-columns, .pmd-staff-columns {
        grid-template-columns: 1fr;
        gap: 22px
    }

    .pmd-football-pitch {
        min-height: 400px
    }

    .pmd-event-summary {
        grid-template-columns: repeat(2,minmax(0,1fr))
    }

    .pmd-referee-list-row {
        grid-template-columns: 24px 35px minmax(0,1fr) minmax(0,1fr);
        gap: 7px
    }

    .pmd-referee-role, .pmd-referee-meta {
        grid-column: 3 / -1
    }

    .pmd-profile-chevron {
        display: none
    }

    .pmd-event-item {
        grid-template-columns: 62px 26px minmax(0,1fr);
        gap: 8px
    }
}

@media(max-width:400px) {
    .pmd-scoreboard-facts {
        grid-template-columns: repeat(2,minmax(0,1fr))
    }

    .pmd-form-row {
        grid-template-columns: 26px minmax(0,1fr) 44px;
        gap: 6px
    }

        .pmd-form-row small {
            grid-column: 2/-1;
            text-align: right
        }

    .pmd-main-score {
        font-size: 1.5rem
    }

    .pmd-venue-facts {
        grid-template-columns: 1fr
    }
}
