/* ==========================================================================
   FIFA WC 2026 – Frontend Styles
   ========================================================================== */

/* ── CSS Custom Properties ──────────────────────────────────────────────── */
.fwc {
    --fwc-primary:      #1a3d6e;
    --fwc-accent:       #d4a017;
    --fwc-green:        #1a6632;
    --fwc-text:         #1a202c;
    --fwc-text-muted:   #64748b;
    --fwc-border:       #e2e8f0;
    --fwc-bg:           #fff;
    --fwc-bg-alt:       #f8fafc;
    --fwc-radius:       8px;
    --fwc-shadow:       0 2px 8px rgba(0,0,0,.08);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--fwc-text);
    box-sizing: border-box;
}
.fwc *, .fwc *::before, .fwc *::after { box-sizing: inherit; }

/* ── Schedule ────────────────────────────────────────────────────────────── */
.fwc-schedule-wrap {
    border-radius: var(--fwc-radius);
    overflow: hidden;
    box-shadow: var(--fwc-shadow);
    background: var(--fwc-bg);
}

.fwc-schedule-header {
    background: linear-gradient(135deg, #1a2744 0%, #0d1b2a 100%);
    color: #fff;
    padding: 24px 20px 20px;
    text-align: center;
}
.fwc-tournament-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 6px;
}
.fwc-schedule-title {
    margin: 0 0 6px;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: .03em;
}
.fwc-tournament-sub { margin: 0; font-size: 13px; color: #94a3b8; }

/* ── Filter section ─────────────────────────────────────────────────────── */
.fwc-filter-section {
    background: var(--fwc-bg-alt);
    border-bottom: 1px solid var(--fwc-border);
    padding: 14px 16px 10px;
}
.fwc-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin-bottom: 8px;
}
.fwc-filter-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--fwc-text-muted);
    min-width: 46px;
}
.fwc-filter-btn {
    padding: 5px 12px;
    border-radius: 6px;
    border: 1px solid var(--fwc-border);
    background: var(--fwc-bg);
    color: var(--fwc-text-muted);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
    white-space: nowrap;
}
.fwc-filter-btn:hover    { background: var(--fwc-primary); color: #fff; border-color: var(--fwc-primary); }
.fwc-filter-btn.is-active { background: var(--fwc-primary); color: #fff; border-color: var(--fwc-primary); }

/* ── Dropdown filter bar ──────────────────────────────────────────────────── */
.fwc-filter-dropdowns {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    align-items: flex-end;
}
.fwc-filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.fwc-filter-group .fwc-filter-label {
    min-width: unset;
}
.fwc-filter-select {
    padding: 7px 10px;
    border: 1px solid var(--fwc-border);
    border-radius: 6px;
    background: var(--fwc-bg);
    color: var(--fwc-text);
    font-size: 13px;
    cursor: pointer;
    min-width: 130px;
    appearance: auto;
}
.fwc-filter-select:focus { outline: 2px solid var(--fwc-primary); outline-offset: 1px; }
.fwc-filter-group--search { flex: 1; min-width: 180px; }
.fwc-filter-group--search .fwc-search-input { width: 100%; margin: 0; }
.fwc-filter-group--count {
    justify-content: flex-end;
    padding-bottom: 7px;
}

/* ── Team link ────────────────────────────────────────────────────────────── */
a.fwc-team-link, .fwc-team-link {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}
a.fwc-team-link:hover { text-decoration: underline; color: var(--fwc-primary); }
a.fwc-stn-team-name.fwc-team-link { font-weight: 600; }

.fwc-search-row { display: flex; align-items: center; gap: 12px; margin-top: 4px; }
.fwc-search-input {
    padding: 8px 14px;
    border: 1px solid var(--fwc-border);
    border-radius: 6px;
    font-size: 13px;
    width: 100%;
    max-width: 340px;
    outline: none;
    transition: border-color .15s;
}
.fwc-search-input:focus { border-color: var(--fwc-primary); }
.fwc-match-count { font-size: 12px; color: var(--fwc-text-muted); white-space: nowrap; }

/* ── Schedule Table ─────────────────────────────────────────────────────── */
.fwc-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.fwc-schedule-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
}
.fwc-schedule-table thead th {
    background: var(--fwc-bg-alt);
    border-bottom: 2px solid var(--fwc-border);
    padding: 10px 12px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--fwc-text-muted);
    white-space: nowrap;
    text-align: left;
}
.fwc-schedule-table tbody tr { transition: background .1s; }
.fwc-schedule-table tbody tr:nth-child(even) { background: var(--fwc-bg-alt); }
.fwc-schedule-table tbody tr:hover { background: #eef4ff; }
.fwc-schedule-table tbody td {
    padding: 9px 12px;
    border-bottom: 1px solid var(--fwc-border);
    vertical-align: middle;
}
.fwc-match-row.fwc-final-row td { background: rgba(212,160,23,.06); border-left: 3px solid var(--fwc-accent); }
.fwc-match-row.fwc-live-row  td { background: rgba(220,38,38,.05); }

.fwc-match-num  { font-weight: 700; color: var(--fwc-text-muted); font-size: 11px; white-space: nowrap; }
.fwc-date-cell  { white-space: nowrap; font-weight: 600; }
.fwc-day        { color: var(--fwc-text-muted); margin-right: 4px; font-size: 11px; }
.fwc-time-cell  { white-space: nowrap; color: var(--fwc-text-muted); font-size: 12px; }

.fwc-team-cell  { white-space: nowrap; display: flex; align-items: center; gap: 7px; }
.fwc-flag-emoji { font-size: 20px; line-height: 1; flex-shrink: 0; }
.fwc-team-name  { font-weight: 600; }
.fwc-team-name.fwc-placeholder { color: var(--fwc-text-muted); font-style: italic; }

.fwc-score-col  { text-align: center; }
.fwc-score      { display: inline-block; padding: 3px 10px; border-radius: 4px; font-weight: 700; font-size: 14px; white-space: nowrap; }
.fwc-score-done     { background: #f1f5f9; }
.fwc-score-live     { background: #fee2e2; color: #dc2626; }
.fwc-score-upcoming { color: var(--fwc-text-muted); font-weight: 400; font-size: 12px; }
.fwc-live-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #dc2626; margin-left: 5px; animation: fwc-blink 1s infinite; }
@keyframes fwc-blink { 0%,100%{opacity:1} 50%{opacity:0} }

.fwc-venue-cell { color: var(--fwc-text-muted); font-size: 12px; max-width: 220px; }
.fwc-venue-icon { margin-right: 4px; opacity: .6; }

.fwc-no-results { padding: 40px; text-align: center; color: var(--fwc-text-muted); font-size: 14px; }

/* ── Badges ─────────────────────────────────────────────────────────────── */
.fwc-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 5px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #fff;
    white-space: nowrap;
}
.fwc-stage-group    { background: #1a6632; }
.fwc-stage-r32      { background: #1a3d6e; }
.fwc-stage-r16      { background: #5b2d8e; }
.fwc-stage-qf       { background: #8e4b10; }
.fwc-stage-sf       { background: #8e1035; }
.fwc-stage-3rd      { background: #4b5563; }
.fwc-stage-final    { background: #b8860b; }
.fwc-stage-league   { background: #0a3d62; }
.fwc-stage-mw       { background: #0a3d62; }
.fwc-stage-friendly { background: #2d6a4f; }

/* ── Standings ───────────────────────────────────────────────────────────── */
.fwc-standings-wrap {
    background: var(--fwc-bg);
    border-radius: var(--fwc-radius);
    box-shadow: var(--fwc-shadow);
    overflow: hidden;
    margin-bottom: 24px;
}
.fwc-standings-header {
    background: var(--fwc-bg-alt);
    border-bottom: 1px solid var(--fwc-border);
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}
.fwc-standings-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--fwc-text-muted);
}
.fwc-standings-group { font-size: 15px; font-weight: 700; color: var(--fwc-primary); }

.fwc-standings-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.fwc-standings-table thead th {
    padding: 8px 12px;
    border-bottom: 1px solid var(--fwc-border);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--fwc-text-muted);
    text-align: center;
    white-space: nowrap;
}
.fwc-standings-table thead th.fwc-col-team { text-align: left; }
.fwc-standings-table tbody tr { border-bottom: 1px solid var(--fwc-border); transition: background .1s; }
.fwc-standings-table tbody tr:last-child { border-bottom: none; }
.fwc-standings-table tbody tr:hover { background: var(--fwc-bg-alt); }

/* Qualifier highlight (top 2) */
.fwc-standings-table .fwc-row-qualify td:first-child { border-left: 3px solid var(--fwc-green); }

/* ── Standings Zone row colors ───────────────────────────────────────────── */
.fwc-standings-table tr.fcm-zone-qualify            td { background: #d4edda; }
.fwc-standings-table tr.fcm-zone-qualify-playoff    td { background: #cce5ff; }
.fwc-standings-table tr.fcm-zone-relegation-playoff td { background: #fff3cd; }
.fwc-standings-table tr.fcm-zone-relegation         td { background: #f8d7da; }

/* ── Standings Zone Legend ───────────────────────────────────────────────── */
.fcm-standings-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    margin-top: 12px;
    padding: 10px 14px;
    background: #fafafa;
    border: 1px solid var(--fwc-border);
    border-radius: 6px;
    font-size: 12px;
    color: #555;
}
.fcm-legend-item { display: flex; align-items: center; gap: 7px; }
.fcm-legend-swatch {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 3px;
    border: 1px solid rgba(0,0,0,.15);
    flex-shrink: 0;
}
.fcm-legend-swatch.fcm-zone-qualify            { background: #d4edda; }
.fcm-legend-swatch.fcm-zone-qualify-playoff    { background: #cce5ff; }
.fcm-legend-swatch.fcm-zone-relegation-playoff { background: #fff3cd; }
.fcm-legend-swatch.fcm-zone-relegation         { background: #f8d7da; }

.fwc-col-pos  { width: 52px; padding: 10px 8px; text-align: center; position: relative; }
.fwc-pos-num  { font-weight: 700; }
.fwc-team-color-bar { display: none; } /* decorative – shown on hover if needed */
.fwc-col-team { padding: 10px 12px; }
.fwc-col-stat { padding: 10px 8px; text-align: center; width: 38px; }
.fwc-col-pts  { padding: 10px 12px; text-align: center; width: 44px; }
.fwc-stn-team-name { margin-left: 6px; font-weight: 600; }

/* ── Match Detail ────────────────────────────────────────────────────────── */
.fwc-match-detail {
    background: var(--fwc-bg);
    border-radius: var(--fwc-radius);
    box-shadow: var(--fwc-shadow);
    overflow: hidden;
    padding-bottom: 24px;
}
.fwc-match-meta {
    background: var(--fwc-bg-alt);
    border-bottom: 1px solid var(--fwc-border);
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.fwc-match-datetime { font-size: 13px; color: var(--fwc-text-muted); }
.fwc-live-badge { background: #dc2626; color: #fff; padding: 2px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; animation: fwc-blink 1s infinite; }

.fwc-scoreboard {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 32px 20px 24px;
    background: linear-gradient(135deg,#1a2744,#0d1b2a);
    color: #fff;
}
.fwc-sb-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
    max-width: 180px;
    text-align: center;
}
.fwc-sb-flag { font-size: 52px; line-height: 1; }
.fwc-sb-name { font-size: 16px; font-weight: 700; }
.fwc-sb-score { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.fwc-sb-goals { font-size: 52px; font-weight: 800; line-height: 1; }
.fwc-sb-separator { font-size: 32px; color: rgba(255,255,255,.4); }
.fwc-sb-upcoming { font-size: 28px; color: rgba(255,255,255,.5); }

.fwc-match-venue { text-align: center; padding: 12px 20px; font-size: 13px; color: var(--fwc-text-muted); border-bottom: 1px solid var(--fwc-border); }

/* Stats bars */
.fwc-match-stats { padding: 20px 24px; }
.fwc-stats-heading { font-size: 15px; font-weight: 700; margin: 0 0 16px; text-align: center; color: var(--fwc-primary); }
.fwc-stat-row { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.fwc-stat-val { width: 36px; text-align: center; font-size: 13px; font-weight: 700; flex-shrink: 0; }
.fwc-stat-left  { text-align: right; }
.fwc-stat-right { text-align: left; }
.fwc-stat-bars  { flex: 1; display: flex; align-items: center; gap: 6px; }
.fwc-bar-wrap   { flex: 1; height: 8px; background: var(--fwc-border); border-radius: 4px; overflow: hidden; }
.fwc-bar-left   { display: flex; justify-content: flex-end; }
.fwc-bar        { height: 100%; border-radius: 4px; min-width: 4px; transition: width .4s ease; }
.fwc-stat-name  { font-size: 11px; color: var(--fwc-text-muted); text-align: center; white-space: nowrap; min-width: 100px; }

/* ── Groups Grid ─────────────────────────────────────────────────────────── */
.fwc-groups-grid {
    display: grid;
    grid-template-columns: repeat( auto-fill, minmax(220px, 1fr) );
    gap: 16px;
}
.fwc-group-card {
    background: var(--fwc-bg);
    border-radius: var(--fwc-radius);
    box-shadow: var(--fwc-shadow);
    overflow: hidden;
}
.fwc-group-card-header {
    background: var(--fwc-primary);
    color: #fff;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.fwc-group-letter { font-size: 22px; font-weight: 800; }
.fwc-group-title  { font-size: 13px; font-weight: 700; }
.fwc-group-team-list { list-style: none; margin: 0; padding: 8px 0; }
.fwc-group-team-item {
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    border-bottom: 1px solid var(--fwc-border);
    transition: background .1s;
}
.fwc-group-team-item:last-child { border-bottom: none; }
.fwc-group-team-item:hover { background: var(--fwc-bg-alt); }
.fwc-group-team-item .fwc-flag-emoji { font-size: 22px; }
.fwc-group-team-name { font-weight: 600; }

/* ── Teams Grid ──────────────────────────────────────────────────────────── */
.fwc-teams-grid {
    display: grid;
    grid-template-columns: repeat( auto-fill, minmax(140px, 1fr) );
    gap: 12px;
}
.fwc-team-card {
    background: var(--fwc-bg);
    border-radius: var(--fwc-radius);
    box-shadow: var(--fwc-shadow);
    padding: 16px 12px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    border-top: 4px solid var(--color, #888);
    transition: transform .15s, box-shadow .15s;
}
.fwc-team-card:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,.12); }
.fwc-team-card-flag  { font-size: 36px; line-height: 1; }
.fwc-team-card-name  { font-size: 13px; font-weight: 700; }
.fwc-team-card-group { font-size: 11px; color: var(--fwc-text-muted); font-weight: 600; }

/* ==========================================================================
   Knockout Bracket  [fwc_bracket]
   Full LTR + RTL support.
   ========================================================================== */

/* Outer wrapper — no overflow so the absolutely-positioned SVG is never
   clipped by this element.
   direction:ltr forces the bracket to always flow left→right, even inside
   an RTL document.  Text content inside cards inherits correctly because
   .fcm-bk-team uses unicode-bidi:isolate (see below).                    */
.fcm-bk-wrap {
	font-size: 13px;
	padding-bottom: 24px;
	direction: ltr;
}

/* Scroll shell: wraps column headers + stage so they scroll as one unit.
   overflow-x:auto only clips its direct child area, not absolute children
   of inner elements — the SVG sits inside .fcm-bk-stage which is inside
   this scroller, so SVG is scrolled together with the cards.             */
.fcm-bk-scroll {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

/* ── Column header row ───────────────────────────────────────────────────────
   Each label must be exactly as wide as one column slot (card + gap) so
   headers stay aligned above their cards.
   Column slot width = card(220px) + gap(40px) = 260px, last col = 220px.
   We give every label 260px and let the final one be overridden below.   */
.fcm-bk-labels {
	display: flex;
	min-width: max-content;
	margin-bottom: 8px;
}
/* Label is as wide as one full column slot (card + gap). */
.fcm-bk-label {
	flex: 0 0 260px;
	text-align: center;
	padding: 0 40px 4px 0; /* mirror .fcm-bk-col padding */
	box-sizing: border-box;
}
/* Last label has no gap padding, matching .fcm-bk-col--final. */
.fcm-bk-label:last-child {
	flex: 0 0 220px;
	padding-right: 0;
}

/* ── Stage ──────────────────────────────────────────────────────────────────
   position:relative  → SVG coordinate origin: (0,0) = stage top-left.
   min-width:max-content → stage grows to fit all columns even inside the
                           overflow-x:auto scroll shell.                   */
.fcm-bk-stage {
	position: relative;
	min-width: max-content;
}

/* ── SVG overlay ────────────────────────────────────────────────────────────
   position:absolute + top/left:0 → origin at stage top-left.
   overflow:visible → line end-caps at stage edges still paint.
   z-index:0 → below .fcm-bk-columns (which appear later in DOM), so
               cards remain on top and stay interactive.
   Resized to stage.scrollWidth × stage.scrollHeight by JS after load.    */
.fcm-bk-svg {
	position: absolute;
	top: 0;
	left: 0;
	pointer-events: none;
	overflow: visible;
	z-index: 0;
	width: 0;
	height: 0;
}

/* ── Column grid ─────────────────────────────────────────────────────────────
   CRITICAL: NO `position` property.
   Any `position` value would create an intermediate stacking/containing
   context that offsets getBoundingClientRect() measurements.
   Without position, .fcm-bk-stage is the direct reference for card
   coordinate calculation in JS.

   The bracket always flows left→right (.fcm-bk-wrap sets direction:ltr),
   so column 0 (earliest round) is always on the physical left.          */
.fcm-bk-columns {
	display: flex;
	align-items: stretch;
}

/* ── Columns ─────────────────────────────────────────────────────────────────
   Card width: 220px.
   Right-side gap (LTR): STUB(20px) + visual gap(20px) = 40px.
   The JS draws stubs STUB px beyond the card's right edge; this padding
   ensures the stub + vertical bar land in the gap, not over the next card. */
.fcm-bk-col {
	display: flex;
	flex-direction: column;
	justify-content: space-around;
	align-self: stretch;
	flex: 0 0 220px;
	/* LTR: gap is on the right (toward the next column) */
	padding: 0 40px 0 0;
}
/* Final column has no outgoing connector, so no gap needed. */
.fcm-bk-col--final {
	padding-right: 0;
}

/* ── Items & entries ─────────────────────────────────────────────────────────
   .fcm-bk-item — each item takes equal flex height inside its column.
   .fcm-bk-item--pair   — first-column only: two cards, pushed to top + bottom
                          so their vertical midpoint = this item's centre Y.
                          The next-column card is centred in a flex:1 item of
                          the same height → cy = midpoint of the pair ✓
   .fcm-bk-item--single — one card, centred inside its flex slot.             */
.fcm-bk-item {
	display: flex;
	flex-direction: column;
	flex: 1;
	justify-content: center;
	/* Minimum height keeps cards readable even on shallow brackets. */
	min-height: 100px;
}
.fcm-bk-item--pair   { justify-content: space-between; }
.fcm-bk-item--single { justify-content: center; }

/* Vertical padding on each entry gives breathing room between the stub lines
   of adjacent pairs so they don't visually merge with each other.          */
.fcm-bk-entry { padding: 10px 0; }

/* ── Match Card ──────────────────────────────────────────────────────────────*/
.fcm-bk-card {
	background: var(--fwc-bg, #fff);
	border: 1px solid var(--fwc-border, #dde3ec);
	border-radius: 8px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
	overflow: hidden;
	width: 100%;
	transition: box-shadow .15s ease;
}
.fcm-bk-card:hover     { box-shadow: 0 2px 8px rgba(0, 0, 0, .12); }
.fcm-bk-card--done     { border-color: #c8d2e0; }
.fcm-bk-card--featured {
	border: 2px solid var(--fwc-accent, #1a56db);
	box-shadow: 0 2px 12px rgba(26, 86, 219, .15);
}

/* Card header: date + result label */
.fcm-bk-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 4px 10px;
	background: var(--fwc-bg-alt, #f5f7fb);
	border-bottom: 1px solid var(--fwc-border, #dde3ec);
	gap: 4px;
}
.fcm-bk-date {
	font-size: 11px;
	font-weight: 600;
	color: var(--fwc-text-muted, #6b7280);
}
.fcm-bk-ft {
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: var(--fwc-text-muted, #6b7280);
}
.fcm-bk-ft--pens { color: #c05621; }
.fcm-bk-ft--live {
	color: #dc2626;
	animation: fcm-pulse 1.2s ease-in-out infinite;
}
@keyframes fcm-pulse {
	0%, 100% { opacity: 1; }
	50%       { opacity: .3; }
}

/* Team row
   unicode-bidi:isolate lets Arabic/Hebrew team names display with their
   natural text direction even though .fcm-bk-wrap forces direction:ltr. */
.fcm-bk-team {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 5px 10px;
	min-height: 30px;
	border-bottom: 1px solid var(--fwc-border, #dde3ec);
	font-size: 12px;
	font-weight: 600;
	color: var(--fwc-text, #111827);
	unicode-bidi: isolate;
}
.fcm-bk-team:last-child { border-bottom: none; }
.fcm-bk-team--winner    { background: #f0faf4; color: #166534; }
.fcm-bk-team--loser     { opacity: .5; }

/* Winner arrow: ◀ (points toward next round in LTR) */
.fcm-bk-winner-arrow {
	color: #16a34a;
	font-size: 9px;
	flex-shrink: 0;
}
.fcm-bk-flag {
	font-size: 16px;
	flex-shrink: 0;
	line-height: 1;
}
.fcm-bk-name,
a.fcm-bk-name {
	flex: 1;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	color: inherit;
	text-decoration: none;
}
a.fcm-bk-name:hover { text-decoration: underline; }

/* Score pushed to the right end of the flex row */
.fcm-bk-score {
	margin-left: auto;
	display: flex;
	align-items: baseline;
	gap: 3px;
	flex-shrink: 0;
}
.fcm-bk-score strong { font-size: 13px; min-width: 14px; text-align: end; }
.fcm-bk-pens {
	font-style: normal;
	font-size: 10px;
	font-weight: 400;
	color: var(--fwc-text-muted, #6b7280);
}

/* ── Third-place play-off ────────────────────────────────────────────────────*/
.fcm-bk-playoff {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	margin-top: 24px;
	padding-top: 16px;
	border-top: 1px dashed var(--fwc-border, #dde3ec);
}
.fcm-bk-playoff-card { max-width: 220px; }

/* Legacy selector kept for backward-compat with old shortcodes */
.fwc-bracket-wrap { display: none; }





/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
    .fwc-schedule-table thead th:nth-child(2),
    .fwc-schedule-table tbody td:nth-child(2),
    .fwc-schedule-table thead th:nth-child(4),
    .fwc-schedule-table tbody td:nth-child(4) { display: none; }

    .fwc-sb-flag  { font-size: 36px; }
    .fwc-sb-name  { font-size: 13px; }
    .fwc-sb-goals { font-size: 36px; }

    .fwc-stat-name { min-width: 70px; font-size: 10px; }
    .fwc-groups-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 420px) {
    .fwc-groups-grid { grid-template-columns: 1fr; }
    .fwc-teams-grid  { grid-template-columns: repeat(2,1fr); }
}

/* =========================================================================
   Squad
   ========================================================================= */
.fwc-squad-wrap { font-family: inherit; }
.fwc-squad-header { display:flex; align-items:center; gap:14px; padding:16px 20px; background:#f8f9fa; border-radius:8px; margin-bottom:20px; }
.fwc-squad-flag   { font-size:36px; line-height:1; }
.fwc-squad-name   { margin:0; font-size:20px; font-weight:700; }
.fwc-squad-comp   { font-size:13px; color:#888; }
.fwc-squad-pos-heading { font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:.07em; color:#888; margin:20px 0 10px; border-bottom:2px solid #eee; padding-bottom:6px; }
.fwc-squad-section { margin-bottom:24px; }
.fwc-squad-grid   { display:grid; grid-template-columns:repeat(auto-fill, minmax(160px, 1fr)); gap:12px; }

.fwc-player-card  { background:#fff; border:1px solid #e5e7eb; border-radius:10px; overflow:hidden; transition:box-shadow .15s, transform .15s; }
.fwc-player-card:hover { box-shadow:0 4px 16px rgba(0,0,0,.1); transform:translateY(-2px); }

.fwc-player-photo-wrap { position:relative; height:100px; display:flex; align-items:center; justify-content:center; }
.fwc-player-photo  { width:80px; height:80px; border-radius:50%; object-fit:cover; border:3px solid #fff; box-shadow:0 2px 8px rgba(0,0,0,.15); }
.fwc-player-avatar { font-size:40px; opacity:.4; }
.fwc-player-number { position:absolute; bottom:6px; right:10px; background:#1a6fcf; color:#fff; font-size:11px; font-weight:700; width:22px; height:22px; border-radius:50%; display:flex; align-items:center; justify-content:center; }
.fwc-captain-badge { position:absolute; top:6px; right:10px; color:gold; font-weight:900; font-size:14px; text-shadow:0 0 4px rgba(0,0,0,.3); }

.fwc-player-info   { padding:10px 12px; display:flex; flex-direction:column; gap:2px; }
.fwc-player-name   { font-weight:700; font-size:13px; line-height:1.3; }
.fwc-player-nat, .fwc-player-dob, .fwc-player-height { font-size:11px; color:#888; }
.fwc-player-pos    { display:inline-block; padding:2px 7px; border-radius:10px; font-size:10px; font-weight:700; margin-top:2px; width:fit-content; }
.fwc-pos-gk  { background:#fef3c7; color:#92400e; }
.fwc-pos-def { background:#dbeafe; color:#1e3a8a; }
.fwc-pos-mid { background:#d1fae5; color:#065f46; }
.fwc-pos-fwd { background:#fee2e2; color:#991b1b; }

/* =========================================================================
   Top Scorers
   ========================================================================= */
.fwc-scorers-wrap   { font-family:inherit; }
.fwc-scorers-header { display:flex; justify-content:space-between; align-items:center; padding:12px 16px; background:#1a1a2e; color:#fff; border-radius:8px 8px 0 0; }
.fwc-scorers-title  { font-size:16px; font-weight:700; }
.fwc-scorers-comp   { font-size:12px; opacity:.7; }

.fwc-scorers-table  { width:100%; border-collapse:collapse; background:#fff; border:1px solid #e5e7eb; border-top:none; border-radius:0 0 8px 8px; overflow:hidden; font-size:13px; }
.fwc-scorers-table thead tr { background:#f8f9fa; }
.fwc-scorers-table th { padding:10px 14px; text-align:left; font-size:11px; font-weight:700; text-transform:uppercase; color:#888; border-bottom:2px solid #e5e7eb; }
.fwc-scorers-table td { padding:10px 14px; border-bottom:1px solid #f3f4f6; vertical-align:middle; }
.fwc-sc-row:last-child td { border-bottom:none; }
.fwc-sc-leader { background:#fffbeb; }
.fwc-sc-rank  { width:40px; font-weight:700; color:#888; }
.fwc-sc-num   { width:50px; text-align:center; }
.fwc-sc-goals { color:#dc2626; }
.fwc-sc-muted { color:#aaa; font-size:11px; }

.fwc-sc-player     { display:flex; align-items:center; gap:10px; }
.fwc-sc-photo      { width:36px; height:36px; border-radius:50%; object-fit:cover; flex-shrink:0; }
.fwc-sc-avatar     { width:36px; height:36px; border-radius:50%; display:flex; align-items:center; justify-content:center; color:#fff; font-weight:700; font-size:12px; flex-shrink:0; }
.fwc-sc-player-info { display:flex; flex-direction:column; }
.fwc-sc-pos        { font-size:10px; color:#aaa; }
.fwc-sc-team       { white-space:nowrap; }

/* ── Penalty shootout display ───────────────────────────────────────────── */
.fcm-pens {
	display: block;
	font-size: 11px;
	font-weight: 400;
	color: #888;
	letter-spacing: 0.02em;
	margin-top: 2px;
}
.fwc-score .fcm-pens {
	display: inline;
	font-size: 11px;
	margin-left: 4px;
}
.fwc-sb-pens {
	display: block;
	text-align: center;
	font-size: 13px;
	color: #888;
	margin-top: 4px;
	font-weight: 400;
}

/* ── Result Badges (W / D / L) ────────────────────────────────────────────── */
.fwc-result-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px; height: 24px;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
}
.fwc-result-w { background: var(--fwc-green, #1a7a4a); }
.fwc-result-d { background: #888; }
.fwc-result-l { background: var(--fwc-red, #e53e3e); }

/* ── Team History Page ─────────────────────────────────────────────────────── */
.fwc-team-history { font-family: var(--fwc-font, inherit); }

.fwc-th-hero {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 0 16px;
    border-bottom: 2px solid var(--fwc-border);
    margin-bottom: 24px;
}
.fwc-th-flag { font-size: 52px; line-height: 1; }
.fwc-th-name { font-size: 22px; font-weight: 700; margin: 0 0 4px; }
.fwc-th-group {
    font-size: 12px;
    font-weight: 600;
    color: var(--fwc-text-muted);
    text-transform: uppercase;
    letter-spacing: .06em;
}

.fwc-th-comp-block { margin-bottom: 32px; }
.fwc-th-comp-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--fwc-border);
}
.fwc-th-comp-name { font-size: 16px; font-weight: 700; }
.fwc-th-season {
    margin-left: auto;
    font-size: 13px;
    font-weight: 600;
    color: var(--fwc-text-muted);
    border: 1px solid var(--fwc-border);
    border-radius: 4px;
    padding: 2px 8px;
}

.fwc-th-table .fwc-team-cell a.fwc-team-link {
    font-weight: 600;
    color: var(--fwc-primary, #1a56db);
}

/* ==========================================================================
   v3.0 — Scoreboard, Calendar, Playoff standings, Cup zones
   ========================================================================== */

/* ── Scoreboard card ─────────────────────────────────────────────────────── */
.fwc-scoreboard-wrap { max-width: 720px; margin: 0 auto; }

.fwc-sb-card {
	position: relative;
	border-radius: 12px;
	overflow: hidden;
	background: var(--sb-bg-fallback, #0d1b2a)
	            var(--sb-bg) center / cover no-repeat;
	color: #fff;
	min-height: 340px;
	display: flex;
	flex-direction: column;
}
.fwc-sb-card[data-has-bg="0"] {
	background: linear-gradient(135deg, #0d1b2a 0%, #1a3352 60%, #0d1b2a 100%);
}

.fwc-sb-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0,0,0,.58);
	border-radius: inherit;
}
.fwc-sb-card > *:not(.fwc-sb-overlay) { position: relative; z-index: 1; }

/* Header */
.fwc-sb-header {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	padding: 14px 20px 10px;
	border-bottom: 1px solid rgba(255,255,255,.12);
	text-align: center;
}
.fwc-sb-comp-info {
	font-size: 12px;
	opacity: .85;
	letter-spacing: .03em;
	text-transform: uppercase;
}
.fwc-sb-sep { margin: 0 6px; opacity: .5; }
.fwc-sb-datetime { font-size: 13px; font-weight: 600; }

/* Teams row */
.fwc-sb-teams-row {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	padding: 22px 24px 14px;
	gap: 12px;
}
.fwc-sb-team {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	flex: 1;
	min-width: 0;
}
.fwc-sb-team-name {
	font-size: 18px;
	font-weight: 800;
	text-align: center;
	text-shadow: 0 1px 4px rgba(0,0,0,.6);
	word-break: break-word;
}
.fwc-sb-coach {
	font-size: 11px;
	opacity: .7;
	text-align: center;
}
.fwc-sb-shirt {
	width: 56px;
	height: 56px;
	filter: drop-shadow(0 2px 6px rgba(0,0,0,.5));
}
.fwc-sb-away .fwc-sb-shirt { order: -1; }

/* Score centre */
.fwc-sb-score-centre {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	flex: 0 0 auto;
	padding: 0 12px;
}
.fwc-sb-score-main {
	display: flex;
	align-items: center;
	gap: 10px;
}
.fwc-sb-s1, .fwc-sb-s2 {
	font-size: 52px;
	font-weight: 900;
	line-height: 1;
	text-shadow: 0 2px 10px rgba(0,0,0,.7);
}
.fwc-sb-colon {
	font-size: 44px;
	font-weight: 900;
	opacity: .7;
}
.fwc-sb-score-upcoming {
	font-size: 36px;
	font-weight: 800;
	opacity: .6;
}
.fwc-sb-pens-note { font-size: 12px; opacity: .75; }

/* Status badges */
.fwc-sb-status-badge {
	display: inline-block;
	padding: 4px 14px;
	border-radius: 4px;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: .08em;
	text-transform: uppercase;
}
.fwc-sb-ft            { background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.3); }
.fwc-sb-live          { background: #e53935; animation: fcm-pulse 1.4s infinite; }
.fwc-sb-upcoming-badge { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); }
@keyframes fcm-pulse {
	0%,100% { opacity:1; }  50% { opacity:.65; }
}

/* Goalscorers */
.fwc-sb-scorers-row {
	display: flex;
	justify-content: space-between;
	padding: 0 24px 12px;
	gap: 16px;
}
.fwc-sb-scorers {
	display: flex;
	flex-direction: column;
	gap: 3px;
	flex: 1;
}
.fwc-sb-scorers-away { align-items: flex-end; text-align: right; }
.fwc-sb-scorer { font-size: 12px; opacity: .88; }

/* Half-time footer */
.fwc-sb-footer {
	text-align: center;
	padding: 8px 20px 14px;
	font-size: 12px;
	opacity: .7;
	letter-spacing: .03em;
	border-top: 1px solid rgba(255,255,255,.08);
}

/* Meta row (venue + referee) */
.fwc-sb-meta-row {
	display: flex;
	gap: 20px;
	flex-wrap: wrap;
	padding: 10px 4px;
	font-size: 13px;
	color: #555;
}
.fwc-sb-meta-item { display: flex; align-items: center; gap: 5px; }

/* ── Match statistics (shared with match-detail) ─────────────────────────── */
.fwc-match-stats    { margin-top: 20px; }
.fwc-stats-heading  { font-size: 15px; font-weight: 700; margin: 0 0 12px; }
.fwc-stat-row       { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.fwc-stat-val       { font-size: 13px; font-weight: 700; min-width: 28px; }
.fwc-stat-left      { text-align: right; }
.fwc-stat-right     { text-align: left; }
.fwc-stat-bars      { flex: 1; display: flex; align-items: center; gap: 6px; }
.fwc-bar-wrap       { flex: 1; height: 6px; background: #e9ecef; border-radius: 3px; overflow: hidden; }
.fwc-bar-left       { display: flex; justify-content: flex-end; }
.fwc-bar-right      { display: flex; justify-content: flex-start; }
.fwc-bar            { height: 100%; border-radius: 3px; transition: width .4s; }
.fwc-stat-name      { font-size: 11px; white-space: nowrap; color: #666; min-width: 110px; text-align: center; }

/* ── Match Calendar ──────────────────────────────────────────────────────── */
.fwc-calendar-wrap {
	max-width: 420px;
	margin: 0 auto;
	font-family: inherit;
}
.fwc-cal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 16px;
	background: var(--fwc-bg-alt, #f5f7fb);
	border-radius: 10px 10px 0 0;
	border: 1px solid var(--fwc-border, #dde3ec);
	border-bottom: none;
}
.fwc-cal-title { font-size: 16px; }
.fwc-cal-title strong { font-weight: 700; }
.fwc-cal-year { color: #666; margin-left: 6px; }
.fwc-cal-nav {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 6px;
	font-size: 22px;
	line-height: 1;
	color: var(--fwc-primary, #1a56db);
	text-decoration: none;
	transition: background .15s;
}
.fwc-cal-nav:hover { background: rgba(26,86,219,.08); }

.fwc-cal-table {
	width: 100%;
	border-collapse: collapse;
	border: 1px solid var(--fwc-border, #dde3ec);
	border-radius: 0 0 0 0;
}
.fwc-cal-table thead th {
	padding: 8px 0;
	text-align: center;
	font-size: 11px;
	font-weight: 700;
	color: #666;
	background: var(--fwc-bg-alt, #f5f7fb);
	border-bottom: 1px solid var(--fwc-border, #dde3ec);
}
.fwc-cal-cell {
	position: relative;
	text-align: center;
	padding: 6px 4px;
	font-size: 13px;
	border: 1px solid transparent;
	min-width: 42px;
	height: 50px;
	vertical-align: top;
}
.fwc-cal-empty { background: #fafbfc; color: #bbb; }
.fwc-cal-next-month { color: #ccc; }
.fwc-cal-today .fwc-cal-day-num {
	background: var(--fwc-primary, #1a56db);
	color: #fff;
	border-radius: 50%;
	width: 24px;
	height: 24px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.fwc-cal-selected { background: #e8f0fe; }
.fwc-cal-has-match { background: #f0f7f0; }
.fwc-cal-has-match:hover { background: #dff0df; }

.fwc-cal-day-link {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
	text-decoration: none;
	color: inherit;
}
.fwc-cal-day-num {
	font-weight: 600;
	font-size: 13px;
}
.fwc-cal-ball { font-size: 12px; line-height: 1; }

/* Day match panel */
.fwc-cal-day-panel {
	border: 1px solid var(--fwc-border, #dde3ec);
	border-top: none;
	border-radius: 0 0 10px 10px;
	padding: 12px 14px;
	background: var(--fwc-bg, #fff);
}
.fwc-cal-time-group { margin-bottom: 14px; }
.fwc-cal-time-group:last-child { margin-bottom: 0; }
.fwc-cal-time {
	display: block;
	font-size: 12px;
	font-weight: 700;
	color: #555;
	margin-bottom: 8px;
}
.fwc-cal-match-row {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 12px;
	border-radius: 8px;
	background: var(--fwc-bg-alt, #f5f7fb);
	margin-bottom: 6px;
	border: 1px solid var(--fwc-border, #dde3ec);
}
.fwc-cal-match-live { border-color: #e53935; background: #fff5f5; }
.fwc-cal-team {
	display: flex;
	align-items: center;
	gap: 5px;
	flex: 1;
	font-size: 13px;
	font-weight: 600;
	min-width: 0;
}
.fwc-cal-team-home { justify-content: flex-end; text-align: right; }
.fwc-cal-team-away { justify-content: flex-start; }
.fwc-cal-flag { font-size: 16px; }
.fwc-cal-score-box {
	display: flex;
	align-items: center;
	gap: 3px;
	flex: 0 0 auto;
}
.fwc-cal-score {
	min-width: 26px;
	height: 28px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 15px;
	font-weight: 800;
	border: 1.5px solid var(--fwc-border, #dde3ec);
	border-radius: 4px;
	background: #fff;
}
.fwc-cal-score-sep {
	width: 6px;
	height: 2px;
	background: #bbb;
	border-radius: 1px;
}
.fwc-cal-score-vs { font-size: 13px; font-weight: 600; color: #999; border: none; background: none; }

/* ── Qualification Play-off table ────────────────────────────────────────── */
/* ── Qualification Play-off Ranking table ───────────────────────────────── */

/* Wrapper */
.fwc-po-wrap {
	margin-top: 32px;
	border-radius: 10px;
	overflow: hidden;
	border: 2px solid #2e86c1;
	box-shadow: 0 2px 12px rgba(46,134,193,.12);
}

/* Header bar */
.fwc-po-header {
	background: linear-gradient(90deg, #1a5276 0%, #2471a3 100%);
	padding: 13px 18px;
	display: flex;
	align-items: center;
}
.fwc-po-title {
	color: #fff;
	font-size: 15px;
	font-weight: 700;
	letter-spacing: .02em;
	text-transform: uppercase;
}
.fwc-po-title::before {
	content: '🔵 ';
}

/* Tiebreaker legend */
.fwc-po-legend {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 10px 16px;
	background: #f0f6fc;
	border-bottom: 1px solid #d0e8f8;
	flex-wrap: wrap;
}
.fwc-po-legend-label {
	font-size: 11px;
	font-weight: 700;
	color: #555;
	white-space: nowrap;
	padding-top: 3px;
}
.fwc-po-criteria-list {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	list-style: none;
	margin: 0;
	padding: 0;
	counter-reset: crit-counter;
}
.fwc-po-criteria-list li {
	counter-increment: crit-counter;
	display: flex;
	align-items: center;
	gap: 4px;
}
.fwc-po-criteria-list li::before {
	content: counter(crit-counter) '.';
	font-size: 10px;
	color: #888;
	font-weight: 700;
}

/* Criterion pills — shared between legend and table rows */
.fwc-po-crit-pill {
	display: inline-block;
	padding: 2px 9px;
	border-radius: 20px;
	font-size: 11px;
	font-weight: 700;
	white-space: nowrap;
	letter-spacing: .01em;
}
.fwc-po-crit-pts     { background: #d1ecf1; color: #0c5460; }
.fwc-po-crit-gd      { background: #d4edda; color: #155724; }
.fwc-po-crit-gf      { background: #cce5ff; color: #004085; }
.fwc-po-crit-conduct { background: #fff3cd; color: #856404; }
.fwc-po-crit-manual  { background: #f3d9fa; color: #6a0dad; }
.fwc-po-crit-alpha   { background: #e2e3e5; color: #383d41; }

/* Table wrapper — horizontal scroll on mobile */
.fwc-po-table-wrap { overflow-x: auto; }

/* The table itself */
.fwc-po-table {
	width: 100%;
	border-collapse: collapse;
	background: #fff;
}
.fwc-po-table thead th {
	padding: 8px 10px;
	text-align: center;
	font-size: 11px;
	font-weight: 700;
	color: #fff;
	background: #1f618d;
	border-right: 1px solid rgba(255,255,255,.1);
	white-space: nowrap;
}
.fwc-po-table thead th.fwc-po-th-team { text-align: left; min-width: 140px; }
.fwc-po-table thead th.fwc-po-th-pts  { background: #154360; }
.fwc-po-table thead th.fwc-po-th-conduct { background: #784212; }
.fwc-po-table thead th.fwc-po-th-sep  { background: #1a252f; min-width: 120px; text-align: left; padding-left: 10px; }

/* Rows */
.fwc-po-row {
	background: #eaf4fc;
	border-bottom: 1px solid #c8e3f5;
	transition: background .12s;
}
.fwc-po-row:last-child { border-bottom: none; }
.fwc-po-row:hover { background: #d6eaf8; }

.fwc-po-pos {
	text-align: center;
	padding: 10px 8px;
	width: 42px;
	white-space: nowrap;
}
.fwc-po-pos-num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: #2e86c1;
	color: #fff;
	font-size: 12px;
	font-weight: 800;
}
.fwc-po-color-bar {
	display: inline-block;
	width: 4px;
	height: 16px;
	border-radius: 2px;
	margin-left: 4px;
	vertical-align: middle;
}

.fwc-po-team {
	padding: 10px 12px 10px 8px;
	text-align: left;
	display: flex;
	align-items: center;
	gap: 8px;
}
.fwc-po-flag  { font-size: 20px; flex-shrink: 0; }
.fwc-po-team-inner { display: flex; flex-direction: column; gap: 2px; }
.fwc-po-name  { font-size: 14px; font-weight: 700; color: inherit; text-decoration: none; }
a.fwc-po-name:hover { text-decoration: underline; color: #1a56db; }
.fwc-po-manual-note {
	font-size: 11px;
	color: #6a0dad;
	font-style: italic;
}

.fwc-po-stat {
	text-align: center;
	padding: 10px 6px;
	font-size: 13px;
	color: #333;
}
.fwc-po-grp      { font-weight: 700; color: #1a5276; }
.fwc-po-gd       { font-weight: 600; }
.fwc-po-pts {
	text-align: center;
	padding: 10px 8px;
	font-size: 15px;
	font-weight: 900;
	color: #154360;
	background: rgba(44,130,201,.08);
}

/* Conduct score cell */
.fwc-po-conduct {
	font-size: 13px;
	font-weight: 700;
	padding: 8px 6px;
	min-width: 60px;
}
.fwc-po-conduct-neg   { color: #c0392b; }
.fwc-po-conduct-pos   { color: #1e8449; }
.fwc-po-conduct-cards {
	display: block;
	font-size: 10px;
	font-weight: 400;
	color: #888;
	margin-top: 1px;
}

/* Criterion column */
.fwc-po-sep-cell {
	padding: 10px 10px;
	text-align: left;
	min-width: 120px;
}

/* Carry-over from old code */
.fcm-manual-rem { color: #888; font-size: 11px; }


/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 500px) {
	.fwc-sb-teams-row { padding: 14px 12px 10px; }
	.fwc-sb-s1, .fwc-sb-s2 { font-size: 38px; }
	.fwc-sb-team-name { font-size: 14px; }
	.fwc-sb-shirt { width: 44px; height: 44px; }
	.fwc-cal-match-row { flex-wrap: wrap; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   TEAM PROFILE PAGE  (v3.1)
   ═══════════════════════════════════════════════════════════════════════════ */

.fwc-tp-wrap {
	font-family: inherit;
	color: #222;
	max-width: 1040px;
	margin: 0 auto;
}

/* ── Header ─────────────────────────────────────────────────────────────── */
.fwc-tp-header {
	display: flex;
	align-items: flex-start;
	gap: 20px;
	padding: 24px 24px 20px;
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 10px 10px 0 0;
	flex-wrap: wrap;
}
.fwc-tp-logo-wrap {
	flex-shrink: 0;
	width: 80px;
	display: flex;
	align-items: center;
	justify-content: center;
}
.fwc-tp-logo {
	width: 80px;
	height: 80px;
	object-fit: contain;
}
.fwc-tp-logo-emoji {
	font-size: 64px;
	line-height: 1;
}
.fwc-tp-info {
	flex: 1;
	min-width: 180px;
}
.fwc-tp-team-name {
	font-size: 22px;
	font-weight: 900;
	margin: 0 0 10px;
	text-transform: uppercase;
	letter-spacing: .03em;
	color: #111;
}
.fwc-tp-meta {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 4px 14px;
	margin: 0;
	font-size: 13px;
}
.fwc-tp-meta dt { color: #888; font-weight: 600; }
.fwc-tp-meta dd { margin: 0; color: #333; }
.fwc-tp-flag { font-size: 16px; margin-right: 4px; }
.fwc-tp-venue-link { color: #2271b1; text-decoration: none; }
.fwc-tp-venue-link:hover { text-decoration: underline; }

/* ── Calendar widget ─────────────────────────────────────────────────────── */
.fwc-tp-cal-widget {
	flex-shrink: 0;
	width: 230px;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	overflow: hidden;
	font-size: 12px;
}
.fwc-tp-cal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 8px 12px;
	background: #f5f5f5;
	border-bottom: 1px solid #e0e0e0;
	font-size: 13px;
}
.fwc-tp-cal-year { color: #888; margin-left: 4px; }
.fwc-tp-cal-nav {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px; height: 22px;
	border-radius: 50%;
	background: #e0e0e0;
	color: #333;
	text-decoration: none;
	font-size: 16px;
	line-height: 1;
}
.fwc-tp-cal-nav:hover { background: #2271b1; color: #fff; }
.fwc-tp-cal-table {
	width: 100%;
	border-collapse: collapse;
}
.fwc-tp-cal-table thead th {
	text-align: center;
	padding: 4px 2px;
	font-size: 10px;
	color: #888;
	font-weight: 700;
	background: #fafafa;
	border-bottom: 1px solid #eee;
}
.fwc-tp-cal-day {
	text-align: center;
	padding: 3px 1px;
	vertical-align: middle;
	font-size: 11px;
	color: #444;
}
.fwc-tp-cal-empty { background: #fafafa; }
.fwc-tp-cal-today > span, .fwc-tp-cal-today .fwc-tp-cal-link span:first-child {
	display: inline-flex; align-items: center; justify-content: center;
	width: 20px; height: 20px; border-radius: 50%;
	background: #2271b1; color: #fff; font-weight: 700;
}
.fwc-tp-cal-sel { background: #e8f0fe; }
.fwc-tp-cal-has { cursor: pointer; }
.fwc-tp-cal-link {
	display: flex; flex-direction: column; align-items: center;
	gap: 1px; text-decoration: none; color: inherit;
}
.fwc-tp-cal-ball { font-size: 9px; line-height: 1; }

/* ── Stats section ───────────────────────────────────────────────────────── */
.fwc-tp-stats-section {
	border: 1px solid #e0e0e0;
	border-top: none;
	background: #fff;
}
.fwc-tp-wdl-row { border-bottom: 1px solid #f0f0f0; }
.fwc-tp-wdl-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
}
.fwc-tp-wdl-table thead th {
	padding: 8px 12px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .05em;
	color: #fff;
	background: #1a252f;
	text-align: center;
}
.fwc-tp-wdl-table thead th:first-child { text-align: left; background: #2c3e50; }
.fwc-tp-wdl-table tbody td {
	padding: 8px 12px;
	border-bottom: 1px solid #f5f5f5;
	font-size: 13px;
}
.fwc-tp-wdl-table tbody tr:last-child td { border-bottom: none; }
.fwc-tp-stat-label { color: #444; }
.fwc-tp-stat-val { text-align: center; font-weight: 600; color: #222; }
.fwc-tp-stat-all { background: rgba(44,113,177,.06); font-weight: 700; }

.fwc-tp-stat-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 12px;
}
.fwc-tp-stat-table thead th {
	padding: 6px 10px;
	text-align: center;
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: #666;
	background: #f5f5f5;
	border-bottom: 1px solid #e0e0e0;
}
.fwc-tp-sth-label { text-align: left !important; }
.fwc-tp-sth-sub th { background: #efefef; font-size: 10px; }
.fwc-tp-stat-table tbody tr { border-bottom: 1px solid #f5f5f5; }
.fwc-tp-stat-table tbody tr:last-child { border-bottom: none; }
.fwc-tp-stat-table td {
	padding: 7px 10px;
	text-align: center;
}
.fwc-tp-stat-label { text-align: left !important; color: #444; }
.fwc-tp-stat-pm { color: #888; font-size: 12px; }
.fwc-tp-stat-tot { font-weight: 700; color: #222; }
.fwc-tp-stat-all { background: rgba(44,113,177,.05); }

/* ── Tabs ────────────────────────────────────────────────────────────────── */
.fwc-tp-tabs {
	border: 1px solid #e0e0e0;
	border-top: none;
	background: #fff;
	border-radius: 0 0 10px 10px;
}
.fwc-tp-tab-nav {
	display: flex;
	border-bottom: 2px solid #e0e0e0;
	background: #f9f9f9;
}
.fwc-tp-tab-btn {
	padding: 12px 20px;
	font-size: 13px;
	font-weight: 700;
	color: #555;
	background: none;
	border: none;
	border-bottom: 2px solid transparent;
	margin-bottom: -2px;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 6px;
	transition: color .12s, border-color .12s;
}
.fwc-tp-tab-btn:hover { color: #2271b1; }
.fwc-tp-tab-active { color: #2271b1 !important; border-bottom-color: #2271b1 !important; }
.fwc-tp-tab-count {
	background: #e0e0e0;
	color: #555;
	border-radius: 10px;
	padding: 0 6px;
	font-size: 10px;
	font-weight: 700;
}
.fwc-tp-tab-active .fwc-tp-tab-count { background: #d0e8fe; color: #2271b1; }
.fwc-tp-tab-panel { padding: 16px 20px; }
.fwc-tp-tab-hidden { display: none !important; }

/* ── Competition block ───────────────────────────────────────────────────── */
.fwc-tp-comp-block { margin-bottom: 24px; }
.fwc-tp-comp-heading {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 0 6px;
	border-bottom: 2px solid #e0e0e0;
	margin-bottom: 8px;
	font-size: 13px;
	font-weight: 700;
	color: #444;
}
.fwc-tp-comp-logo { width: 20px; height: 20px; object-fit: contain; }
.fwc-tp-season {
	margin-left: auto;
	font-size: 11px;
	font-weight: 400;
	color: #888;
	background: #f0f0f0;
	padding: 2px 8px;
	border-radius: 10px;
}

/* ── Result rows ─────────────────────────────────────────────────────────── */
.fwc-tp-result-row {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 4px;
	border-bottom: 1px solid #f5f5f5;
	font-size: 13px;
}
.fwc-tp-result-row:last-child { border-bottom: none; }
.fwc-tp-result-date {
	min-width: 120px;
	color: #888;
	font-size: 11px;
	flex-shrink: 0;
}
.fwc-tp-result-teams {
	flex: 1;
	display: flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
}
.fwc-tp-rt {
	display: flex;
	align-items: center;
	gap: 6px;
	flex: 1;
}
.fwc-tp-rt-home { justify-content: flex-end; text-align: right; }
.fwc-tp-rt-away { justify-content: flex-start; text-align: left; }
.fwc-tp-rt-focus { font-weight: 700; color: #111; }
.fwc-tp-rt-flag { font-size: 16px; }
.fwc-tp-rt-logo { width: 20px; height: 20px; object-fit: contain; }
.fwc-tp-result-score {
	display: flex;
	align-items: center;
	gap: 2px;
	flex-shrink: 0;
}
.fwc-tp-score-box {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px; height: 28px;
	background: #222;
	color: #fff;
	font-size: 14px;
	font-weight: 800;
	border-radius: 4px;
}
.fwc-tp-score-box.fwc-tp-score-upcoming { background: #e0e0e0; color: #888; font-size: 12px; }
.fwc-tp-score-sep {
	display: inline-block;
	width: 4px; height: 4px;
	border-radius: 50%;
	background: #888;
	margin: 0 2px;
}
.fwc-tp-result-badge {
	min-width: 26px;
	height: 26px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 4px;
	font-size: 12px;
	font-weight: 800;
	flex-shrink: 0;
}
.fwc-tp-res-w { background: #d4edda; color: #155724; }
.fwc-tp-res-d { background: #e2e8f0; color: #444; }
.fwc-tp-res-l { background: #f8d7da; color: #721c24; }

/* ── Squad / Staff grid ──────────────────────────────────────────────────── */
.fwc-tp-pos-heading {
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .06em;
	color: #666;
	margin: 20px 0 10px;
	padding-bottom: 4px;
	border-bottom: 1px solid #e0e0e0;
}
.fwc-tp-squad-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
	gap: 12px;
	margin-bottom: 8px;
}
.fwc-tp-player-card {
	border: 1px solid #e8e8e8;
	border-radius: 8px;
	overflow: hidden;
	background: #fff;
	text-align: center;
	transition: box-shadow .12s;
}
.fwc-tp-player-card:hover { box-shadow: 0 2px 10px rgba(0,0,0,.1); }
.fwc-tp-player-photo-wrap {
	position: relative;
	background: #f0f0f0;
	height: 90px;
	display: flex;
	align-items: flex-end;
	justify-content: center;
}
.fwc-tp-player-photo {
	width: 100%;
	height: 90px;
	object-fit: cover;
}
.fwc-tp-player-no-photo {
	font-size: 40px;
	line-height: 90px;
	color: #bbb;
}
.fwc-tp-player-number {
	position: absolute;
	bottom: 4px;
	left: 6px;
	background: rgba(0,0,0,.55);
	color: #fff;
	font-size: 11px;
	font-weight: 800;
	border-radius: 3px;
	padding: 1px 4px;
	line-height: 1.4;
}
.fwc-tp-player-info {
	padding: 7px 6px 8px;
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.fwc-tp-player-name {
	font-size: 12px;
	font-weight: 700;
	line-height: 1.3;
	color: #111;
}
.fwc-tp-captain { color: goldenrod; font-size: 12px; }
.fwc-tp-player-nat { font-size: 11px; color: #888; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
	.fwc-tp-header { flex-direction: column; gap: 14px; }
	.fwc-tp-cal-widget { width: 100%; }
	.fwc-tp-result-date { min-width: 80px; font-size: 10px; }
	.fwc-tp-tab-btn { padding: 10px 12px; font-size: 12px; }
}
