/**
 * CRYPTO TICKER CSS - SHARED/css/components/ticker.css
 * CORREÇÃO FINAL: Gradiente cinza escuro
 */

/* Container principal */
.ticker-container {
    background: linear-gradient(135deg, #1a1a1a 0%, #0f0f0f 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 15px;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Track do ticker - loop infinito */
.ticker-track {
    display: flex;
    gap: 30px;
    animation: scroll-smooth 120s linear infinite;
    width: fit-content;
}

/* Item individual da moeda */
.ticker-item {
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    flex-shrink: 0;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
    cursor: pointer;
}

/* HOVER EFFECT - Levantar e clarear */
.ticker-item:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Symbol da moeda */
.coin-symbol {
    color: #ffffff;
    font-weight: bold;
    min-width: 40px;
    transition: color 0.3s ease;
}

.ticker-item:hover .coin-symbol {
    color: #FFD700;
}

/* Preço da moeda */
.coin-price {
    color: #ffd700;
    font-weight: 600;
    min-width: 100px;
    transition: color 0.3s ease;
}

.ticker-item:hover .coin-price {
    color: #FFED4E;
}

/* Variação 24h */
.coin-change {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    min-width: 60px;
    text-align: center;
    transition: all 0.3s ease;
}

/* Tendências de preço */
.positive {
    color: #00ff88;
    background: rgba(0, 255, 136, 0.1);
}

.negative {
    color: #ff4757;
    background: rgba(255, 71, 87, 0.1);
}

/* HOVER NAS VARIAÇÕES - Cores mais claras */
.ticker-item:hover .positive {
    color: #33FF99;
    background: rgba(0, 255, 136, 0.2);
}

.ticker-item:hover .negative {
    color: #FF6B7A;
    background: rgba(255, 71, 87, 0.2);
}

/* ANIMAÇÃO LOOP INFINITO PERFEITO */
@keyframes scroll-smooth {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Efeito fade nas bordas */
.ticker-container::before,
.ticker-container::after {
    content: '';
    position: absolute;
    top: 0;
    width: 50px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.ticker-container::before {
    left: 0;
    background: linear-gradient(to right, #1a1a1a, transparent);
}

.ticker-container::after {
    right: 0;
    background: linear-gradient(to left, #0f0f0f, transparent);
}

/* Pausar animação no hover */
.ticker-container:hover .ticker-track {
    animation-play-state: paused;
}

/* HOVER NO CONTAINER - Não afetar items individuais */
.ticker-container:hover .ticker-item:not(:hover) {
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

/* Estado de erro */
.crypto-ticker-error {
    text-align: center;
    padding: 20px;
    color: #ff4757;
    background: rgba(255, 71, 87, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(255, 71, 87, 0.2);
    font-size: 14px;
}

/* Responsividade mobile-first */
@media (max-width: 768px) {
    .ticker-container {
        padding: 10px;
    }
    
    .ticker-track {
        gap: 20px;
        animation-duration: 80s; /* Mais rápido no mobile */
    }
    
    .ticker-item {
        gap: 8px;
    }
    
    .coin-symbol {
        font-size: 11px;
        min-width: 30px;
    }
    
    .coin-price {
        font-size: 12px;
        min-width: 80px;
    }
    
    .coin-change {
        font-size: 10px;
        min-width: 50px;
        padding: 2px 6px;
    }
}

@media (max-width: 480px) {
    .ticker-track {
        gap: 15px;
        animation-duration: 60s; /* Ainda mais rápido em telas pequenas */
    }
    
    .coin-change {
        min-width: 45px;
    }
}
