/* Belt Commodity Ticker — Bloomberg Terminal style */

#commodity-ticker {
    background: #0a0a0a;
    border-top: 1px solid #1a3a1a;
    border-bottom: 1px solid #1a3a1a;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.78em;
    color: #b0b0b0;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    height: 28px;
    line-height: 28px;
    user-select: none;
}

#commodity-ticker .ticker-tape {
    display: inline-block;
    animation: ticker-scroll 30s linear infinite;
    padding-left: 100%;
}

@keyframes ticker-scroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

#commodity-ticker .ticker-item {
    display: inline-block;
    margin-right: 2.5em;
}

#commodity-ticker .ticker-symbol {
    color: #e0e0e0;
    font-weight: bold;
    margin-right: 0.3em;
}

#commodity-ticker .ticker-faction {
    color: #666;
    font-size: 0.85em;
    margin-right: 0.3em;
}

#commodity-ticker .sparkline {
    vertical-align: middle;
    margin-right: 0.35em;
    opacity: 0.85;
}

#commodity-ticker .ticker-price {
    margin-right: 0.3em;
}

#commodity-ticker .tick-up {
    color: #00ff55;
}

#commodity-ticker .tick-down {
    color: #ff3333;
}

#commodity-ticker .tick-flat {
    color: #888;
}

/* Faction event alert bar */
#ticker-alert {
    background: #1a1200;
    border-bottom: 1px solid #3a2a00;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.75em;
    color: #ffb000;
    text-align: center;
    padding: 3px 8px;
    overflow: hidden;
    display: none;
}

#ticker-alert.active {
    display: block;
}

#ticker-alert .alert-label {
    color: #ff8800;
    font-weight: bold;
    margin-right: 0.5em;
    text-transform: uppercase;
}

#ticker-alert .alert-headline {
    color: #ffb000;
}

#ticker-alert .alert-narrative {
    display: block;
    color: #aa8800;
    font-size: 0.9em;
    font-style: italic;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#ticker-alert .alert-impact-up {
    color: #00ff55;
    font-weight: bold;
}

#ticker-alert .alert-impact-down {
    color: #ff3333;
    font-weight: bold;
}

/* Faction Standings Panel — Bloomberg Terminal style */
#faction-standings {
    background: #0a0a0a;
    border-bottom: 1px solid #1a3a1a;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.75em;
    color: #b0b0b0;
    padding: 4px 8px;
    user-select: none;
}

#faction-standings .faction-header {
    color: #ffb000;
    font-weight: bold;
    font-size: 0.85em;
    letter-spacing: 0.1em;
    margin-bottom: 2px;
    border-bottom: 1px solid #1a1a00;
    padding-bottom: 2px;
}

#faction-standings .faction-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 1px 0;
    line-height: 1.6;
}

#faction-standings .faction-row.faction-dominant {
    color: #e0e0e0;
}

#faction-standings .faction-row.faction-dominant .faction-name {
    color: #00ff55;
}

#faction-standings .faction-name {
    width: 120px;
    color: #ccc;
    font-weight: bold;
    flex-shrink: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#faction-standings .faction-commodity {
    width: 40px;
    color: #666;
    font-size: 0.9em;
    flex-shrink: 0;
}

#faction-standings .faction-bar-wrap {
    flex: 1;
    height: 8px;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    min-width: 60px;
}

#faction-standings .faction-bar-fill {
    height: 100%;
    background: #00cc44;
    transition: width 0.3s ease;
}

#faction-standings .faction-row.faction-dominant .faction-bar-fill {
    background: #00ff55;
}

#faction-standings .faction-val {
    width: 36px;
    text-align: right;
    color: #aaa;
    font-size: 0.9em;
    flex-shrink: 0;
}

#faction-standings .faction-bonus {
    width: 110px;
    text-align: right;
    color: #555;
    font-size: 0.85em;
    flex-shrink: 0;
}

#faction-standings .faction-row.faction-dominant .faction-bonus {
    color: #00cc44;
}

/* ── TICKER THEME: NEON DRIFT ── */

#commodity-ticker.ticker-neon-drift {
    border-top-color: #00ff9930;
    border-bottom-color: #00ff9930;
    background: #050a08;
}

#commodity-ticker.ticker-neon-drift .ticker-symbol {
    color: #00ffcc;
    text-shadow: 0 0 6px #00ffcc88, 0 0 12px #00ffcc44;
}

#commodity-ticker.ticker-neon-drift .ticker-price {
    text-shadow: 0 0 5px currentColor, 0 0 10px currentColor;
}

#commodity-ticker.ticker-neon-drift .tick-up {
    color: #00ff88;
    text-shadow: 0 0 6px #00ff8888, 0 0 14px #00ff8844;
}

#commodity-ticker.ticker-neon-drift .tick-down {
    color: #ff4466;
    text-shadow: 0 0 6px #ff446688, 0 0 14px #ff446644;
}

#commodity-ticker.ticker-neon-drift .ticker-item {
    filter: drop-shadow(0 0 2px currentColor);
}

#commodity-ticker.ticker-neon-drift .ticker-faction {
    color: #448866;
    text-shadow: 0 0 3px #44886644;
}

/* Mobile responsive */
@media (max-width: 600px) {
    #commodity-ticker {
        font-size: 0.65em;
        height: 24px;
        line-height: 24px;
    }
    #ticker-alert {
        font-size: 0.65em;
    }
    #ticker-alert .alert-narrative {
        display: none;
    }
    #faction-standings {
        font-size: 0.65em;
        padding: 2px 4px;
    }
    #faction-standings .faction-name {
        width: 80px;
        font-size: 0.9em;
    }
    #faction-standings .faction-commodity {
        display: none;
    }
    #faction-standings .faction-bonus {
        width: 80px;
        font-size: 0.8em;
    }
}
