/* Additional CSS for enhanced dashboard styling */
.gradient-bg { 
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); 
}

.card-shadow { 
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); 
}

.loading { 
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; 
}

.ticker-badge { 
    transition: all 0.3s ease;
    cursor: pointer;
}

.ticker-badge:hover { 
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
}

.status-connected {
    background-color: #10B981;
    animation: pulse 2s infinite;
}

.status-error {
    background-color: #EF4444;
}

.metric-card {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.score-high {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: white;
}

.score-medium {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    color: white;
}

.score-low {
    background: linear-gradient(135deg, #6B7280 0%, #4B5563 100%);
    color: white;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.5s ease-out forwards;
}

.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

.mini-chart {
    height: 150px;
    width: 100%;
}

/* Chart specific styling */
canvas {
    max-height: 100% !important;
    max-width: 100% !important;
}

.chart-wrapper {
    position: relative;
    height: 16rem; /* h-64 equivalent */
    width: 100%;
    padding: 0.5rem;
}

/* Ensure charts are properly contained */
.chart-wrapper canvas {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
}

/* Tooltip styling */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltip-text {
    visibility: hidden;
    width: 240px;
    background-color: #1f2937;
    color: #fff;
    text-align: left;
    border-radius: 6px;
    padding: 8px 12px;
    position: absolute;
    z-index: 1000;
    bottom: 125%;
    left: 50%;
    margin-left: -120px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 11px;
    line-height: 1.4;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.tooltip .tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #1f2937 transparent transparent transparent;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Mobile tooltip adjustments */
@media (max-width: 768px) {
    .tooltip .tooltip-text {
        width: 200px;
        margin-left: -100px;
        font-size: 10px;
        padding: 6px 10px;
    }
}

/* Enhanced group hover for Alpine.js */
.group:hover .group-hover\:block {
    display: block !important;
}

/* Ensure tooltips appear above other elements */
.tooltip-text,
.group-hover\:block {
    z-index: 9999 !important;
}

/* Data source indicators */
.data-source-enhanced {
    background: linear-gradient(135deg, #3B82F6 0%, #1D4ED8 100%);
    color: white;
    animation: pulse-enhanced 2s ease-in-out infinite alternate;
}

.data-source-basic {
    background: linear-gradient(135deg, #6B7280 0%, #4B5563 100%);
    color: white;
}

@keyframes pulse-enhanced {
    from { 
        box-shadow: 0 0 5px rgba(59, 130, 246, 0.5); 
    }
    to { 
        box-shadow: 0 0 20px rgba(59, 130, 246, 0.8); 
    }
}

/* Enhanced options data section */
.enhanced-options {
    background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
    border: 1px solid #BFDBFE;
    animation: glow-blue 3s ease-in-out infinite alternate;
}

@keyframes glow-blue {
    from { 
        box-shadow: 0 0 5px rgba(59, 130, 246, 0.2); 
    }
    to { 
        box-shadow: 0 0 15px rgba(59, 130, 246, 0.4); 
    }
}

/* Data source dots */
.source-dot-enhanced {
    background: #3B82F6;
    box-shadow: 0 0 6px rgba(59, 130, 246, 0.6);
    animation: pulse-dot 2s ease-in-out infinite;
}

.source-dot-basic {
    background: #6B7280;
}

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