/* ==========================================================================
   Player Detail — Career
   Career EDGE charts, advanced stats, position percentile, archetype badges
   ========================================================================== */

/* --------------------------------------------------------------------------
   Career EDGE columns + charts
   -------------------------------------------------------------------------- */
/* Career stat highlights */
.pp-career-table td.stat-career-high,
.gamelog-table td.stat-career-high {
    font-weight: 900;
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-thickness: 1px;
    text-decoration-color: currentColor;
}
.stat-league-top5-pill {
    display: inline-block;
    padding: 1px 5px;
    border-radius: 6px;
    border: 1.5px solid #4a7fd4;
}

/* Career stat legend */
.career-stat-legend {
    display: flex;
    gap: 16px;
    padding: 5px 8px;
    font-size: var(--text-3xs, 8px);
    font-weight: 700;
    color: var(--text-muted, #888);
    align-items: center;
    border-top: 1px solid var(--theme-border, #e0e0e0);
}
.career-stat-legend-ch {
    font-weight: 900;
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-thickness: 1px;
    margin-right: 3px;
}
.career-stat-legend-pill {
    display: inline-block;
    padding: 1px 5px;
    border-radius: 6px;
    border: 1.5px solid #4a7fd4;
    margin-right: 3px;
    font-size: var(--text-3xs, 8px);
}

.edge-col {
    color: var(--theme-accent-secondary, #0366d6);
}
.edge-unavail {
    color: #ccc !important;
    background: #fafafa;
}

/* Career EDGE charts */
.career-chart {
    padding: 8px 0;
}
.career-chart-bars {
    display: flex;
    gap: 4px;
    align-items: flex-end;
    height: 80px;
}
.career-bar-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-width: 0;
}
.career-bar-value {
    font-size: var(--text-2xs);
    font-weight: 900;
    color: #000;
}
.career-bar-track {
    width: 100%;
    height: 50px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}
.career-bar-fill {
    width: 100%;
    background: var(--theme-accent-secondary, #0366d6);
    border: 1px solid #000;
    min-height: 2px;
}
.career-bar-label {
    font-size: var(--text-3xs);
    font-weight: 700;
    color: #666;
    text-align: center;
    white-space: nowrap;
}
.career-chart-unit {
    font-size: var(--text-2xs);
    color: #888;
    text-align: right;
    margin-top: 2px;
}

/* Career stacked zone bars */
.career-stacked-bar {
    width: 100%;
    height: 60px;
    display: flex;
    flex-direction: column;
    border: 1px solid #000;
}
.career-stack {
    width: 100%;
    min-height: 1px;
}
.career-stack.oz { background: #22863a; }
.career-stack.nz { background: #d1d5da; }
.career-stack.dz { background: #cb2431; }
.career-chart-legend {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 6px;
}
.career-legend-item {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: var(--text-2xs);
    font-weight: 700;
    color: #555;
}
.career-legend-dot {
    width: 8px;
    height: 8px;
    border: 1px solid #000;
}
.career-legend-dot.oz { background: #22863a; }
.career-legend-dot.nz { background: #d1d5da; }
.career-legend-dot.dz { background: #cb2431; }

/* --------------------------------------------------------------------------
   Advanced stats (xG/Corsi)
   -------------------------------------------------------------------------- */
.adv-stat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
}
.adv-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 6px 4px;
    background: #fff;
    border: 1px solid #000;
    box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 #c0c0c0;
}
.adv-stat-value {
    font-size: var(--text-xs);
    font-weight: 900;
    color: #000;
}
.adv-stat-label {
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #666;
    margin-top: 1px;
}
.adv-positive { color: #22863a; }
.adv-negative { color: #cb2431; }

/* --------------------------------------------------------------------------
   Position percentile section
   -------------------------------------------------------------------------- */

.pos-pctl-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 10px;
}

.pos-pctl-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.pos-pctl-label {
    font-size: var(--text-xs);
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
    gap: 4px;
}

.pos-pctl-count {
    font-size: var(--text-micro);
    font-weight: 600;
    color: var(--text-muted);
    margin-top: 4px;
}

/* --------------------------------------------------------------------------
   Archetype badges
   -------------------------------------------------------------------------- */

.archetype-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 0;
    margin-top: 6px;
    position: relative;
}

.archetype-badge {
    display: inline-flex;
    align-items: center;
    padding: 1px 4px;
    font-size: var(--text-2xs);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--theme-text-inverse);
    border: none;
}

.archetype-positive {
    background: #238636;
}

.archetype-negative {
    background: #DA3633;
}

.archetype-special {
    background: #9E7C16;
}

.archetype-tooltip {
    position: fixed;
    z-index: 9999;
    max-width: 280px;
    width: max-content;
    background: var(--theme-bg-surface, var(--theme-bg-panel));
    border: 1px solid var(--theme-border-strong);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    padding: 4px 8px;
    font-size: var(--text-micro);
    font-weight: 600;
    color: var(--text-muted);
    pointer-events: none;
}
