/* Market Ticker Bar */
.market-ticker {
    position: relative;
    background: #242b3d;
    border-bottom: 1px solid #2a3142;
    height: 35px;
    overflow: hidden;
    z-index: 50;
}

.ticker-container {
    height: 100%;
    width: 100%;
    overflow: hidden;
    position: relative;
}

.ticker-content {
    display: flex;
    align-items: center;
    height: 100%;
    animation: scroll-left 60s linear infinite;
    white-space: nowrap;
    will-change: transform;
}

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

.ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 24px;
    height: 100%;
    flex-shrink: 0;
    border-right: 1px solid #2a3142;
    transition: background-color 0.3s ease;
}

.ticker-item:hover {
    background-color: #1a1f2e;
}

.market-flag {
    font-size: 16px;
    flex-shrink: 0;
}

.market-name {
    font-size: 14px;
    font-weight: 400;
    color: #e8eaed;
    flex-shrink: 0;
}

.market-info {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
}

.market-text {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.market-status {
    font-size: 13px;
    /* font-weight: 600; */
    font-family: 'Monaco', 'Menlo', monospace;
    letter-spacing: 0.3px;
    padding: 0;
    border-radius: 0;
    flex-shrink: 0;
    text-align: center;
    transition: all 0.3s ease;
}

/* Status Colors */
.market-status.open {
    background: none;
    color: #22c55e;
    border: none;
}

.market-status.closed {
    background: none;
    color: #94a3b8;
    border: none;
}

.market-status.opening-soon {
    background: none;
    color: #eab308;
    border: none;
}

.market-status.break {
    background: none;
    color: #f97316;
    border: none;
}

/* Progress Bar */
.market-progress-bar {
    width: 100%;
    height: 2px;
    background: rgba(148, 163, 184, 0.3);
    border-radius: 1px;
    overflow: hidden;
    margin-top: 1px;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #eab308, #d97706);
    border-radius: 1px;
    transition: width 0.3s ease, background 0.3s ease;
}

.progress-fill.open {
    background: linear-gradient(90deg, #eab308, #d97706);
}

.progress-fill.opening-soon {
    background: linear-gradient(90deg, #eab308, #d97706);
}

/* Progress color based on percentage */
.progress-fill.progress-0-50 {
    background: linear-gradient(90deg, #eab308, #d97706); /* Amarelo */
}

.progress-fill.progress-50-90 {
    background: linear-gradient(90deg, #f97316, #ea580c); /* Laranja */
}

.progress-fill.progress-90-100 {
    background: linear-gradient(90deg, rgb(255 60 60 / 54%), #dc2626); /* Vermelho */
}

/* Pulse Animations */

@keyframes pulse-warning {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 5px rgba(234, 179, 8, 0.3);
    }
    50% {
        opacity: 0.8;
        box-shadow: 0 0 10px rgba(234, 179, 8, 0.5);
    }
}

/* Pause animation on hover */
.market-ticker:hover .ticker-content {
    animation-play-state: paused;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .market-ticker {
        height: 30px;
    }
    
    .ticker-item {
        padding: 0 16px;
        gap: 6px;
    }
    
    .market-flag {
        font-size: 12px;
    }
    
    .market-name {
        font-size: 11px;
        min-width: 50px;
    }
    
    .market-status {
        font-size: 10px;
        padding: 1px 6px;
        min-width: 45px;
    }
    
    .ticker-content {
        animation: scroll-left 25s linear infinite;
    }
}

/* Extra smooth scrolling for better performance */
.ticker-content {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}