/* =============================================================================
   REUSABLE TICKER COMPONENT - СУПЕР КАЧЕСТВО 2025
   Полностью независимый компонент для вставки КУДА УГОДНО
   ============================================================================= */

/* ===== CONTAINER STYLES ===== */
.ticker-component {
    position: fixed;
    top: 0;
    left: 72px; /* После sidebar */
    right: 0;
    height: 50px;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(210, 105, 30, 0.3);
    z-index: 1000;
    overflow: hidden;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* ===== TICKER TRACK ===== */
.ticker-track {
    display: flex;
    height: 100%;
    align-items: center;
    white-space: nowrap;
    animation: tickerScroll 45s linear infinite;
    will-change: transform;
    transform: translateZ(0); /* GPU acceleration */
    backface-visibility: hidden;
}

/* ===== TICKER ITEMS ===== */
.ticker-item {
    display: inline-flex;
    align-items: center;
    padding: 0 30px;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.ticker-item:hover {
    transform: scale(1.02);
    opacity: 0.8;
}

.ticker-item:active {
    transform: scale(0.98);
}

/* ===== BADGES ===== */
.ticker-badge {
    display: inline-block;
    background: linear-gradient(135deg, #D2691E 0%, #FF8C00 100%);
    color: white;
    padding: 4px 10px;
    border-radius: 14px;
    font-size: 11px;
    font-weight: 700;
    margin-right: 10px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(210, 105, 30, 0.3);
}

/* ===== TEXT CONTENT ===== */
.ticker-text {
    color: rgba(255, 255, 255, 0.95);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.2;
}

/* ===== KEYFRAMES - SMOOTH 60FPS ===== */
@keyframes tickerScroll {
    0% { 
        transform: translateX(100%); 
    }
    100% { 
        transform: translateX(-100%); 
    }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .ticker-component {
        left: 60px; /* Smaller sidebar на mobile */
        height: 45px;
        font-size: 12px;
    }
    
    .ticker-track {
        animation-duration: 35s; /* Faster на mobile */
    }
    
    .ticker-item {
        padding: 0 20px;
    }
    
    .ticker-badge {
        font-size: 10px;
        padding: 3px 8px;
        margin-right: 8px;
    }
    
    .ticker-text {
        font-size: 12px;
    }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    .ticker-track {
        animation: none;
        transform: translateX(0);
        overflow-x: auto;
        overflow-y: hidden;
        scroll-behavior: smooth;
    }
    
    .ticker-item {
        margin-right: 20px;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .ticker-component {
        display: none;
    }
}

/* ===== THEME VARIANTS ===== */
.ticker-component.theme-light {
    background: rgba(255, 255, 255, 0.95);
    border-bottom-color: rgba(210, 105, 30, 0.2);
}

.ticker-component.theme-light .ticker-text {
    color: rgba(0, 0, 0, 0.8);
}

.ticker-component.theme-transparent {
    background: transparent;
    border-bottom: none;
}

/* ===== PERFORMANCE OPTIMIZATIONS ===== */
.ticker-component * {
    box-sizing: border-box;
}

.ticker-track,
.ticker-item,
.ticker-badge {
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* ===== SIZE VARIANTS ===== */
.ticker-component.size-large {
    height: 60px;
}

.ticker-component.size-large .ticker-text {
    font-size: 15px;
}

.ticker-component.size-large .ticker-badge {
    font-size: 12px;
    padding: 6px 12px;
}

.ticker-component.size-small {
    height: 40px;
}

.ticker-component.size-small .ticker-text {
    font-size: 11px;
}

.ticker-component.size-small .ticker-badge {
    font-size: 9px;
    padding: 2px 6px;
}