/**
 * Стили для новой бегущей строки CBAR
 */

/* Контейнер для бегущей строки */
.cbar-new-ticker-container {
    position: relative;
    background-color: var(--color-primary-dark);
    color: white;
    padding: 0;
    margin-top: 10px;
    margin-bottom: 10px;
    border-radius: 4px;
    overflow: hidden;
}

/* Разделительная линия над тикером */
.cbar-new-ticker-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--color-primary-light);
}

/* Заголовок тикера */
.cbar-new-ticker-header {
    display: flex;
    align-items: center;
    padding: 8px 15px;
    background-color: var(--color-primary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.cbar-new-ticker-title {
    font-weight: bold;
    font-size: 14px;
    display: flex;
    align-items: center;
}

.cbar-new-ticker-indicator {
    display: inline-block;
    margin-right: 8px;
    animation: pulse 2s infinite;
}

/* Область бегущей строки */
.cbar-new-ticker-wrapper {
    position: relative;
    overflow: hidden;
    padding: 10px 0;
    white-space: nowrap;
}

/* Сама бегущая строка */
.cbar-new-ticker {
    display: inline-block;
    white-space: nowrap;
    font-family: 'Courier New', monospace; /* Моноширинный шрифт */
    animation: tickerScroll 30s linear infinite;
}

/* Элемент бегущей строки */
.ticker-item {
    display: inline-block;
    margin-right: 30px;
    padding: 5px 10px;
    font-size: 14px;
    border-radius: 3px;
    background-color: rgba(255, 255, 255, 0.05);
}

/* Код валюты */
.ticker-code {
    font-weight: bold;
    margin-right: 3px;
}

/* Значение валюты */
.ticker-value {
    font-weight: normal;
    margin-right: 3px;
}

/* Флаг валюты */
.flag-icon {
    width: 16px;
    height: 12px;
    margin-right: 5px;
    vertical-align: middle;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Стили для трендов */
.trend-up {
    color: #4CAF50;
    font-size: 12px;
}

.trend-down {
    color: #F44336;
    font-size: 12px;
}

.trend-equal {
    color: #FFC107;
    font-size: 12px;
}

/* Анимация для индикатора */
@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        opacity: 1;
    }
}

/* Анимация для бегущей строки */
@keyframes tickerScroll {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* Медиа-запросы для адаптивности */
@media (max-width: 768px) {
    .cbar-new-ticker-title {
        font-size: 12px;
    }
    
    .ticker-item {
        font-size: 12px;
        margin-right: 20px;
        padding: 3px 8px;
    }
}

@media (max-width: 576px) {
    .cbar-new-ticker-header {
        padding: 5px 10px;
    }
    
    .cbar-new-ticker-title {
        font-size: 11px;
    }
    
    .ticker-item {
        font-size: 11px;
        margin-right: 15px;
        padding: 2px 5px;
    }
    
    .flag-icon {
        width: 14px;
        height: 10px;
    }
}
