/* ===========================
   Livix LiveBlog — Public CSS
   =========================== */

:root {
    --livix-dark: #0d1b2a;
    --livix-navy: #1a2d44;
    --livix-blue: #1565c0;
    --livix-accent: #00b4d8;
    --livix-green: #00c853;
    --livix-yellow: #ffd600;
    --livix-red: #d32f2f;
    --livix-text: #1c1c1e;
    --livix-muted: #6b7280;
    --livix-border: #e5e7eb;
    --livix-bg: #f8f9fa;
    --livix-card-bg: #ffffff;
    --livix-goal-bg: #fff8e1;
    --livix-goal-border: #ffd600;
    --livix-radius: 12px;
    --livix-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.livix-lb-container {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    max-width: 780px;
    margin: 0 auto;
    color: var(--livix-text);
}

/* Header / Scoreboard */
.livix-lb-header {
    background: var(--livix-navy);
    border-radius: var(--livix-radius);
    padding: 28px 24px 20px;
    margin-bottom: 20px;
    color: #fff;
    text-align: center;
    box-shadow: var(--livix-shadow);
}

.livix-lb-competition {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--livix-accent);
    margin-bottom: 16px;
}

.livix-lb-scoreboard {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
}

.livix-lb-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
    max-width: 200px;
}

.livix-lb-team-logo {
    width: 64px;
    height: 64px;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.4));
}

.livix-lb-team-name {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #e0e0e0;
}

.livix-lb-score {
    text-align: center;
    flex-shrink: 0;
}

.livix-lb-score-nums {
    font-size: 52px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -2px;
    display: flex;
    align-items: center;
    gap: 4px;
    color: #fff;
}

.livix-lb-score-sep {
    font-size: 36px;
    color: var(--livix-muted);
    font-weight: 300;
    margin: 0 4px;
}

.livix-lb-status {
    margin-top: 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(255,255,255,0.1);
}

.livix-lb-status-live { background: rgba(0,200,83,0.2); color: var(--livix-green); }
.livix-lb-status-finished { color: #aaa; }
.livix-lb-status-halftime { background: rgba(0,180,216,0.2); color: var(--livix-accent); }

.livix-lb-live-dot {
    width: 8px;
    height: 8px;
    background: var(--livix-green);
    border-radius: 50%;
    display: inline-block;
    animation: livix-pulse 1.2s infinite;
}

@keyframes livix-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.7); }
}

.livix-lb-match-date {
    margin-top: 12px;
    font-size: 12px;
    color: #8899aa;
}

/* ── Events Feed ── */
.livix-lb-feed {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid var(--livix-border);
    border-radius: var(--livix-radius);
    overflow: hidden;
    background: #fff;
}

.livix-lb-no-events {
    text-align: center;
    padding: 48px;
    color: var(--livix-muted);
    font-size: 15px;
    background: var(--livix-bg);
}

/* ── Base event ── */
.livix-lb-event {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--livix-border);
    animation: livix-slide-in 0.35s ease;
    position: relative;
}
.livix-lb-event:last-child { border-bottom: none; }

/* Full-width when no minute */
.livix-lb-event-no-minute {
    grid-template-columns: 1fr;
}
.livix-lb-event-no-minute .livix-lb-event-minute {
    display: none;
}

/* Pinned event */
.livix-lb-event-pinned {
    background: #fffbf0;
    border-left: 3px solid #f0a500;
}
.livix-lb-pin-icon {
    font-size: 14px;
    line-height: 1;
}

@keyframes livix-slide-in {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Minute sidebar ── */
.livix-lb-event-minute {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 14px 0 14px;
    background: var(--livix-bg);
    border-right: 1px solid var(--livix-border);
    min-width: 56px;
    gap: 4px;
}

.livix-lb-event-minute span:first-child {
    font-size: 16px;
    font-weight: 900;
    color: var(--livix-navy);
    line-height: 1;
}

.livix-lb-event-icon {
    font-size: 16px;
    line-height: 1;
}

/* ── Content area ── */
.livix-lb-event-content {
    padding: 14px 16px;
    flex: 1;
    min-width: 0;
}

/* ── GOAL event ── */
.livix-lb-event-type-goal,
.livix-lb-event-type-own_goal,
.livix-lb-event-type-penalty_goal {
    background: #fffbf0;
}
.livix-lb-event-type-goal .livix-lb-event-minute,
.livix-lb-event-type-own_goal .livix-lb-event-minute,
.livix-lb-event-type-penalty_goal .livix-lb-event-minute {
    background: #fff8dc;
    border-right-color: #f0d060;
}
.livix-lb-event-type-goal::before,
.livix-lb-event-type-own_goal::before,
.livix-lb-event-type-penalty_goal::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: #f0c000;
}

