﻿/* =========================================================
   GEDIAN SPORTS - COMPACT PUBLIC MATCHES

   Same public family as ShowPlayers / ShowClubs:
   compact strip -> compact Search -> result line -> cards
   ========================================================= */

.public-matches-page {
    --sm-green: #5B8C3B;
    --sm-green-dark: #41672e;
    --sm-green-soft: #eef5e9;
    --sm-navy: #17293d;
    --sm-text: #2a3748;
    --sm-muted: #78838f;
    --sm-border: #e2e7e1;
    --sm-bg: #f6f8f4;
    --sm-live: #c63e3e;
    --sm-live-soft: #fff0f0;
    --sm-problem: #9b711d;
    --sm-problem-soft: #fff6df;
    min-height: 100vh;
    padding: 12px 0 60px;
    background: linear-gradient( 180deg, #fbfcfa 0%, var(--sm-bg) 100%);
    color: var(--sm-text);
    font-family: "Tajawal",sans-serif;
}

    .public-matches-page .container {
        max-width: 1440px;
    }


/* =========================================================
   Tiny information strip
   ========================================================= */

.match-follow-strip {
    min-height: 52px;
    padding: 8px 13px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border: 1px solid #dae7d2;
    border-radius: 11px;
    background: linear-gradient( 90deg, #f1f7ed, #ffffff);
    box-shadow: 0 4px 15px rgba(15,23,42,.025);
}

    .match-follow-strip > div {
        min-width: 0;
        display: flex;
        align-items: center;
        gap: 7px;
    }

.match-follow-icon {
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--sm-green);
    font-size: .8rem;
}

.match-follow-strip strong {
    color: var(--sm-navy);
    font-size: .72rem;
    font-weight: 900;
}

.match-follow-strip > div > span:last-child {
    color: var(--sm-muted);
    font-size: .62rem;
}

.match-follow-strip > a {
    flex: 0 0 auto;
    min-height: 30px;
    padding: 5px 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 8px;
    background: var(--sm-green);
    color: #fff;
    text-decoration: none;
    font-size: .62rem;
    font-weight: 900;
}

    .match-follow-strip > a:hover {
        color: #fff;
        background: var(--sm-green-dark);
    }


/* =========================================================
   Compact Search
   ========================================================= */

.matches-search-bar {
    margin-top: 8px;
    padding: 7px;
    border: 1px solid rgba(15,23,42,.065);
    border-radius: 11px;
    background: #fff;
    box-shadow: 0 4px 15px rgba(15,23,42,.025);
}

.matches-search-form {
    display: grid;
    grid-template-columns: minmax(215px,1.35fr) minmax(125px,.62fr) minmax(165px,.82fr) minmax(125px,.62fr) minmax(135px,.66fr) 72px auto;
    align-items: center;
    gap: 6px;
}

.match-search-control {
    min-width: 0;
}

    .match-search-control select,
    .match-search-control > input,
    .match-search-text-control {
        width: 100%;
        height: 38px;
        border: 1px solid #dfe4e8;
        border-radius: 8px;
        background: #fff;
    }

    .match-search-control select,
    .match-search-control > input {
        padding-inline: 9px;
        color: #4a5665;
        outline: none;
        font-family: inherit;
        font-size: .62rem;
    }

        .match-search-control select:focus,
        .match-search-control > input:focus,
        .match-search-text-control:focus-within {
            border-color: rgba(91,140,59,.58);
            box-shadow: 0 0 0 3px rgba(91,140,59,.075);
        }

.match-search-text-control {
    padding-inline: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

    .match-search-text-control > span {
        flex: 0 0 auto;
        opacity: .55;
        font-size: .72rem;
    }

    .match-search-text-control input {
        min-width: 0;
        width: 100%;
        height: 36px;
        border: 0;
        outline: 0;
        background: transparent;
        color: var(--sm-text);
        font-family: inherit;
        font-size: .66rem;
    }

        .match-search-text-control input::placeholder {
            color: #a1a9b1;
        }

.matches-search-button {
    height: 38px;
    border: 0;
    border-radius: 8px;
    background: var(--sm-green);
    color: #fff;
    font-family: inherit;
    font-size: .66rem;
    font-weight: 900;
    cursor: pointer;
}

    .matches-search-button:hover {
        background: var(--sm-green-dark);
    }

.matches-search-reset {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border: 1px solid #e0e5e8;
    border-radius: 50%;
    background: #fafbfb;
    color: #7c8792;
    text-decoration: none;
    font-size: 1rem;
    line-height: 1;
}

    .matches-search-reset:hover {
        border-color: #ccd9c4;
        background: var(--sm-green-soft);
        color: var(--sm-green-dark);
    }


/* =========================================================
   Result context
   ========================================================= */

.matches-result-line {
    min-height: 33px;
    margin: 5px 2px 7px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #7e8994;
    font-size: .58rem;
}

    .matches-result-line > div {
        min-width: 0;
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 5px;
    }

    .matches-result-line strong {
        color: var(--sm-green-dark);
        font-size: .68rem;
    }

    .matches-result-line i {
        color: #c3c8cd;
        font-style: normal;
    }

    .matches-result-line small {
        color: #a07d25;
        font-size: .53rem;
    }


/* =========================================================
   Messages
   ========================================================= */

.matches-message {
    min-height: 170px;
    padding: 25px;
    display: grid;
    place-items: center;
    align-content: center;
    border: 1px solid var(--sm-border);
    border-radius: 13px;
    background: #fff;
    text-align: center;
}

    .matches-message > span {
        margin-bottom: 4px;
        font-size: 1.6rem;
    }

    .matches-message > strong {
        color: var(--sm-navy);
        font-size: .85rem;
    }

    .matches-message > p {
        margin: 4px 0 9px;
        color: var(--sm-muted);
        font-size: .64rem;
    }

    .matches-message > a {
        color: var(--sm-green-dark);
        font-size: .62rem;
        font-weight: 900;
    }

    .matches-message.is-error {
        min-height: auto;
        border-color: #efcccc;
        background: #fff8f8;
        color: #aa3838;
        font-size: .66rem;
    }


/* =========================================================
   Match cards
   ========================================================= */

.matches-grid {
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 10px;
}

.public-match-card {
    min-width: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 10px;
    border: 1px solid var(--sm-border);
    border-top: 3px solid #a6b1aa;
    border-radius: 12px;
    background: #fff;
    color: var(--sm-text);
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(15,23,42,.025);
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

    .public-match-card:hover {
        color: var(--sm-text);
        border-color: rgba(91,140,59,.45);
        box-shadow: 0 10px 24px rgba(54,77,41,.08);
        transform: translateY(-2px);
    }

    .public-match-card.is-live {
        border-top-color: var(--sm-live);
    }

    .public-match-card.is-finished {
        border-top-color: #7e8a84;
    }

    .public-match-card.is-problem {
        border-top-color: #bc8b27;
    }

    .public-match-card.is-scheduled {
        border-top-color: var(--sm-green);
    }

    .public-match-card.is-featured {
        background: linear-gradient( 180deg, #fff, #fbfdf9);
    }


/* Top */

.public-match-card-top {
    min-height: 27px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 5px;
}

.public-match-card-badges {
    display: flex;
    min-width: 0;
    flex-wrap: wrap;
    gap: 3px;
}

    .public-match-card-badges > span {
        display: inline-flex;
        min-height: 19px;
        align-items: center;
        gap: 3px;
        padding: 2px 5px;
        border-radius: 999px;
        font-size: .27rem;
        font-weight: 900;
        white-space: nowrap;
    }

.match-status {
    background: #eef2ed;
    color: #647169;
}

    .match-status.is-live {
        background: var(--sm-live-soft);
        color: var(--sm-live);
    }

        .match-status.is-live i {
            width: 5px;
            height: 5px;
            border-radius: 50%;
            background: currentColor;
            animation: public-match-live-pulse 1.35s infinite;
        }

    .match-status.is-finished {
        background: #eef1ef;
        color: #68746e;
    }

    .match-status.is-problem {
        background: var(--sm-problem-soft);
        color: var(--sm-problem);
    }

    .match-status.is-scheduled {
        background: var(--sm-green-soft);
        color: var(--sm-green-dark);
    }

.match-sport {
    background: #edf2f7;
    color: #526779;
}

.match-featured {
    background: #fff3c9;
    color: #83681c;
}

.match-verified {
    width: 19px;
    justify-content: center;
    background: var(--sm-green);
    color: #fff;
}

.public-match-code {
    flex: 0 0 auto;
    max-width: 90px;
    overflow: hidden;
    color: #98a1aa;
    font-family: Arial,sans-serif;
    font-size: .27rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}


/* Competition */

.public-match-competition {
    min-height: 45px;
    margin-top: 5px;
    padding: 6px 7px;
    border-radius: 8px;
    background: #f7f9f6;
    text-align: center;
}

    .public-match-competition strong,
    .public-match-competition small {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .public-match-competition strong {
        color: var(--sm-navy);
        font-size: .52rem;
        font-weight: 900;
    }

    .public-match-competition small {
        margin-top: 2px;
        color: #8b9590;
        font-size: .29rem;
    }


/* Scoreboard */

.public-match-scoreboard {
    display: grid;
    grid-template-columns: minmax(0,1fr) 86px minmax(0,1fr);
    gap: 7px;
    align-items: center;
    min-height: 128px;
    padding: 10px 0;
}

.public-match-team {
    min-width: 0;
    display: grid;
    justify-items: center;
    gap: 5px;
    text-align: center;
}

.public-match-team-logo {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    overflow: hidden;
    padding: 4px;
    border: 1px solid #e0e6dd;
    border-radius: 15px;
    background: #fff;
}

    .public-match-team-logo img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

    .public-match-team-logo i {
        width: 100%;
        height: 100%;
        display: grid;
        place-items: center;
        border-radius: 11px;
        background: linear-gradient( 145deg, var(--sm-green-dark), var(--sm-green));
        color: #fff;
        font-style: normal;
        font-size: 1rem;
        font-weight: 900;
    }

.public-match-team > strong {
    width: 100%;
    overflow: hidden;
    color: var(--sm-navy);
    font-size: .53rem;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.public-match-center {
    min-width: 0;
    display: grid;
    justify-items: center;
    align-content: center;
    text-align: center;
}

.public-match-date,
.public-match-live-minute {
    min-height: 18px;
    color: #8d9791;
    font-size: .28rem;
    font-weight: 800;
}

.public-match-live-minute {
    color: var(--sm-live);
}

.public-match-score {
    margin-top: 2px;
    color: var(--sm-navy);
    font-family: Arial,sans-serif;
    font-size: 1rem;
    font-weight: 900;
    direction: ltr;
}

.public-match-card.is-live .public-match-score {
    color: var(--sm-live);
}

.public-match-center small {
    margin-top: 2px;
    color: #999fa4;
    font-size: .25rem;
}

.public-match-penalty {
    color: #7d6950 !important;
    font-weight: 800;
}


/* Optional public title */

.public-match-title {
    margin: 0 1px 7px;
    overflow: hidden;
    color: #68756e;
    font-size: .34rem;
    line-height: 1.5;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}


/* Bottom */

.public-match-card-bottom {
    margin-top: auto;
    padding-top: 8px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 7px;
    border-top: 1px solid #eef1f2;
}

    .public-match-card-bottom > div {
        min-width: 0;
    }

        .public-match-card-bottom > div > span,
        .public-match-card-bottom > div > strong {
            display: block;
        }

        .public-match-card-bottom > div > span {
            color: #9ba3ab;
            font-size: .43rem;
        }

        .public-match-card-bottom > div > strong {
            max-width: 180px;
            margin-top: 1px;
            overflow: hidden;
            color: #59675f;
            font-size: .53rem;
            font-weight: 800;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

    .public-match-card-bottom > b {
        flex: 0 0 auto;
        color: var(--sm-green-dark);
        font-size: .50rem;
    }


/* =========================================================
   Load more
   ========================================================= */

.matches-load-more {
    min-width: 150px;
    min-height: 37px;
    margin: 14px auto 0;
    padding: 6px 13px;
    display: block;
    border: 1px solid #cfdec6;
    border-radius: 9px;
    background: #fff;
    color: var(--sm-green-dark);
    font-family: inherit;
    font-size: .62rem;
    font-weight: 900;
    cursor: pointer;
}

    .matches-load-more:hover {
        background: var(--sm-green-soft);
    }

.js-progressive-item[hidden] {
    display: none !important;
}


/* =========================================================
   Live pulse
   ========================================================= */

@keyframes public-match-live-pulse {

    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: .32;
    }
}


/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 1199px) {

    .matches-search-form {
        grid-template-columns: minmax(205px,1.2fr) minmax(120px,.62fr) minmax(150px,.78fr) minmax(120px,.62fr) minmax(130px,.65fr) 70px auto;
    }

    .matches-grid {
        grid-template-columns: repeat(3,minmax(0,1fr));
    }
}


@media (max-width: 991px) {

    .matches-search-form {
        grid-template-columns: repeat(3,minmax(0,1fr));
    }

    .match-search-text-control {
        grid-column: 1 / -1;
    }

    .matches-search-button {
        min-width: 76px;
    }

    .matches-grid {
        grid-template-columns: repeat(2,minmax(0,1fr));
    }
}


@media (max-width: 767px) {

    .public-matches-page {
        padding-top: 8px;
    }

    .match-follow-strip {
        min-height: 47px;
    }

        .match-follow-strip > div > span:last-child {
            display: none;
        }

    .matches-search-form {
        grid-template-columns: repeat(2,minmax(0,1fr));
    }

    .match-search-text-control {
        grid-column: 1 / -1;
    }

    .matches-search-button {
        width: 100%;
    }

    .matches-search-reset {
        justify-self: start;
    }

    .matches-grid {
        grid-template-columns: repeat(2,minmax(0,1fr));
    }
}


@media (max-width: 575px) {

    .public-matches-page .container {
        padding-inline: 9px;
    }

    .match-follow-strip {
        padding: 6px 8px;
    }

    .match-follow-icon {
        flex-basis: 26px;
        width: 26px;
        height: 26px;
    }

    .match-follow-strip strong {
        font-size: .65rem;
    }

    .match-follow-strip > a {
        min-height: 28px;
        padding-inline: 8px;
        font-size: .57rem;
    }

    .matches-search-bar {
        padding: 6px;
    }

    .matches-search-form {
        gap: 5px;
    }

    .match-search-control select,
    .match-search-control > input,
    .match-search-text-control,
    .matches-search-button {
        height: 36px;
    }

        .match-search-text-control input {
            height: 34px;
        }

    .matches-result-line {
        margin-bottom: 5px;
    }

    .matches-grid {
        grid-template-columns: 1fr;
        gap: 7px;
    }

    .public-match-scoreboard {
        min-height: 118px;
    }

    .public-match-team-logo {
        width: 54px;
        height: 54px;
    }

    .public-match-score {
        font-size: .94rem;
    }
}


@media (max-width: 390px) {

    .matches-search-form {
        grid-template-columns: 1fr;
    }

    .match-search-text-control {
        grid-column: auto;
    }

    .matches-search-reset {
        justify-self: center;
    }
}
