/* Football Match Center — front-end styles
   Scoreboard-inspired design. RTL-safe (logical properties). */

.fmc-page {
    max-width: 920px;
    margin-inline: auto;
    padding: 16px;
    font-feature-settings: "tnum" 1; /* tabular numerals for scores */
}

.fmc-muted { color: #6b7280; font-size: .9em; }
.fmc-empty { padding: 14px 16px; background: #f3f4f6; border-radius: 8px; color: #374151; }
.fmc-block-title { margin: 0 0 10px; font-size: 1.05rem; letter-spacing: .02em; text-transform: uppercase; }
.fmc-section { margin-block: 28px; }

/* ------------------------------------------------------------------ */
/* Scoreboard header                                                    */
/* ------------------------------------------------------------------ */

.fmc-scoreboard {
    background: linear-gradient(160deg, #0c1f17 0%, #123524 60%, #0c1f17 100%);
    color: #f5f7f4;
    border-radius: 14px;
    padding: 22px 18px;
    text-align: center;
}

.fmc-scoreboard-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 14px;
    font-size: .82rem;
    color: #9fc2ab;
    margin-bottom: 16px;
}

.fmc-scoreboard-meta a { color: #d3f9d8; text-decoration: none; }

.fmc-scoreboard-main {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
}

.fmc-sb-team img { display: block; margin-inline: auto; }
.fmc-sb-team h2 { margin: 8px 0 0; font-size: 1.05rem; color: #fff; }

.fmc-sb-numbers {
    display: block;
    font-size: 2.6rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: .04em;
}

.fmc-sb-numbers i { font-style: normal; color: #6ee7a8; padding-inline: 6px; }
.fmc-sb-vs { color: #6ee7a8; }
.fmc-sb-status { display: block; margin-top: 6px; font-size: .8rem; color: #9fc2ab; }
.fmc-scoreboard.is-live .fmc-sb-status { color: #ff6b6b; font-weight: 700; }
.fmc-referee { margin: 14px 0 0; font-size: .8rem; color: #9fc2ab; }

/* ------------------------------------------------------------------ */
/* Match lists                                                          */
/* ------------------------------------------------------------------ */

.fmc-match-list { list-style: none; margin: 0; padding: 0; border: 1px solid #e5e7eb; border-radius: 12px; overflow: hidden; }
.fmc-match-row + .fmc-match-row { border-top: 1px solid #e5e7eb; }

.fmc-match-link {
    display: grid;
    grid-template-columns: 1fr 92px 1fr;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    text-decoration: none;
    color: inherit;
    background: #fff;
    transition: background .15s ease;
}

.fmc-match-link:hover { background: #f0fdf4; }
.fmc-match-row.is-live .fmc-match-link { background: #fff7ed; }

.fmc-side { display: flex; align-items: center; gap: 8px; min-width: 0; }
.fmc-home { justify-content: flex-end; text-align: end; }
.fmc-away { justify-content: flex-start; }
.fmc-team-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }

.fmc-center { text-align: center; }
.fmc-score { display: block; font-weight: 800; font-size: 1.05rem; }
.fmc-score i { font-style: normal; color: #16a34a; padding-inline: 3px; }
.fmc-time { display: block; font-weight: 700; }
.fmc-status { display: block; font-size: .72rem; color: #6b7280; }
.fmc-match-row.is-live .fmc-status { color: #dc2626; font-weight: 700; }

/* ------------------------------------------------------------------ */
/* Standings table                                                      */
/* ------------------------------------------------------------------ */

.fmc-table-wrap { overflow-x: auto; }

.fmc-standings { width: 100%; border-collapse: collapse; font-size: .92rem; }
.fmc-standings th, .fmc-standings td { padding: 9px 10px; text-align: center; border-bottom: 1px solid #e5e7eb; }
.fmc-standings thead th { background: #123524; color: #fff; font-weight: 600; }
.fmc-standings .fmc-col-team { text-align: start; }
.fmc-standings .fmc-col-team img { vertical-align: middle; margin-inline-end: 8px; }
.fmc-standings .fmc-col-pts { font-weight: 800; }
.fmc-standings tbody tr:nth-child(-n+3) .fmc-col-rank { color: #16a34a; font-weight: 800; }
.fmc-standings tbody tr:hover { background: #f9fafb; }

/* ------------------------------------------------------------------ */
/* Events                                                               */
/* ------------------------------------------------------------------ */

.fmc-event-list { list-style: none; margin: 0; padding: 0; }
.fmc-event { display: flex; align-items: center; gap: 10px; padding: 9px 6px; border-bottom: 1px dashed #e5e7eb; }
.fmc-event-min { min-width: 38px; font-weight: 800; color: #123524; }
.fmc-event-body em { display: block; font-style: normal; font-size: .8rem; color: #6b7280; }

/* ------------------------------------------------------------------ */
/* Lineups                                                              */
/* ------------------------------------------------------------------ */

.fmc-lineup-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.fmc-lineup h4 { display: flex; justify-content: space-between; align-items: center; }
.fmc-formation { font-size: .8rem; background: #123524; color: #fff; border-radius: 999px; padding: 2px 10px; }
.fmc-xi { list-style: none; margin: 0; padding: 0; }
.fmc-xi li { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px dotted #e5e7eb; }
.fmc-shirt {
    display: inline-flex; align-items: center; justify-content: center;
    width: 24px; height: 24px; border-radius: 50%;
    background: #f0fdf4; color: #123524; font-size: .75rem; font-weight: 800;
}
.fmc-subs summary { cursor: pointer; margin-top: 8px; font-weight: 600; }
.fmc-subs ul { margin: 6px 0 0; padding-inline-start: 18px; color: #4b5563; }

/* ------------------------------------------------------------------ */
/* Statistics bars                                                      */
/* ------------------------------------------------------------------ */

.fmc-stat-list { list-style: none; margin: 0; padding: 0; }
.fmc-stat {
    display: grid;
    grid-template-columns: 48px 1fr 48px;
    grid-template-areas: "hv type av" "hv bars av";
    align-items: center;
    gap: 2px 10px;
    padding: 8px 0;
}
.fmc-stat .fmc-stat-val:first-child { grid-area: hv; text-align: end; font-weight: 800; }
.fmc-stat .fmc-stat-val:last-child { grid-area: av; font-weight: 800; }
.fmc-stat-type { grid-area: type; text-align: center; font-size: .78rem; color: #6b7280; }
.fmc-stat-bars { grid-area: bars; display: flex; height: 7px; border-radius: 4px; overflow: hidden; background: #f3f4f6; }
.fmc-bar-home { background: #16a34a; }
.fmc-bar-away { background: #0ea5e9; }

/* ------------------------------------------------------------------ */
/* Team / league hero, cards, scorers                                   */
/* ------------------------------------------------------------------ */

.fmc-team-hero { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.fmc-team-hero h1 { margin: 0; }
.fmc-team-rank { margin-inline-start: auto; text-align: center; }
.fmc-rank-num { display: block; font-size: 1.8rem; font-weight: 800; color: #16a34a; }

.fmc-cards-front { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.fmc-cards-front .fmc-card {
    background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 10px;
    padding: 12px; text-align: center;
}
.fmc-cards-front .fmc-card-num { display: block; font-size: 1.4rem; font-weight: 800; color: #123524; }

.fmc-two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }

.fmc-scorers { list-style: none; margin: 0; padding: 0; counter-reset: scorer; }
.fmc-scorers li {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 4px; border-bottom: 1px solid #f3f4f6; counter-increment: scorer;
}
.fmc-scorers li::before { content: counter(scorer); min-width: 22px; font-weight: 800; color: #16a34a; }
.fmc-scorers img { border-radius: 50%; }
.fmc-scorer-goals { margin-inline-start: auto; font-weight: 700; }

.fmc-team-widget { border: 1px solid #e5e7eb; border-radius: 12px; padding: 14px; }
.fmc-team-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.fmc-team-head strong { display: block; }

/* ------------------------------------------------------------------ */
/* Responsive                                                           */
/* ------------------------------------------------------------------ */

@media (max-width: 600px) {
    .fmc-sb-numbers { font-size: 2rem; }
    .fmc-sb-team img { width: 52px; height: 52px; }
    .fmc-sb-team h2 { font-size: .9rem; }
    .fmc-match-link { grid-template-columns: 1fr 72px 1fr; padding: 10px; font-size: .88rem; }
    .fmc-standings { font-size: .82rem; }
}

@media (prefers-reduced-motion: reduce) {
    .fmc-match-link { transition: none; }
}
