/* Real-time Stock Data Styles */

/* Loading states for stock data */
.stock-data-loading {
    opacity: 0.6;
    pointer-events: none;
}

.stock-data-loading .stock-name,
.stock-data-loading .stock-price,
.stock-data-loading .stock-change {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading-shimmer 1.5s infinite;
    border-radius: 4px;
    color: transparent;
}

@keyframes loading-shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Smooth transitions for stock data updates */
.stock-name,
.stock-symbol,
.stock-price,
.stock-change,
.analysis-value {
    transition: all 0.3s ease-in-out;
}

/* Enhanced stock change indicators */
.stock-change.positive {
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

.stock-change.negative {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

/* Chart animation improvements */
.chart-line {
    transition: stroke 0.3s ease-in-out;
}

.chart-area-path {
    transition: fill 0.3s ease-in-out;
}

/* Chart time container styling */
.chart-time-container {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.chart-time {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 500;
}

/* Real-time indicator */
.realtime-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: #10b981;
    font-weight: 500;
}

.realtime-indicator::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #10b981;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

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

/* Error state styling */
.stock-data-error {
    color: #ef4444;
    font-size: 0.875rem;
    text-align: center;
    padding: 8px;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 4px;
    margin: 8px 0;
}

/* Responsive adjustments for stock data */
@media (max-width: 768px) {
    .stock-name {
        font-size: 0.9rem;
    }
    
    .stock-price {
        font-size: 1.1rem;
    }
    
    .stock-change {
        font-size: 0.8rem;
    }
    
    .analysis-value {
        font-size: 0.85rem;
    }
}

/* Enhanced visual feedback for data updates */
.stock-data-updated {
    animation: data-update-flash 0.5s ease-in-out;
}

@keyframes data-update-flash {
    0% {
        background-color: rgba(16, 185, 129, 0.2);
    }
    100% {
        background-color: transparent;
    }
}
