/**
 * Стили для LIVE-блока CBAR
 * Современный дизайн с градиентами и эффектами
 */

.cbar-live-section {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #ffffff;
    padding: 40px 0;
    margin-top: -30px;
    margin-bottom: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.3);
}

/* Декоративные элементы */
.cbar-live-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 200%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, rgba(99, 102, 241, 0) 70%);
    z-index: 0;
}

.cbar-live-section::after {
    content: '';
    position: absolute;
    bottom: -50%;
    left: -50%;
    width: 100%;
    height: 200%;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.1) 0%, rgba(14, 165, 233, 0) 70%);
    z-index: 0;
}

.cbar-live-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
    position: relative;
    z-index: 1;
}

.cbar-live-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.cbar-live-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 80px;
    height: 2px;
    background: linear-gradient(90deg, #4cc9f0, #4361ee);
}

.cbar-live-title {
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.cbar-live-indicator {
    color: var(--color-primary-light); /* Заменяем красный на светлый цвет логотипа */
    animation: pulse 2s infinite;
    font-size: 1.1em;
}

.cbar-source {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    background-color: rgba(255, 255, 255, 0.05);
    padding: 6px 12px;
    border-radius: 20px;
    backdrop-filter: blur(5px);
}

.cbar-live-update-time {
    font-size: 0.9rem;
    color: #4cc9f0;
    font-weight: 500;
}

.cbar-main-rate {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 2rem;
    font-weight: 700;
    padding: 20px 0;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    margin: 10px 0;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.cbar-main-rate.updating {
    opacity: 0.5;
    transform: scale(0.98);
}

.cbar-main-rate:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
}

.cbar-rate-code {
    color: #4cc9f0;
    text-shadow: 0 0 15px rgba(76, 201, 240, 0.5);
    font-weight: 800;
}

.cbar-rate-value {
    color: #ffffff;
    font-family: 'Inter', monospace;
    letter-spacing: -0.5px;
}

.cbar-rate-arrow {
    font-size: 1.5rem;
    margin: 0 10px;
    position: relative;
    top: 2px;
    font-weight: 900;
    text-shadow: 0 0 10px currentColor;
}

.cbar-ticker-container {
    position: relative;
    overflow: hidden;
    height: 50px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(5px);
    width: 100%;
}

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

.cbar-ticker-container::before {
    left: 0;
    background: linear-gradient(90deg, rgba(15, 23, 42, 1) 0%, rgba(15, 23, 42, 0) 100%);
}

.cbar-ticker-container::after {
    right: 0;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0) 0%, rgba(15, 23, 42, 1) 100%);
}

.cbar-ticker {
    display: flex;
    position: absolute;
    white-space: nowrap;
    animation: ticker 180s linear infinite;
    padding: 15px 0;
    width: max-content;
    min-width: 100%;
    left: 0;
    top: 0;
}

.ticker-item {
    display: inline-flex;
    align-items: center;
    margin-right: 40px;
    font-size: 1rem;
    position: relative;
    transition: all 0.3s ease;
}

.ticker-item:hover {
    transform: scale(1.05);
}

.ticker-item::after {
    content: '•';
    position: absolute;
    right: -22px;
    color: rgba(255, 255, 255, 0.3);
}

.ticker-item:last-child::after {
    display: none;
}

.ticker-code {
    font-weight: 700;
    color: #4cc9f0;
    margin-right: 5px;
    letter-spacing: 0.5px;
}

.ticker-value {
    font-weight: 600;
    font-family: 'Inter', monospace;
    letter-spacing: -0.5px;
}

.rate-up {
    color: #4ade80;
    margin-left: 5px;
    font-weight: bold;
    text-shadow: 0 0 8px rgba(74, 222, 128, 0.5);
}

.rate-down {
    color: #f87171;
    margin-left: 5px;
    font-weight: bold;
    text-shadow: 0 0 8px rgba(248, 113, 113, 0.5);
}

.rate-equal {
    color: #d4d4d4;
    margin-left: 5px;
    font-weight: bold;
}

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

/* Дополнительные стили для обеспечения видимости всех валют */
.cbar-ticker {
    will-change: transform;
}

.ticker-item {
    flex-shrink: 0;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        opacity: 1;
    }
}

@keyframes glow {
    0% {
        text-shadow: 0 0 5px currentColor;
    }
    50% {
        text-shadow: 0 0 15px currentColor, 0 0 30px currentColor;
    }
    100% {
        text-shadow: 0 0 5px currentColor;
    }
}

/* Адаптивность */
@media (max-width: 992px) {
    .cbar-live-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .cbar-main-rate {
        font-size: 1.7rem;
        padding: 15px 0;
    }
}

@media (max-width: 768px) {
    .cbar-live-section {
        padding: 30px 0;
    }
    
    .cbar-main-rate {
        font-size: 1.5rem;
    }
    
    .cbar-ticker-container {
        height: 45px;
    }
    
    .cbar-ticker {
        padding: 12px 0;
    }
    
    .ticker-item {
        margin-right: 30px;
        font-size: 0.9rem;
    }
    
    .ticker-item::after {
        right: -18px;
    }
}

@media (max-width: 576px) {
    .cbar-live-section {
        padding: 25px 0;
    }
    
    .cbar-live-title {
        font-size: 1.1rem;
    }
    
    .cbar-source {
        font-size: 0.75rem;
        padding: 4px 10px;
    }
    
    .cbar-main-rate {
        font-size: 1.3rem;
        padding: 12px 0;
        gap: 10px;
    }
    
    .cbar-rate-arrow {
        font-size: 1.2rem;
        margin: 0 5px;
    }
    
    .cbar-ticker-container {
        height: 40px;
    }
    
    .cbar-ticker {
        padding: 10px 0;
    }
    
    .ticker-item {
        margin-right: 25px;
        font-size: 0.85rem;
    }
    
    .ticker-item::after {
        right: -15px;
    }
}
