/**
 * Crypto Ticker Styles for CryptoNinjaTrades
 * Static site version
 */

/* Main ticker container */
.crypto-ticker {
    width: 100%;
    overflow: hidden;
    background: rgba(26, 26, 26, 0.8);
    height: 48px;
    border-top: 1px solid rgba(87, 120, 144, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.ticker-wrap {
    width: 100%;
    padding: 0;
    height: 48px;
    overflow: hidden;
}

.ticker-container {
    display: inline-flex;
    height: 100%;
    line-height: 48px;
    white-space: nowrap;
    padding-right: 100%; /* important to apply animation properly */
}

/* Animation for the ticker */
.ticker-animation {
    animation: ticker 120s linear infinite; /* Slowed down further to 120s (2 minutes) */
}

@keyframes ticker {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* When hovering over the ticker, pause the animation */
.crypto-ticker:hover .ticker-animation {
    animation-play-state: paused;
}

/* Individual ticker items */
.ticker-item {
    display: inline-flex;
    align-items: center;
    padding: 0 20px;
    height: 100%;
    position: relative;
    text-decoration: none;
    color: inherit;
    transition: background-color 0.2s ease;
}

.ticker-item:hover {
    background-color: rgba(55, 95, 124, 0.2);
}

.ticker-item:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 25%;
    height: 50%;
    width: 1px;
    background: rgba(87, 120, 144, 0.3);
}

/* Symbol, price and change styling */
.ticker-symbol {
    font-weight: 600;
    margin-right: 12px;
    font-family: 'Montserrat', sans-serif;
    letter-spacing: 0.5px;
}

.ticker-price {
    font-weight: 600;
    margin-right: 8px;
    font-family: 'Montserrat', sans-serif;
}

.ticker-change {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: 600;
}

.ticker-change.positive {
    color: #00ffaa;
    background-color: rgba(0, 255, 170, 0.1);
}

.ticker-change.negative {
    color: #ff4757;
    background-color: rgba(255, 71, 87, 0.1);
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .ticker-item {
        padding: 0 15px;
    }
    
    .ticker-symbol {
        margin-right: 8px;
    }
}

/* Animation speed variations */
@media (prefers-reduced-motion) {
    .ticker-animation {
        animation: ticker 180s linear infinite; /* even slower for accessibility */
    }
}
