/* TD25 Forecast Widget Styles */

.forecast-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 320px;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border: 1px solid rgba(8, 145, 178, 0.4);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    z-index: 900;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    overflow: hidden;
    transition: all 0.3s ease;
}

.forecast-widget.collapsed {
    width: auto;
    height: auto;
}

.forecast-widget.collapsed .forecast-widget-content {
    display: none;
}

.forecast-widget.collapsed .forecast-widget-footer {
    border-top: none;
}

.forecast-widget-header {
    background: linear-gradient(135deg, #0c4a6e 0%, #164e63 100%);
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    border-bottom: 1px solid rgba(8, 145, 178, 0.3);
}

.forecast-widget-header:hover {
    background: linear-gradient(135deg, #0e5a82 0%, #1a5d73 100%);
}

.forecast-widget-title {
    font-size: 13px;
    font-weight: 700;
    color: #22d3ee;
    display: flex;
    align-items: center;
    gap: 6px;
}

.forecast-widget-toggle {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    transition: transform 0.3s ease;
}

.forecast-widget.collapsed .forecast-widget-toggle {
    transform: rotate(180deg);
}

.forecast-widget-content {
    padding: 12px;
    max-height: 400px;
    overflow-y: auto;
}

.forecast-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 8px;
    border-left: 3px solid;
    transition: all 0.2s ease;
}

.forecast-item:last-child {
    margin-bottom: 0;
}

.forecast-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(2px);
}

.forecast-item.bullish {
    border-left-color: #10b981;
}

.forecast-item.bearish {
    border-left-color: #ef4444;
}

.forecast-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.forecast-horizon {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
}

.forecast-signal {
    font-size: 9px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
}

.forecast-signal.buy {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.forecast-signal.sell {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.forecast-signal.hold {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.forecast-item-body {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.forecast-value {
    font-size: 20px;
    font-weight: 700;
    font-family: 'JetBrains Mono', 'SF Mono', monospace;
    color: white;
}

.forecast-value small {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 500;
    margin-left: 4px;
}

.forecast-change {
    font-size: 13px;
    font-weight: 600;
    font-family: 'JetBrains Mono', 'SF Mono', monospace;
}

.forecast-change.positive {
    color: #10b981;
}

.forecast-change.negative {
    color: #ef4444;
}

/* Sentiment Display */
.forecast-item-sentiment {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.6);
    text-transform: capitalize;
}

.forecast-confidence {
    background: rgba(8, 145, 178, 0.2);
    color: #22d3ee;
    padding: 2px 6px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 9px;
}

.forecast-widget-footer {
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.forecast-current {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
}

.forecast-current-value {
    font-weight: 700;
    color: #22d3ee;
    font-family: 'JetBrains Mono', monospace;
}

.forecast-link {
    font-size: 10px;
    color: #0891b2;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.forecast-link:hover {
    color: #22d3ee;
    text-decoration: underline;
}

/* Loading State */
.forecast-loading {
    padding: 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.forecast-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid rgba(8, 145, 178, 0.3);
    border-top-color: #0891b2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Empty State */
.forecast-empty {
    padding: 24px 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.forecast-empty-icon {
    font-size: 32px;
    opacity: 0.5;
}

.forecast-empty-text {
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
}

.forecast-empty-link {
    color: #0891b2;
    font-size: 11px;
    text-decoration: none;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 6px;
    background: rgba(8, 145, 178, 0.15);
    transition: all 0.2s;
}

.forecast-empty-link:hover {
    background: rgba(8, 145, 178, 0.25);
    color: #22d3ee;
}

/* Error State */
.forecast-error {
    padding: 16px;
    text-align: center;
    color: #f87171;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .forecast-widget {
        width: calc(100% - 40px);
        left: 20px;
        right: 20px;
    }
}
