/**
 * HLTV Featured Widgets Style — AdriaZone Design System
 *
 * Matches design tokens from:
 *   hltv-tournament-style.css  (card system, stat grids)
 *   hltv-news-style.css        (list/row pattern)
 *   hltv-profile-style.css     (color variables, typography)
 *
 * Covers:
 *   [hltv_featured_tournament]  — .hltv-ft-*
 *   [hltv_featured_player]      — .hltv-fp-*  (Player of the Week)
 */

/* ============================================================
   FEATURED TOURNAMENT  (.hltv-ft-*)
   ============================================================ */

.hltv-ft-widget {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Section heading */
.hltv-ft-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 0 10px;
    color: #8fa3b3;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

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

.hltv-ft-header svg { opacity: .6; }
.hltv-ft-title { font-size: 11px; color: #8fa3b3; }

/* Card grid */
.hltv-ft-cards {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hltv-ft-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
}

/* ── Tournament card ── */
.hltv-ft-card {
    display: flex;
    flex-direction: column;
    background: #161a21;
    border: 1px solid #30363d;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none !important;
    color: inherit;
    transition: border-color .15s, transform .15s;
}

.hltv-ft-card:hover {
    border-color: #e94560;
    transform: translateY(-2px);
    text-decoration: none !important;
}

.hltv-ft-card-live {
    border-color: rgba(233,69,96,.35);
}

.hltv-ft-card-live:hover {
    border-color: #e94560;
}

/* Card top — logo + name + dates + status */
.hltv-ft-card-top {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 14px 10px;
}

.hltv-ft-logo {
    width: 46px;
    height: 46px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 6px;
    background: #0d1117;
    padding: 4px;
}

.hltv-ft-logo-placeholder {
    width: 46px;
    height: 46px;
    background: #1c2333;
    border: 1px dashed #30363d;
    border-radius: 6px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hltv-ft-card-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hltv-ft-name {
    font-size: 14px;
    font-weight: 700;
    color: #e6edf3;
    line-height: 1.3;
    text-decoration: none !important;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color .15s;
}

.hltv-ft-card:hover .hltv-ft-name { color: #e94560; }

.hltv-ft-dates {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #6e7681;
    text-decoration: none !important;
}

.hltv-ft-dates svg { opacity: .5; flex-shrink: 0; }

/* Status badges */
.hltv-ft-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: .05em;
    align-self: flex-start;
    text-decoration: none !important;
}

.hltv-ft-status-finished {
    background: rgba(255,255,255,.05);
    color: #6e7681;
    border: 1px solid #21262d;
}

.hltv-ft-status-upcoming {
    background: rgba(233,69,96,.1);
    color: #e94560;
    border: 1px solid rgba(233,69,96,.25);
}

.hltv-ft-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: .05em;
    background: rgba(233,69,96,.12);
    color: #e94560;
    border: 1px solid rgba(233,69,96,.3);
    align-self: flex-start;
    animation: hltv-feat-pulse 2s ease-in-out infinite;
}

.hltv-ft-live-dot {
    width: 6px;
    height: 6px;
    background: #e94560;
    border-radius: 50%;
    flex-shrink: 0;
    animation: hltv-feat-pulse 2s ease-in-out infinite;
}

/* Stats row */
.hltv-ft-card-stats {
    display: flex;
    gap: 1px;
    background: #21262d;
    border-top: 1px solid #21262d;
}

.hltv-ft-stat {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 9px 4px;
    background: #0d1117;
    text-decoration: none !important;
    transition: background .12s;
}

.hltv-ft-stat:hover { background: #111620; }

.hltv-ft-stat-live {
    background: rgba(233,69,96,.07);
}

.hltv-ft-stat-val {
    font-size: 15px;
    font-weight: 700;
    color: #e6edf3;
    line-height: 1;
    text-decoration: none !important;
}

.hltv-ft-stat-live .hltv-ft-stat-val { color: #e94560; }

.hltv-ft-stat-label {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: #50545f;
    text-decoration: none !important;
}

/* Description */
.hltv-ft-card-desc {
    padding: 8px 14px 12px;
    font-size: 12px;
    color: #6e7681;
    line-height: 1.5;
    border-top: 1px solid #21262d;
}

/* Progress bar */
.hltv-ft-progress {
    height: 3px;
    background: #21262d;
    overflow: hidden;
}

.hltv-ft-progress-bar {
    height: 100%;
    background: #e94560;
    transition: width .3s ease;
}

.hltv-ft-progress-text {
    font-size: 10px;
    color: #50545f;
    text-align: right;
    padding: 3px 14px 8px;
}

.hltv-ft-empty {
    padding: 28px 14px;
    text-align: center;
    color: #6e7681;
    font-size: 13px;
    background: #161a21;
    border: 1px solid #30363d;
    border-radius: 10px;
}

/* ============================================================
   PLAYER OF THE WEEK  (.hltv-fp-*)
   ============================================================ */

.hltv-fp-widget {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Section heading — matches .hltv-ft-header */
.hltv-fp-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 0 10px;
    color: #8fa3b3;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

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

.hltv-fp-header svg { opacity: .6; }
.hltv-fp-title { font-size: 11px; color: #8fa3b3; }

.hltv-fp-cards {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hltv-fp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

/* ── Player card ── */
.hltv-fp-card {
    display: flex;
    flex-direction: column;
    background: #161a21;
    border: 1px solid #30363d;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none !important;
    color: inherit;
    transition: border-color .15s, transform .15s;
}

.hltv-fp-card:hover {
    border-color: #e94560;
    transform: translateY(-2px);
    text-decoration: none !important;
}

.hltv-fp-card-top {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 14px 12px;
}

/* Player photo */
.hltv-fp-photo {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
    background: #0d1117;
    border: 1px solid #21262d;
}

.hltv-fp-photo-placeholder {
    width: 56px;
    height: 56px;
    background: #1c2333;
    border: 1px solid #30363d;
    border-radius: 6px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hltv-fp-card-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.hltv-fp-name {
    font-size: 15px;
    font-weight: 700;
    color: #e6edf3;
    text-decoration: none !important;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color .15s;
    line-height: 1.2;
}

.hltv-fp-card:hover .hltv-fp-name { color: #e94560; }

.hltv-fp-position {
    font-size: 11px;
    color: #6e7681;
}

.hltv-fp-flag {
    width: 18px;
    height: 13px;
    border-radius: 2px;
    object-fit: cover;
    box-shadow: 0 1px 3px rgba(0,0,0,.4);
}

.hltv-fp-team {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 3px;
}

.hltv-fp-team-logo {
    width: 16px;
    height: 16px;
    object-fit: contain;
    flex-shrink: 0;
}

.hltv-fp-team-name {
    font-size: 11px;
    color: #8b949e;
    text-decoration: none !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Stats grid — matches .hltv-ft-card-stats */
.hltv-fp-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: #21262d;
    border-top: 1px solid #21262d;
}

.hltv-fp-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 9px 4px;
    background: #0d1117;
    transition: background .12s;
}

.hltv-fp-stat:hover { background: #111620; }

.hltv-fp-stat-val {
    font-size: 15px;
    font-weight: 700;
    color: #e6edf3;
    line-height: 1;
    text-decoration: none !important;
}

.hltv-fp-stat-label {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: #50545f;
    text-decoration: none !important;
}

.hltv-fp-empty {
    padding: 28px 14px;
    text-align: center;
    color: #6e7681;
    font-size: 13px;
    background: #161a21;
    border: 1px solid #30363d;
    border-radius: 10px;
}

/* ── POTW crown accent ── */
.hltv-fp-card:first-child .hltv-fp-photo {
    border-color: #f5a623;
    box-shadow: 0 0 12px rgba(245,166,35,.2);
}

/* ============================================================
   Animation
   ============================================================ */
@keyframes hltv-feat-pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: .5; }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 600px) {
    .hltv-ft-grid,
    .hltv-fp-grid {
        grid-template-columns: 1fr;
    }
    .hltv-ft-name { font-size: 13px; }
    .hltv-fp-name { font-size: 14px; }
    .hltv-ft-card-top,
    .hltv-fp-card-top { padding: 12px; }
}
