/**
 * HLTV News Shortcode Styles — AdriaZone Design System
 *
 * Matches design tokens from:
 *   hltv-tournament-style.css  (card system, rows, borders)
 *   hltv-profile-style.css     (color variables, typography)
 *   hltv-auth-style.css        (dark backgrounds, accent red)
 *
 * Shortcodes covered:
 *   [hltv_news]     — main news list
 *   [hltv_popular]  — sidebar ranked list
 */

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

/* ============================================
   News Item Row
   ============================================ */
.hltv-news-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 18px;
    background: #161a21;
    border-bottom: 1px solid #21262d;
    cursor: pointer;
    transition: background .15s, border-color .15s;
    gap: 16px;
    text-decoration: none !important;
    color: inherit;
}

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

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

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

/* ── Featured (first item) ── */
.hltv-news-item.hltv-featured {
    padding: 16px 18px;
    background: #1a1e28;
    border-left: 3px solid #e94560;
    border-bottom: 1px solid #30363d;
}

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

.hltv-news-item.hltv-featured .hltv-comment-count {
    color: #e94560;
    font-weight: 700;
}

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

/* ============================================
   Item Left: time + flag + title
   ============================================ */
.hltv-news-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1;
}

.hltv-news-time {
    font-size: 11px;
    color: #6e7681;
    min-width: 38px;
    text-align: center;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
    letter-spacing: 0.2px;
}

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

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

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

/* ============================================
   Item Right: comment count
   ============================================ */
.hltv-news-item-right {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
    padding-left: 10px;
}

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

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

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

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

.hltv-sidebar-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 13px 16px;
    cursor: pointer;
    transition: background .15s;
    border-bottom: 1px solid #21262d;
    text-decoration: none !important;
    color: inherit;
}

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

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

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

/* ── Rank number ── */
.hltv-sidebar-rank {
    font-size: 13px;
    font-weight: 800;
    color: #6e7681;
    min-width: 18px;
    text-align: center;
    line-height: 1.5;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}

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

/* ── Content ── */
.hltv-sidebar-content {
    flex: 1;
    min-width: 0;
}

.hltv-sidebar-title {
    font-size: 13px;
    color: #c9d1d9;
    font-weight: 500;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color .15s;
}

.hltv-sidebar-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 5px;
}

.hltv-sidebar-flag {
    width: 18px;
    height: 13px;
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0,0,0,.4);
    flex-shrink: 0;
}

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

/* ============================================
   Section header (optional — use above lists)
   Matches .hltv-profile-section-header style
   ============================================ */
.hltv-news-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 0 10px;
    margin-bottom: 0;
    border-bottom: none;
}

.hltv-news-section-title {
    font-size: 11px;
    font-weight: 700;
    color: #8fa3b3;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin: 0 0 8px;
    display: flex;
    align-items: center;
    gap: 7px;
}

.hltv-news-section-title::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 14px;
    background: #e94560;
    border-radius: 2px;
    flex-shrink: 0;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
    .hltv-news-item {
        padding: 11px 14px;
    }

    .hltv-news-item.hltv-featured {
        padding: 13px 14px;
    }

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

    .hltv-news-flag,
    .hltv-news-flag-placeholder {
        width: 20px;
        height: 15px;
    }

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

    .hltv-sidebar-item {
        padding: 11px 14px;
    }
}
