/**
 * DataJam Pulse - Live Ticker Styles
 * Phase 5 - CSS Extraction (Batch 1)
 * Extracted: Dec 14, 2025
 * Source: index.html lines 5500-5735
 * Version: v5.4.10
 */

/* ============================================
   LIVE TICKER ENGINE STYLES (v1.1.0)
   ============================================ */
.live-ticker {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(90deg, var(--bg-secondary) 0%, var(--bg-primary) 50%, var(--bg-secondary) 100%);
    border-top: 1px solid var(--border-color);
    z-index: 1000;
    display: flex;
    align-items: center;
    overflow: hidden;
    opacity: 0;
    transform: translateY(100%);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.live-ticker.active {
    opacity: 1;
    transform: translateY(0);
}

.live-ticker-pulse {
    width: 8px;
    height: 8px;
    background: #10B981;
    border-radius: 50%;
    margin: 0 12px 0 16px;
    animation: ticker-pulse 2s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes ticker-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

.live-ticker-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #10B981;
    margin-right: 16px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.live-ticker-content {
    flex: 1;
    overflow: hidden;
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.live-ticker-scroll {
    display: flex;
    gap: 48px;
    animation: ticker-scroll 30s linear infinite;
    white-space: nowrap;
    padding-left: 100%; /* v5.0.2: Start from right edge for full scroll */
}

.live-ticker-scroll:hover {
    animation-play-state: paused;
}

@keyframes ticker-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); } /* v5.0.2: Scroll full width */
}

.live-ticker-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.live-ticker-item-label {
    color: var(--text-muted);
    font-size: 11px;
}

.live-ticker-item-value {
    color: var(--text-primary);
    font-weight: 600;
}

.live-ticker-item-value.positive {
    color: #10B981;
}

.live-ticker-item-value.negative {
    color: #EF4444;
}

.live-ticker-divider {
    width: 1px;
    height: 16px;
    background: var(--border-color);
    flex-shrink: 0;
}

.live-ticker-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px 16px;
    font-size: 16px;
    transition: color 0.2s;
    flex-shrink: 0;
}

.live-ticker-close:hover {
    color: var(--text-primary);
}

.live-ticker-loading {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 13px;
}

.live-ticker-loading-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid var(--border-color);
    border-top-color: var(--primary-pink);
    border-radius: 50%;
    animation: ticker-spin 1s linear infinite;
}

@keyframes ticker-spin {
    to { transform: rotate(360deg); }
}

.live-ticker-error {
    color: var(--text-muted);
    font-size: 12px;
    font-style: italic;
}

/* "Did you know?" fact styles */
.live-ticker-fact {
    display: flex;
    align-items: center;
    gap: 8px;
    animation: ticker-fact-fade 0.5s ease-in-out;
}

.live-ticker-fact-prefix {
    font-size: 12px;
    font-weight: 600;
    color: #F59E0B;
    white-space: nowrap;
}

.live-ticker-fact-text {
    font-size: 13px;
    color: var(--text-primary);
    font-style: italic;
}

@keyframes ticker-fact-fade {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Mode indicator styles */
.live-ticker-label.fallback {
    color: #F59E0B;
}

.ticker-mode-icon {
    margin-right: 4px;
}

/* Adjust main content when ticker is visible */
body.ticker-active {
    padding-bottom: 40px;
    /* iOS safe area */
    padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px));
}

body.ticker-active .version-indicator {
    bottom: calc(52px + env(safe-area-inset-bottom, 0px));
}

/* Adjust Ask Pulse button when ticker is active */
body.ticker-active #pulseChatFab {
    bottom: calc(60px + env(safe-area-inset-bottom, 0px));
}

/* Mobile safe area for ticker */
.live-ticker {
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* Light theme */
[data-theme="light"] .live-ticker {
    background: linear-gradient(90deg, #f8f9fa 0%, #ffffff 50%, #f8f9fa 100%);
    border-top-color: #e0e0e0;
}

[data-theme="light"] .live-ticker-fact-text {
    color: #333;
}

/* v4.1.0: Accessibility - Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .live-ticker-scroll {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
    .live-ticker-pulse {
        animation: none !important;
    }
    .live-ticker-loading-spinner {
        animation: none !important;
    }
    .live-ticker-fact {
        animation: none !important;
    }
}
