/**
 * HLTV Match Card — AdriaZone
 * ----------------------------------------------------------------
 * Compact match card for embedding inside news article content via
 * [hltv_match_card]. Mirrors palette / radii / hover patterns of the
 * existing .hltv-trn-card and .hltv-sm-* components so the card sits
 * naturally next to other site UI.
 *
 * Palette (matches site convention):
 *   #0d1117 darkest    #161a21 panel       #1c2333 inset
 *   #21262d divider    #30363d border      #6e7681 muted text
 *   #8fa3b3 sub text   #c9d1d9 body        #e6edf3 strong text
 *   #e94560 accent     #3fb950 win green   #f85149 loss red
 * ---------------------------------------------------------------- */


/* ============================================================
   Card shell
   ============================================================ */
.hltv-mc {
    display: block;
    background: #161a21;
    border: 1px solid #21262d;
    border-radius: 10px;
    overflow: hidden;
    margin: 22px auto;
    color: #c9d1d9;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    text-decoration: none !important;
    transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
    box-sizing: border-box;
    max-width: 720px;
    width: 100%;
}

a.hltv-mc:hover {
    border-color: #e94560;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
}

.hltv-mc *,
.hltv-mc *::before,
.hltv-mc *::after { box-sizing: border-box; }

.hltv-mc-empty {
    padding: 22px 18px;
    text-align: center;
    color: #6e7681;
    font-size: 13px;
}


/* ============================================================
   Top bar — league + format
   ============================================================ */
.hltv-mc-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    background: #0d1117;
    border-bottom: 1px solid #21262d;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.hltv-mc-league {
    color: #e6edf3;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

.hltv-mc-format {
    color: #8fa3b3;
    font-weight: 700;
    background: #1c2333;
    border: 1px solid #30363d;
    padding: 3px 8px;
    border-radius: 4px;
    flex-shrink: 0;
    letter-spacing: .03em;
}


/* ============================================================
   Main row — team | center | team
   ============================================================ */
.hltv-mc-main {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 16px;
    padding: 20px 18px;
}

.hltv-mc-team {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.hltv-mc-team--left  { justify-content: flex-end;   text-align: right; }
.hltv-mc-team--right { justify-content: flex-start; text-align: left; }

.hltv-mc-logo {
    width: 52px;
    height: 52px;
    object-fit: contain;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, .45));
    background: transparent;
}

.hltv-mc-logo--placeholder {
    background: #1c2333;
    border: 1px dashed #30363d;
    border-radius: 8px;
    filter: none;
}

.hltv-mc-team-name {
    font-size: 15px;
    font-weight: 700;
    color: #e6edf3;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.hltv-mc-team.is-winner .hltv-mc-team-name { color: #3fb950; }


/* ============================================================
   Center column — status / score / date
   ============================================================ */
.hltv-mc-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 96px;
    flex-shrink: 0;
}

.hltv-mc-score-pair {
    display: flex;
    align-items: center;
    gap: 4px;
}

