/* ═══════════════════════════════════════════════════════════════════
   LIVE PRODUCT STOCK TICKER CSS
   Isolated styling for the scrolling banner. Prefix: st-
   ═══════════════════════════════════════════════════════════════════ */

.st-wrapper {
    flex: 1;
    overflow: hidden;
    position: relative;
    height: 38px;
    display: flex;
    align-items: center;
    margin-left: var(--spacing-lg, 24px);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.st-category-badge {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    background: linear-gradient(135deg, #1f2937, #111827);
    color: #f3f4f6;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 1px;
    z-index: 10;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.2);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    text-transform: uppercase;
}

.st-track {
    display: flex;
    align-items: center;
    white-space: nowrap;
    will-change: transform;
    animation: st-scroll linear infinite;
    padding-left: 120px; /* offset for badge */
}

.st-item {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    margin: 0 8px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.1);
    color: #1f2937;
    font-size: 0.85rem;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.st-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2), 0 1px 3px rgba(0, 0, 0, 0.15);
}

.st-brand {
    margin-right: 8px;
    color: #374151;
}

.st-movement {
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: 0.8rem;
}

.st-up {
    color: #10b981;
}
.st-down {
    color: #ef4444;
}
.st-stable {
    color: #6b7280;
}

.st-indicator {
    margin-right: 4px;
    font-size: 0.75rem;
}

/* Animations */
@keyframes st-scroll {
    from {
        transform: translateX(100vw);
    }
    to {
        transform: translateX(-100vw);
    }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .st-track {
        animation: none;
        transform: translateX(0);
        overflow-x: auto;
    }
    .st-wrapper {
        overflow-x: auto;
    }
    .st-item:hover {
        transform: none;
    }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .st-wrapper {
        margin-left: 0;
        margin-top: 8px;
        width: 100%;
    }
    /* Hide on very small screens if it conflicts with logo */
    @media (max-width: 480px) {
        .st-wrapper {
            height: 32px;
        }
        .st-category-badge {
            padding: 0 10px;
            font-size: 0.7rem;
        }
        .st-item {
            font-size: 0.75rem;
            padding: 2px 8px;
        }
        .st-track {
            padding-left: 80px;
        }
    }
}
