/**
 * HLTV News Style
 * Matches hltv-news-shortcode.php HTML structure exactly.
 */

/* ============================================
   News List
   ============================================ */
.hltv-news-list {
    display: flex;
    flex-direction: column;
    background: #161a21;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #21262d;
}

.hltv-news-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 14px;
    gap: 10px;
    border-bottom: 1px solid #1c2130;
    text-decoration: none !important;
    color: inherit;
    transition: background 0.15s ease;
    min-width: 0;
}

.hltv-news-item:last-child {
    border-bottom: none;
}

.hltv-news-item:hover {
    background: #1e2535;
    text-decoration: none;
}

.hltv-news-item:hover .hltv-news-title {
    color: #ff5a75;
}

/* Featured (first) item */
.hltv-news-item.hltv-featured {
    background: #1a2030;
    border-left: 3px solid #e94560;
    padding-left: 11px;
}

.hltv-news-item.hltv-featured .hltv-news-title {
    font-size: 14px;
    font-weight: 600;
    color: #e6edf3;
}

.hltv-news-item.hltv-featured:hover {
    background: #1f2840;
}

/* ── Left side ───────────────────────────────── */
.hltv-news-item-left {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1;
}

.hltv-news-time {
    font-size: 11px;
    color: #6e7681;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
    min-width: 34px;
}

.hltv-news-flag {
    width: 24px;
    height: 18px;
    border-radius: 2px;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

.hltv-news-flag-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 24px;
    height: 18px;
}

.hltv-news-title {
    font-size: 13px;
    color: #c9d1d9;
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.15s ease;
    line-height: 1.4;
}

/* ── Right side ──────────────────────────────── */
.hltv-news-item-right {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    color: #6e7681;
}

.hltv-comment-icon {
    display: flex;
    align-items: center;
    color: #6e7681;
}

.hltv-comment-count {
    font-size: 11px;
    color: #6e7681;
    font-variant-numeric: tabular-nums;
    min-width: 16px;
    text-align: right;
}

/* Empty state */
.hltv-news-empty {
    padding: 32px 20px;
    text-align: center;
    color: #6e7681;
    font-size: 13px;
    background: #161a21;
    border-radius: 6px;
    border: 1px solid #21262d;
}

/* ============================================
   Sidebar / Popular list
   ============================================ */
.hltv-sidebar-list {
    display: flex;
    flex-direction: column;
    background: #161a21;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #21262d;
}

.hltv-sidebar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid #1c2130;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s ease;
}

.hltv-sidebar-item:last-child {
    border-bottom: none;
}

.hltv-sidebar-item:hover {
    background: #1e2535;
    text-decoration: none;
}

.hltv-sidebar-item:hover .hltv-sidebar-title {
    color: #ff5a75;
}

/* Rank badge */
.hltv-sidebar-rank {
    font-size: 13px;
    font-weight: 700;
    color: #6e7681;
    min-width: 18px;
    text-align: center;
    flex-shrink: 0;
}

.hltv-sidebar-rank.hltv-top-1 { color: #ffd700; }
.hltv-sidebar-rank.hltv-top-2 { color: #c0c0c0; }
.hltv-sidebar-rank.hltv-top-3 { color: #cd7f32; }

/* Sidebar content */
.hltv-sidebar-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.hltv-sidebar-title {
    font-size: 13px;
    color: #c9d1d9;
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.15s ease;
    line-height: 1.3;
}

.hltv-sidebar-meta {
    display: flex;
    align-items: center;
    gap: 6px;
}

.hltv-sidebar-flag {
    width: 18px;
    height: 13px;
    border-radius: 2px;
    object-fit: cover;
    flex-shrink: 0;
}

.hltv-sidebar-comments {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    color: #6e7681;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 600px) {
    .hltv-news-item {
        padding: 8px 10px;
    }

    .hltv-news-time {
        display: none;
    }

    .hltv-news-title {
        font-size: 12px;
    }

    .hltv-sidebar-item {
        padding: 8px 10px;
    }
}

/* ============================================
   Live Coverage / Pinned Post
   ============================================ */

/* Live item — red left border + subtle background */
.hltv-news-item--live {
    position: relative;
    background: rgba(233, 69, 96, 0.05);
    border-bottom-color: rgba(233, 69, 96, 0.15) !important;
}

.hltv-news-item--live:hover {
    background: rgba(233, 69, 96, 0.1);
}

/* Pulsing left bar — same style as live matches */
.hltv-news-live-bar {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #e94560;
    border-radius: 0;
    animation: hltvNewsLivePulse 2s ease-in-out infinite;
}

@keyframes hltvNewsLivePulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.35; }
}

/* LIVE badge pill */
.hltv-news-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #e94560;
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .07em;
    padding: 2px 6px;
    border-radius: 3px;
    text-transform: uppercase;
    flex-shrink: 0;
    white-space: nowrap;
}

/* Pulsing dot inside the badge */
.hltv-news-live-dot {
    width: 5px;
    height: 5px;
    background: #fff;
    border-radius: 50%;
    flex-shrink: 0;
    animation: hltvNewsDotPulse 1.4s ease-in-out infinite;
}

@keyframes hltvNewsDotPulse {
    0%, 100% { opacity: 1;   transform: scale(1);    }
    50%       { opacity: 0.4; transform: scale(0.75); }
}

/* Title on live items is brighter */
.hltv-news-item--live .hltv-news-title {
    color: #e6edf3;
    font-weight: 600;
}

.hltv-news-item--live:hover .hltv-news-title {
    color: #e94560;
}

/* Add left padding so content doesn't overlap the bar */
.hltv-news-item--live .hltv-news-item-left {
    padding-left: 6px;
}

/* Separator between live and regular posts */
.hltv-news-has-live .hltv-news-item:not(.hltv-news-item--live):first-of-type {
    border-top: 1px solid #21262d;
    margin-top: 1px;
}

/* ── Remove all underlines from news items ── */
.hltv-news-item,
.hltv-news-item:hover,
.hltv-news-item:focus,
.hltv-news-item *,
.hltv-sidebar-item,
.hltv-sidebar-item:hover,
.hltv-sidebar-item * {
    text-decoration: none !important;
}
