/* ─── Match Card ─────────────────────────────────────────── */
/* Used on: fixtures/index (live + finished matches) */

.match-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 8px 12px;
}

.match-card {
    display: block;
    background: #243347;
    border: 1px solid #1e2d42;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.1s;
    text-decoration: none;
    color: var(--text-primary);
    position: relative;
    overflow: hidden;
}

.match-card:hover { background: #2a3b52; }
.match-card--no-link { cursor: default; }

.match-card--live     { border-left: 3px solid #ef4444; }
.match-card--finished { border-left: 3px solid #374151; }
.match-card--upcoming { border-left: 3px solid #3b82f6; }

/* ─── Body ──────────────────────────────────────────────── */
.match-card__body {
    display: flex;
    flex-direction: column;
    padding: 10px 14px 8px;
    gap: 0;
    overflow: visible;
}

/* ─── Info Bar (row 1): status | time | map ─────────────── */
.match-card__info-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.match-card__status {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .07em;
    border-radius: 3px;
    padding: 2px 6px;
    display: inline-block;
    flex-shrink: 0;
}

.match-card__status--live {
    background: rgba(239,68,68,.15);
    color: #fca5a5;
}

.match-card__status--live-pulse {
    animation: mc-pulse 2s infinite;
}

@keyframes mc-pulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: .6; }
}

.match-card__status--done {
    background: #1e293b;
    color: #475569;
}

.match-card__status--upcoming {
    background: rgba(59,130,246,.15);
    color: #93c5fd;
}

.match-card__status--delayed {
    background: rgba(234,179,8,.15);
    color: #fde68a;
}

.match-card__game-time {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
}

.match-card__game-time--draft {
    font-size: 11px;
    color: var(--color-accent);
    font-weight: 600;
}

.match-card__map {
    font-size: 10px;
    color: var(--text-dim);
    white-space: nowrap;
    text-align: right;
    min-width: 40px;
}

/* ─── Main Row (row 2): BO | teams + kills | series ─────── */
.match-card__main-row {
    display: grid;
    grid-template-columns: 50px 1fr 50px;
    align-items: center;
    gap: 8px;
    padding-top: 28px;
    overflow: visible;
}

.match-card__left-col {
    display: flex;
    align-items: center;
}

.match-card__right-col {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.match-card__bo {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    background: #1e293b;
    padding: 1px 5px;
    border-radius: 3px;
    white-space: nowrap;
}

.match-card__series-score {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    font-family: monospace;
    letter-spacing: .04em;
    white-space: nowrap;
}

/* ─── Teams area ────────────────────────────────────────── */
.match-card__teams {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: visible;
    min-width: 0;
}

.match-card__team {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow: visible;
    min-width: 0;
    flex: 1;
}

.match-card__team--left  { justify-content: flex-end; }
.match-card__team--right { justify-content: flex-start; }

.match-card__team-name {
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 1;
}

.match-card__team-logo {
    width: 28px;
    height: 28px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 2px;
}

.match-card__team-logo--placeholder {
    width: 28px;
    height: 28px;
    background: #1e293b;
    border-radius: 4px;
    flex-shrink: 0;
}

.match-card__logo-wrap {
    position: relative;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.match-card__winner-badge {
    position: absolute;
    bottom: calc(100% + 3px);
    left: 50%;
    transform: translateX(-50%);
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .06em;
    color: #fbbf24;
    text-transform: uppercase;
    line-height: 1;
    white-space: nowrap;
}

/* When draft badge also present — push WIN badge higher */
.match-card__logo-wrap--has-draft .match-card__winner-badge {
    bottom: calc(100% + 21px);
}

/* ─── Score (center of teams area) ─────────────────────── */
.match-card__score {
    flex-shrink: 0;
    text-align: center;
    min-width: 60px;
}

.match-card__kill-score {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
    font-family: monospace;
    letter-spacing: .03em;
    white-space: nowrap;
}

.match-card__game-time--vs {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-dim);
}

/* ─── Draft Badge ───────────────────────────────────────── */
.match-card__draft-badge {
    position: absolute;
    bottom: calc(100% + 3px);
    left: 50%;
    transform: translateX(-50%);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .04em;
    padding: 1px 4px;
    border-radius: 3px;
    line-height: 1.4;
    white-space: nowrap;
}

.match-card__draft-badge--green {
    background: rgba(34,197,94,.15);
    color: #4ade80;
}

.match-card__draft-badge--red {
    background: rgba(239,68,68,.15);
    color: #f87171;
}

/* ─── Footer Row ───────────────────────────────────────── */
.match-card__footer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 14px 7px;
    border-top: 1px solid #1e2d42;
    font-size: 11px;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.match-card__league-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 11px;
    transition: color 0.1s;
}

.match-card__league-link:hover { color: var(--text-primary); }

.match-card__hero-count {
    margin-left: auto;
    font-size: 10px;
    color: var(--text-dim);
    font-family: monospace;
}

.match-card__stream-link {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 11px;
    transition: color 0.1s;
}

.match-card__stream-link:hover { color: var(--text-primary); }

.match-card__stream-icon {
    width: 13px;
    height: 13px;
    fill: currentColor;
    flex-shrink: 0;
}

.match-card__stream-icon--twitch { color: #9146ff; }
.match-card__stream-icon--kick   { color: #53fc18; }

.match-card__stream-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

/* Tier badges in footer */
.match-card__tier {
    font-size: 10px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 3px;
    flex-shrink: 0;
    text-transform: uppercase;
}

.match-card__tier--s { background: rgba(250,204,21,.12); color: #fbbf24; }
.match-card__tier--a { background: rgba(99,102,241,.12);  color: #818cf8; }
.match-card__tier--b { background: rgba(52,211,153,.12);  color: #34d399; }
.match-card__tier--c { background: rgba(148,163,184,.12); color: #94a3b8; }
.match-card__tier--d { background: rgba(100,116,139,.12); color: #64748b; }

/* ─── Tablet ≤ 900px ───────────────────────────────────── */
@media (max-width: 900px) {
    .match-card__team-name { font-size: 12px; }
    .match-card__kill-score { font-size: 15px; }
}

/* ─── Mobile ≤ 600px ───────────────────────────────────── */
@media (max-width: 600px) {
    .match-card__body { padding: 9px 12px 7px; }
    .match-card__main-row { grid-template-columns: 42px 1fr 42px; gap: 6px; }
    .match-card__logo-wrap { width: 22px; height: 22px; }
    .match-card__team-logo { width: 22px; height: 22px; }
    .match-card__team-logo--placeholder { width: 22px; height: 22px; }
    .match-card__team-name { font-size: 11px; }
    .match-card__kill-score { font-size: 13px; }
    .match-card__score { min-width: 48px; }
    .match-card__game-time { font-size: 10px; }
    .match-card__footer { padding: 4px 12px 6px; }
}
