/* Forecasting Page Styles */

/* Dashboard Header - matching options dashboard */
.dashboard-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dashboard-header h1 {
    font-size: 28px;
    font-weight: 600;
    color: #ffffff;
    margin: 10px 0;
}

.dashboard-header p {
    color: #b0b0b0;
    font-size: 16px;
    margin: 5px 0;
}

.dashboard-subtitle {
    font-size: 14px !important;
    opacity: 0.9;
    color: #d0d0d0 !important;
    margin: 8px 0 !important;
}

/* Override ticker-selector to remove grid styling */
.ticker-selector {
    display: block !important;
    background: none !important;
}

/* Ticker Button Styles */
.ticker-btn {
    display: inline-block;
    padding: 10px 15px;
    margin: 5px;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    min-width: 60px;
}

.ticker-btn:hover {
    background: #2a2a2a;
    border-color: #4a9eff;
}

.ticker-btn.active {
    background: linear-gradient(135deg, #4a9eff 0%, #00ff88 100%);
    color: #000;
    border-color: #4a9eff;
    box-shadow: 0 0 15px rgba(74, 158, 255, 0.5);
}

.ticker-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ticker-btn.disabled:hover {
    background: #1a1a1a;
    border-color: #333;
}

.ticker-tier {
    font-size: 10px;
    color: #888;
    display: block;
    margin-top: 2px;
    white-space: nowrap;
}

/* Timeframe Button Styles */
.timeframe-btn {
    display: inline-block;
    padding: 10px 20px;
    margin: 5px;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.timeframe-btn:hover {
    background: #2a2a2a;
    border-color: #4a9eff;
}

.timeframe-btn.active {
    background: linear-gradient(135deg, #4a9eff 0%, #00ff88 100%);
    color: #000;
    border-color: #4a9eff;
    box-shadow: 0 0 15px rgba(74, 158, 255, 0.5);
}

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #3B82F6;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Metadata Bar */
.metadata-bar {
    background: rgba(17, 25, 40, 0.5);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.metadata-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10B981;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Chart Containers */
.chart-container {
    position: relative;
    width: 100%;
    height: 400px;
}

.tradingview-chart {
    width: 100%;
    height: 400px;
    background: #131722;
    border-radius: 4px;
    position: relative;
    overflow: visible;
}

/* Custom time label positioning */
#tradingview-chart {
    position: relative;
    margin-bottom: 30px; /* Space for custom time label */
}

.volume-chart {
    width: 100%;
    height: 100px;
    background: #131722;
    border-radius: 4px;
    margin-top: 10px;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .container.dashboard-container {
        padding: 100px 15px 0 15px; /* Maintain navbar padding on mobile */
    }
    
    .chart-header {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 8px;
    }
    
    #chart-title {
        font-size: 14px !important;
    }
    
    #timezone-display {
        font-size: 10px !important;
    }
    
    #forecast-info {
        font-size: 10px !important;
        text-align: left !important;
    }
    
    .ticker-btn, .timeframe-btn {
        padding: 8px 12px;
        font-size: 12px;
        margin: 3px;
    }
    
    .ticker-selection-section {
        padding: 15px !important;
    }
    
    .dashboard-header h1 {
        font-size: 24px;
    }
    
    .dashboard-header p {
        font-size: 14px;
    }
    
    .dashboard-subtitle {
        font-size: 13px !important;
    }
    
    .tradingview-chart {
        height: 300px;
    }
}

@media (max-width: 480px) {
    .container.dashboard-container {
        padding: 100px 10px 0 10px; /* Keep navbar padding, reduce side padding */
    }
    
    #chart-title {
        font-size: 13px !important;
    }
    
    .ticker-btn, .timeframe-btn {
        padding: 6px 10px;
        font-size: 11px;
        min-width: 45px;
    }
    
    .ticker-tier {
        font-size: 9px;
    }
    
    .dashboard-header h1 {
        font-size: 20px;
    }
    
    .dashboard-header p {
        font-size: 11px;
        line-height: 1.4;
    }
    
    .dashboard-subtitle {
        font-size: 12px !important;
    }
    
    .tradingview-chart {
        height: 250px;
    }
    
    #chart-legend {
        font-size: 10px !important;
        padding: 6px !important;
    }
    
    .section {
        padding: 15px;
    }
}