/* ── CARD events ── */
.livix-lb-event-type-red_card::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0;
    width: 3px; background: var(--livix-red);
}
.livix-lb-event-type-yellow_card::before,
.livix-lb-event-type-yellow_red::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0;
    width: 3px; background: #e6a000;
}

/* ── SUBSTITUTION ── */
.livix-lb-event-type-substitution::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0;
    width: 3px; background: #10b981;
}

/* ── UPDATE / VAR / INJURY ── */
.livix-lb-event-type-update .livix-lb-event-minute,
.livix-lb-event-type-var .livix-lb-event-minute,
.livix-lb-event-type-injury .livix-lb-event-minute {
    background: #f8f9fa;
}

/* ── SYSTEM events (match start, halftime, end) ── */
.livix-lb-event-system {
    grid-template-columns: 1fr;
    background: #1a2d44;
    color: #fff;
    border-bottom-color: rgba(255,255,255,0.1);
}

.livix-lb-system-event {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 11px 16px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.9);
}

/* ── Event title ── */
.livix-lb-event-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--livix-text);
    margin-bottom: 3px;
    line-height: 1.35;
}

/* ── Player name ── */
.livix-lb-player {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 14px;
    font-weight: 700;
    color: #111;
    margin-bottom: 4px;
}

.livix-lb-player-out {
    font-size: 12px;
    font-weight: 500;
    color: var(--livix-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}
.livix-lb-player-out::before {
    content: '↕';
    font-size: 11px;
    color: #10b981;
}

/* ── Description body ── */
.livix-lb-event-body {
    font-size: 13.5px;
    color: #555;
    line-height: 1.6;
    margin-top: 5px;
}

/* ── Image ── */
.livix-lb-event-image img {
    max-width: 100%;
    margin-top: 10px;
    display: block;
}

/* ── Embed ── */
.livix-lb-embed { margin-top: 10px; }
.livix-lb-embed iframe { max-width: 100%; }

/* ── Meta row (half, time) ── */
.livix-lb-event-meta {
    display: flex;
    gap: 8px;
    margin-top: 6px;
    font-size: 10px;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    align-items: center;
}
.livix-lb-event-meta span + span::before {
    content: '·';
    margin-right: 8px;
    color: #ddd;
}

/* ── Team logo inside event ── */
.livix-lb-event-team-logo {
    width: 20px;
    height: 20px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 0 !important;
}

/* Live updating indicator */
.livix-lb-updating {
    text-align: center;
    padding: 12px;
    font-size: 12px;
    color: var(--livix-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}

.livix-lb-pulse {
    width: 8px;
    height: 8px;
    background: var(--livix-green);
    border-radius: 50%;
    display: inline-block;
    animation: livix-pulse 1.5s infinite;
}

/* Branding */
.livix-lb-branding {
    text-align: center;
    padding: 16px;
    font-size: 11px;
    color: #bbb;
    margin-top: 12px;
}

.livix-lb-branding a {
    color: var(--livix-accent);
    text-decoration: none;
    font-weight: 600;
}

/* Widget */
.livix-lb-widget {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    border: 1px solid var(--livix-border);
    border-radius: var(--livix-radius);
    overflow: hidden;
    box-shadow: var(--livix-shadow);
}

.livix-lb-widget-header {
    background: var(--livix-navy);
    color: #fff;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.livix-lb-widget-teams {
    display: flex;
    align-items: center;
    gap: 10px;
}

.livix-lb-widget-logo {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.livix-lb-widget-score {
    font-size: 22px;
    font-weight: 900;
}

.livix-lb-widget-events {
    padding: 8px 0;
    max-height: 250px;
    overflow-y: auto;
}

.livix-lb-widget-event {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    font-size: 13px;
    border-bottom: 1px solid var(--livix-border);
}

.livix-lb-widget-event:last-child { border-bottom: none; }

.livix-lb-widget-icon { font-size: 16px; }
.livix-lb-widget-min { font-weight: 700; color: var(--livix-navy); min-width: 30px; }
.livix-lb-widget-text { color: var(--livix-text); }

.livix-lb-widget-link {
    display: block;
    text-align: center;
    padding: 10px;
    background: var(--livix-bg);
    color: var(--livix-blue);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    border-top: 1px solid var(--livix-border);
}

/* Responsive */
@media (max-width: 600px) {
    .livix-lb-scoreboard { gap: 12px; }
    .livix-lb-score-nums { font-size: 38px; }
    .livix-lb-team-logo { width: 44px; height: 44px; }
    .livix-lb-team-name { font-size: 12px; }
    .livix-lb-event { padding: 12px 14px; }
    .livix-lb-event-minute { min-width: 36px; }
    .livix-lb-event-minute span:first-child { font-size: 16px; }
}

/* Team logo inside event */
.livix-lb-event-team-logo {
    width: 22px;
    height: 22px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 0 !important;
}

.livix-lb-player {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Score bump animation on goal */
.livix-lb-score-bump {
    animation: livix-score-bump 0.6s cubic-bezier(0.36,0.07,0.19,0.97);
    display: inline-block;
}
@keyframes livix-score-bump {
    0%   { transform: scale(1); color: inherit; }
    30%  { transform: scale(1.5); color: #ffd600; }
    100% { transform: scale(1); color: inherit; }
}

/* No border radius on any liveblog images/logos */
.livix-lb-container img,
.livix-lb-container .livix-lb-team-logo,
.livix-lb-container .livix-lb-event-team-logo,
.livix-lb-container .livix-lb-event-image img,
.livix-lb-container .livix-lb-widget-logo { border-radius: 0 !important; }

/* =============================================
   LIVIX MATCH WIDGET — 300×250
   ============================================= */
.livix-mw {
    width: 100%;
    max-width: 330px;
    min-height: 300px;
    background: linear-gradient(160deg, #00172D 0%, #001f3d 100%);
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    border-radius: 12px;
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    position: relative;
    margin: 0 auto;
}

/* Mobile: center the widget */
@media (max-width: 768px) {
    .livix-mw {
        margin-left: auto !important;
        margin-right: auto !important;
        display: flex;
    }
    .sidebar-widget.widget_livix_match_widget,
    .widget_livix_match_widget {
        display: flex;
        justify-content: center;
        padding: 0 !important;
        background: transparent !important;
        border: none !important;
    }
}
/* Kill theme sidebar-widget wrapper around Livix match widget */
.sidebar-widget.widget_livix_match_widget {
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    box-shadow: none !important;
    margin-bottom: 16px !important;
}

.livix-mw-empty {
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.4);
    font-size: 13px;
    padding: 40px 20px;
    text-align: center;
}

.livix-mw-competition {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #6DBEF5;
    text-align: center;
    padding: 12px 12px 0;
}

.livix-mw-status-row {
    text-align: center;
    padding: 6px 0 0;
}

.livix-mw-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 3px 12px;
    border-radius: 20px;
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.5);
}
.livix-mw-status-live     { background: rgba(0,200,83,0.2); color: #4ddb85; }
.livix-mw-status-halftime { background: rgba(59,158,232,0.2); color: #6DBEF5; }
.livix-mw-status-finished { color: rgba(255,255,255,0.3); }
.livix-mw-status-postponed{ background: rgba(220,50,50,0.2); color: #ff8080; }

.livix-mw-dot {
    width: 7px; height: 7px;
    background: #00c853;
    border-radius: 50%;
    animation: livix-mw-blink 1.2s ease-in-out infinite;
}
@keyframes livix-mw-blink { 0%,100%{opacity:1} 50%{opacity:.3} }

/* Body: 3-col grid */
.livix-mw-body {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 6px;
    padding: 14px 10px 10px;
    flex: 1;
    width: 100%;
    box-sizing: border-box;
}

.livix-mw-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
}

.livix-mw-logo {
    width: 52px;
    height: 52px;
    object-fit: contain;
    border-radius: 0 !important;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5));
}

.livix-mw-name {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fff;
    line-height: 1.2;
}

.livix-mw-scorers {
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.livix-mw-scorers span {
    font-size: 10px;
    color: rgba(255,255,255,0.6);
    line-height: 1.4;
}

/* Center: score */
.livix-mw-center { text-align: center; flex-shrink: 0; }

.livix-mw-score {
    display: flex;
    align-items: center;
    gap: 4px;
    justify-content: center;
}
.livix-mw-score-h,
.livix-mw-score-a {
    font-size: 44px;
    font-weight: 900;
    line-height: 1;
    color: #fff;
    min-width: 30px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}
.livix-mw-score-sep {
    font-size: 30px;
    font-weight: 300;
    color: rgba(255,255,255,0.3);
    padding-bottom: 4px;
}

/* Countdown */
.livix-mw-countdown { text-align: center; }
.livix-mw-countdown-time {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 2px;
    font-size: 22px;
    font-weight: 900;
    color: #fff;
    line-height: 1;
}
.livix-mw-countdown-time em {
    font-style: normal;
    font-size: 11px;
    color: rgba(255,255,255,0.4);
    font-weight: 400;
    margin-right: 4px;
}
.livix-mw-match-date {
    font-size: 12px;
    color: rgba(255,255,255,0.5);
    margin-top: 8px;
    letter-spacing: 0.3px;
    font-weight: 500;
}

/* CTA link */
.livix-mw-link {
    display: block;
    text-align: center;
    padding: 9px 12px;
    background: rgba(26,95,191,0.6);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s;
    letter-spacing: 0.3px;
}
.livix-mw-link:hover { background: #1A5FBF; color: #fff; }
.livix-mw-live .livix-mw-link { background: rgba(0,200,83,0.25); }
.livix-mw-live .livix-mw-link:hover { background: rgba(0,200,83,0.4); }

.livix-mw-branding {
    text-align: center;
    padding: 5px;
    font-size: 10px;
    color: rgba(255,255,255,0.2);
}
.livix-mw-branding a { color: rgba(255,255,255,0.3); text-decoration: none; }



/* Hide post header (breadcrumb, title, meta) on liveblog pages — hero replaces it */
.livix-liveblog-post .article-header { display: none !important; }

/* Match minute display */
.livix-mw-minute {
    font-size: 12px; font-weight: 700; color: #4ddb85;
    text-align: center; letter-spacing: 1px;
    animation: livix-mw-blink 2s ease-in-out infinite;
}
.livix-mw-min-num { font-size: 14px; font-weight: 900; }

/* ── Event header row (icon + title inline) ── */
.livix-lb-event-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

/* ── Inline event icons ── */
.livix-ev-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-style: normal;
    line-height: 1;
}
.livix-ev-icon small {
    font-size: 9px;
    font-weight: 700;
    margin-left: 2px;
    opacity: 0.75;
}
.livix-ev-icon-goal  { font-size: 18px; }
.livix-ev-icon-og    { font-size: 18px; color: #d32f2f; }
.livix-ev-icon-miss  { font-size: 16px; color: #999; }

/* Card icons — CSS rectangles, no emoji */
.livix-ev-icon-yc,
.livix-ev-icon-rc,
.livix-ev-icon-yrc {
    width: 13px;
    height: 17px;
    border-radius: 2px;
    flex-shrink: 0;
}
.livix-ev-icon-yc  { background: #f0c000; }
.livix-ev-icon-rc  { background: #d32f2f; }
.livix-ev-icon-yrc {
    background: linear-gradient(90deg, #f0c000 50%, #d32f2f 50%);
    width: 22px;
}

/* Substitution icon */
.livix-ev-icon-sub {
    font-size: 15px;
    color: #10b981;
    font-weight: 900;
}

/* VAR badge */
.livix-ev-icon-var {
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.5px;
    background: #1a2d44;
    color: #fff;
    padding: 2px 6px;
    border-radius: 3px;
}

/* Injury */
.livix-ev-icon-inj {
    width: 17px;
    height: 17px;
    background: #d32f2f;
    color: #fff;
    font-size: 13px;
    font-weight: 900;
    border-radius: 50%;
}

/* ── Basketball-specific icons ── */
.livix-ev-icon-basket2 { font-size: 18px; color: #f97316; }
.livix-ev-icon-basket3 { font-size: 18px; color: #ef4444; font-weight: 900; }
.livix-ev-icon-basket3 small { font-size: 11px; color: #ef4444; margin-left: 1px; }
.livix-ev-icon-ft      { font-size: 16px; }
.livix-ev-icon-foul    { font-size: 16px; color: #f59e0b; }
.livix-ev-icon-tech    { font-size: 16px; color: #ef4444; }
.livix-ev-icon-timeout { font-size: 16px; color: #6366f1; }

/* Basketball major event accent (basket_2, basket_3, free_throw) */
.livix-sport-basketball .livix-lb-event-major {
    border-left-color: #f97316;
    background: #fff8f0;
}

/* Basketball scoreboard — bigger numbers for high scores */
.livix-sport-basketball .livix-lb-score-nums {
    font-size: 36px;
    letter-spacing: 2px;
}

/* Minute: only number, no icon */
.livix-lb-min-num {
    font-size: 15px;
    font-weight: 900;
    color: var(--livix-navy);
    line-height: 1;
}

/* Title inline with icon */
.livix-lb-event-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--livix-text);
    line-height: 1.3;
}