.hltv-mc-score {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 32px;
    padding: 0 9px;
    font-size: 18px;
    font-weight: 800;
    border-radius: 5px;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.hltv-mc-score.is-win {
    background: rgba(63, 185, 80, .15);
    color: #3fb950;
    border: 1px solid rgba(63, 185, 80, .35);
}

.hltv-mc-score.is-loss {
    background: rgba(248, 81, 73, .10);
    color: #f85149;
    border: 1px solid rgba(248, 81, 73, .30);
}

.hltv-mc-score-sep {
    font-size: 18px;
    color: #30363d;
    font-weight: 400;
    line-height: 1;
}

.hltv-mc-vs {
    font-size: 16px;
    color: #6e7681;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
}

.hltv-mc-date {
    font-size: 11px;
    color: #6e7681;
    font-weight: 500;
    white-space: nowrap;
    letter-spacing: .02em;
}

/* Live state */
.hltv-mc-live {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    font-weight: 800;
    color: #e94560;
    text-transform: uppercase;
    letter-spacing: .1em;
}

.hltv-mc-live-dot {
    width: 7px;
    height: 7px;
    background: #e94560;
    border-radius: 50%;
    animation: hltv-mc-pulse 1.6s ease-in-out infinite;
    box-shadow: 0 0 8px rgba(233, 69, 96, .6);
}

@keyframes hltv-mc-pulse {
    0%, 100% { opacity: 1;  transform: scale(1); }
    50%      { opacity: .4; transform: scale(.85); }
}


/* ============================================================
   Map breakdown rows
   ============================================================ */
.hltv-mc-maps {
    border-top: 1px solid #21262d;
    background: #1c2333;
}

.hltv-mc-map {
    display: grid;
    grid-template-columns: 60px 1fr 60px;
    align-items: center;
    padding: 10px 18px;
    border-bottom: 1px solid #21262d;
    font-size: 13px;
}

.hltv-mc-map:last-child { border-bottom: none; }

.hltv-mc-map-name {
    text-align: center;
    color: #8fa3b3;
    font-weight: 600;
    letter-spacing: .02em;
}

.hltv-mc-map-score {
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: #6e7681;
    font-size: 14px;
}

.hltv-mc-map-score--left  { text-align: left; }
.hltv-mc-map-score--right { text-align: right; }

.hltv-mc-map-score.is-win  { color: #3fb950; }
.hltv-mc-map-score.is-loss { color: #6e7681; }


/* ============================================================
   Mobile (≤480 px)
   ============================================================ */
@media (max-width: 480px) {

    .hltv-mc { margin: 16px 0; border-radius: 8px; }

    .hltv-mc-bar {
        padding: 8px 11px;
        font-size: 10px;
    }

    .hltv-mc-format {
        padding: 2px 6px;
        font-size: 9px;
    }

    .hltv-mc-main {
        gap: 8px;
        padding: 14px 10px;
    }

    .hltv-mc-logo {
        width: 38px;
        height: 38px;
    }

    .hltv-mc-team-name {
        font-size: 12px;
    }

    .hltv-mc-team {
        gap: 8px;
    }

    .hltv-mc-center {
        min-width: 72px;
        gap: 4px;
    }

    .hltv-mc-score {
        min-width: 26px;
        height: 26px;
        font-size: 14px;
        padding: 0 6px;
    }

    .hltv-mc-score-sep { font-size: 14px; }

    .hltv-mc-vs { font-size: 13px; }

    .hltv-mc-date { font-size: 10px; }

    .hltv-mc-map {
        grid-template-columns: 44px 1fr 44px;
        padding: 8px 10px;
        font-size: 12px;
    }

    .hltv-mc-map-score { font-size: 13px; }
}


/* ============================================================
   Astra theme overrides — same pattern used by hltv-tournament-style
   to defeat .entry-content a { text-decoration: underline; color: …}
   ============================================================ */
body .hltv-mc,
body .hltv-mc:link,
body .hltv-mc:visited,
body .hltv-mc:hover,
body .hltv-mc:focus,
body .hltv-mc:active,
.entry-content .hltv-mc,
.entry-content a.hltv-mc,
.entry-content a.hltv-mc:hover,
.post-content .hltv-mc,
article .hltv-mc,
.wp-block-post-content .hltv-mc {
    text-decoration: none !important;
    color: #c9d1d9 !important;
}

.entry-content .hltv-mc .hltv-mc-team-name,
.post-content   .hltv-mc .hltv-mc-team-name,
article         .hltv-mc .hltv-mc-team-name { color: #e6edf3 !important; }

.entry-content .hltv-mc .hltv-mc-team.is-winner .hltv-mc-team-name,
.post-content   .hltv-mc .hltv-mc-team.is-winner .hltv-mc-team-name,
article         .hltv-mc .hltv-mc-team.is-winner .hltv-mc-team-name { color: #3fb950 !important; }

.entry-content .hltv-mc .hltv-mc-league,
.post-content   .hltv-mc .hltv-mc-league,
article         .hltv-mc .hltv-mc-league { color: #e6edf3 !important; }

.entry-content .hltv-mc .hltv-mc-format,
.post-content   .hltv-mc .hltv-mc-format,
article         .hltv-mc .hltv-mc-format { color: #8fa3b3 !important; }

.entry-content .hltv-mc .hltv-mc-score.is-win,
.post-content   .hltv-mc .hltv-mc-score.is-win,
article         .hltv-mc .hltv-mc-score.is-win  { color: #3fb950 !important; }

.entry-content .hltv-mc .hltv-mc-score.is-loss,
.post-content   .hltv-mc .hltv-mc-score.is-loss,
article         .hltv-mc .hltv-mc-score.is-loss { color: #f85149 !important; }

.entry-content .hltv-mc .hltv-mc-map-score.is-win,
.post-content   .hltv-mc .hltv-mc-map-score.is-win,
article         .hltv-mc .hltv-mc-map-score.is-win  { color: #3fb950 !important; }

.entry-content .hltv-mc .hltv-mc-map-score.is-loss,
.post-content   .hltv-mc .hltv-mc-map-score.is-loss,
article         .hltv-mc .hltv-mc-map-score.is-loss { color: #6e7681 !important; }
