/* Financial Ticker Frontend Styles */

.financial-ticker-wrapper {
    width: 100%;
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
}

.financial-ticker-container {
    width: 100%;
    overflow: hidden;
    background: #1a1a1a;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    padding: 10px 0;
    display: flex;
    align-items: stretch;
}

/* Fixed Title Tile */
.ticker-title-tile {
    flex-shrink: 0;
    width: 280px;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border-right: 3px solid rgba(255, 255, 255, 0.1);
    z-index: 10;
}

.ticker-title-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.ticker-title-tile .ticker-report-name {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 10px;
    line-height: 1.3;
}

.ticker-title-tile .ticker-report-period {
    font-size: 14px;
    font-weight: 600;
    color: #3498db;
    background: rgba(52, 152, 219, 0.2);
    padding: 6px 16px;
    border-radius: 20px;
    border: 1px solid rgba(52, 152, 219, 0.3);
}

.financial-ticker-track {
    display: flex;
    animation: scroll-ticker 30s linear infinite;
    white-space: nowrap;
}

/* Pause animation on hover */
.financial-ticker-container:hover .financial-ticker-track {
    animation-play-state: paused;
}

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

/* Ticker Items - Each with distinct background color */
.ticker-item {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px 30px;
    margin: 0 5px;
    border-radius: 6px;
    min-width: 250px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ticker-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.ticker-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.9);
}

.ticker-value {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
}

.ticker-change {
    display: block;
    font-size: 11px;
    font-weight: 600;
    margin-top: 5px;
    padding: 3px 8px;
    border-radius: 12px;
    text-align: center;
}

.ticker-change.increase {
    background: rgba(76, 175, 80, 0.3);
    color: #a8e063;
}

.ticker-change.increase::before {
    content: '▲ ';
}

.ticker-change.decrease {
    background: rgba(244, 67, 54, 0.3);
    color: #ff6b6b;
}

.ticker-change.decrease::before {
    content: '▼ ';
}

/* Distinct Background Colors for Each Metric */

/* Revenue - Deep Blue */
.ticker-revenue {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
}

/* Gross Margin - Teal */
.ticker-gross-margin {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

/* Operating Profit - Purple */
.ticker-operating-profit {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Profit for Period - Orange */
.ticker-profit-period {
    background: linear-gradient(135deg, #f2994a 0%, #f2c94c 100%);
}

/* Headline EPS - Pink/Magenta */
.ticker-eps {
    background: linear-gradient(135deg, #ee0979 0%, #ff6a00 100%);
}

/* Interim Dividends - Green */
.ticker-dividends {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e063 100%);
}

/* Total Equity - Indigo */
.ticker-equity {
    background: linear-gradient(135deg, #4e54c8 0%, #8f94fb 100%);
}

/* Net Cash Generated - Cyan/Blue */
.ticker-cash {
    background: linear-gradient(135deg, #00b4db 0%, #0083b0 100%);
}


/* Notice for no active report */
.financial-ticker-notice {
    padding: 20px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    color: #856404;
    text-align: center;
    font-weight: 500;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .financial-ticker-container {
        flex-direction: column;
    }
    
    .ticker-title-tile {
        width: 100%;
        border-right: none;
        border-bottom: 3px solid rgba(255, 255, 255, 0.1);
        padding: 15px;
    }
    
    .ticker-title-tile .ticker-report-name {
        font-size: 16px;
    }
    
    .ticker-title-tile .ticker-report-period {
        font-size: 13px;
    }
    
    .ticker-item {
        min-width: 200px;
        padding: 12px 20px;
    }
    
    .ticker-label {
        font-size: 11px;
    }
    
    .ticker-value {
        font-size: 16px;
    }
}

@media screen and (max-width: 480px) {
    .ticker-item {
        min-width: 180px;
        padding: 10px 15px;
    }
    
    .ticker-label {
        font-size: 10px;
    }
    
    .ticker-value {
        font-size: 14px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .financial-ticker-track {
        animation: none;
    }
}
