/* Holdings Time Series Widget Styles */

.timeseries-widget {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.timeseries-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.timeseries-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
}

.timeseries-controls {
    display: flex;
    gap: 12px;
    align-items: center;
}

.timeseries-period-btn {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 6px;
    color: #a0aec0;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.timeseries-period-btn:hover {
    background: rgba(0, 212, 255, 0.1);
    color: #00d4ff;
    border-color: #00d4ff;
}

.timeseries-period-btn.active {
    background: linear-gradient(135deg, #00d4ff, #7c3aed);
    color: #ffffff;
    border-color: transparent;
}

#timeseries-days-select {
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 6px;
    color: #e0e6ed;
    font-size: 0.9rem;
    cursor: pointer;
}

.timeseries-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.timeseries-stat-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 16px;
    border-radius: 8px;
    border-left: 3px solid #00d4ff;
}

.timeseries-stat-label {
    font-size: 0.85rem;
    color: #a0aec0;
    margin-bottom: 8px;
}

.timeseries-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #00d4ff;
}

.timeseries-chart-container {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
    height: 400px;
}

.timeseries-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.timeseries-section {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    padding: 20px;
}

.timeseries-section-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0, 212, 255, 0.2);
}

.timeseries-fund-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 212, 255, 0.1);
}

.timeseries-fund-card:hover {
    background: rgba(0, 212, 255, 0.05);
    border-color: #00d4ff;
    transform: translateX(4px);
}

.fund-rank {
    font-size: 1.2rem;
    font-weight: 700;
    color: #00d4ff;
    min-width: 40px;
    text-align: center;
}

.fund-info {
    flex: 1;
}

.fund-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #e0e6ed;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fund-manager {
    font-size: 0.8rem;
    color: #a0aec0;
}

.fund-stats {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 180px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.stat-label {
    font-size: 0.8rem;
    color: #a0aec0;
}

.stat-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: #e0e6ed;
}

.stat-value.buying {
    color: #10b981;
}

.stat-value.selling {
    color: #ef4444;
}

.no-data {
    text-align: center;
    padding: 40px 20px;
    color: #a0aec0;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
    .timeseries-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .timeseries-controls {
        width: 100%;
        justify-content: space-between;
    }

    .timeseries-period-btn {
        flex: 1;
        text-align: center;
    }

    .timeseries-grid {
        grid-template-columns: 1fr;
    }

    .timeseries-fund-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .fund-stats {
        width: 100%;
    }

    .timeseries-chart-container {
        height: 300px;
    }
}
